Professional Documents
Culture Documents
1 – Introduction to
Classless Routing
• Define VLSM and briefly describe the reasons for its use
• Divide a major network into subnets of different sizes using VLSM
• Define route aggregation and summarization as they relate to VLSM
• Configure a router using VLSM
• Identify the key features of RIP v1 and RIP v2
• Identify the important differences between RIP v1 and RIP v2
• Configure RIP v2
• Verify and troubleshoot RIP v2 operation
• Configure default routes using the ip route and ip default-
network commands
Rick Graziani graziani@cabrillo.edu 3
Note
Class D Addresses
• A Class D address begins with binary 1110 in the first octet.
• First octet range 224 to 239.
• Class D address can be used to represent a group of hosts called a
host group, or multicast group.
Class E Addresses
First octet of an IP address begins with 1111
• Class E addresses are reserved for experimental purposes and should
not be used for addressing hosts or multicast groups.
• Address Depletion
• Internet Routing Table Explosion
Rick Graziani graziani@cabrillo.edu 9
IPv4 Addressing
Subnet Mask
• One solution to the IP address shortage was thought to be the
subnet mask.
• Formalized in 1985 (RFC 950), the subnet mask breaks a single
class A, B or C network in to smaller pieces.
Using /24
subnet... Network Network Subnet Host
RFC 1878 states, "This practice (of excluding all-zeros and all-ones subnets) is
obsolete! Modern software will be able to utilize all definable networks."
Today, the use of subnet zero and the all-ones subnet is generally accepted
and most vendors support their use, though, on certain networks, particularly
the ones using legacy software, the use of subnet zero and the all-ones
subnet can lead to problems.
• By 1992, members of the IETF were having serious concerns about the
exponential growth of the Internet and the scalability of Internet routing
tables.
• The IETF was also concerned with the eventual exhaustion of 32-bit
IPv4 address space.
• Projections were that this problem would reach its critical state by 1994
or 1995.
• IETF’s response was the concept of Supernetting or CIDR, “cider”.
• To CIDR-compliant routers, address class is meaningless.
– The network portion of the address is determined by the network
subnet mask or prefix-length (/8, /19, etc.)
– The first octet (first two bits) of the network address (or network-
prefix) is NOT used to determine the network and host portion of the
network address.
• CIDR helped reduced the Internet routing table explosion with
supernetting and reallocation of IPv4 address space.
http://bgp.potaroo.net/
Rick Graziani graziani@cabrillo.edu 20
CIDR (Classless Inter-Domain Routing)
With CIDR, a
router can
summarize
these routes
using a single
network
address by
using a 13-bit
prefix:
172.24.0.0 /13
Steps:
1. Count the number of left-most matching bits, /13 (255.248.0.0)
2. Add all zeros after the last matching bit:
172.24.0.0 = 10101100 00011000 00000000 00000000
Rick Graziani graziani@cabrillo.edu 22
CIDR (Classless Inter-Domain Routing)
IS P IS P IS P IS P IS P IS P IS P IS P
• With the ISP acting as the addressing authority for a CIDR block of
addresses, the ISP’s customer networks, which include XYZ, can be
advertised among Internet routers as a single supernet.
200.199.48.0/25
Summarization from
200.199.56.0/23 the customer
networks to their
provider.
Even Better:
200.199.48.32/27 11001000 11000111 00110000 0 0100000
200.199.48.64/27 11001000 11000111 00110000 0 1000000
200.199.48.96/27 11001000 11000111 00110000 0 1100000
200.199.48.0/25 11001000 11000111 00110000 0 0000000
(As long as there are no other routes elsewhere within this range, well…)
20 bits in common
• Dynamic routing protocols must send network address and mask (prefix-
length) information in their routing updates.
• In other words, CIDR requires classless routing protocols for dynamic routing.
• However, you can still configure summarized static routes, after all, that is
what a 0.0.0.0/0 route is.
Merida
Summarized Update Specific Route Update
172.16.0.0/16 172.16.5.0/24
172.16.5.0/24
172.16.1.0/24
Quito Cartago
172.16.2.0/24 172.16.10.0/24
• Merida receives a summarized /16 update from Quito and a more
specific /24 update from Cartago.
• Merida will include both routes in the routing table.
• Merida will forward all packets matching at least the first 24 bits of
172.16.5.0 to Cartago (172/16/5/0/24), longest-bit match.
• Merida will forward all other packets matching at least the first 16 bits
to Quito (172.16.0.0/16).
Rick Graziani graziani@cabrillo.edu 31
Example from online curriculum
10.2.0.0/24 10 2 0 Host
10.2.1.0/24 10 2 1 Host
10.2.n.0/24 10 2 … Host
10.2.255.0/24 10 2 255 Host
• Note: 10.2.0.0/16 is now a summary of all of the 10.2.0.0/24
subnets.
• Summarization coming soon!
Rick Graziani graziani@cabrillo.edu 37
VLSM – Simple Example
10.0.0.0/8 “subnetted using /16”
• This network has seven /27 subnets with 30 hosts each AND seven
/30 subnets with 2 hosts each (one left over).
• /30 subnets with 2 hosts per subnet do not waste host addresses on
serial networks .
Rick Graziani graziani@cabrillo.edu 42
VLSM and the Routing Table
Displays one subnet mask for all child routes.
Classful mask is assumed for the parent route.
Routing Table without VLSM
RouterX#show ip route
207.21.24.0/27 is subnetted, 4 subnets
C 207.21.24.192 is directly connected, Serial0
C 207.21.24.196 is directly connected, Serial1
C 207.21.24.200 is directly connected, Serial2
C 207.21.24.204 is directly connected, FastEthernet0
Each child routes displays its own subnet mask.
Routing Table with VLSM Classful mask is included for the parent route.
RouterX#show ip route
207.21.24.0/24 is variably subnetted, 4 subnets, 2 masks
C 207.21.24.192 /30 is directly connected, Serial0
C 207.21.24.196 /30 is directly connected, Serial1
C 207.21.24.200 /30 is directly connected, Serial2
C 207.21.24.96 /27 is directly connected, FastEthernet0
• Parent Route shows classful mask instead of subnet mask of the child
routes.
• Each Child Routes includes its subnet mask.
• Route flapping occurs when a router interface alternates rapidly between the
up and down states.
• Route flapping can cripple a router with excessive updates and recalculations.
• However, the summarization configuration prevents the RTC route flapping
from affecting any other routers.
• The loss of one network does not invalidate the route to the supernet.
• While RTC may be kept busy dealing with its own route flap, RTZ, and all
upstream routers, are unaware of any downstream problem.
• Summarization effectively insulates the other routers from the problem of route
flapping.
Rick Graziani graziani@cabrillo.edu 45
Short Term Solutions: IPv4 Enhancements
If addressing any of the following, these private addresses can be used instead of globally unique
addresses:
• A non-public intranet
• A test lab
• A home network
Global addresses must be obtained from a provider or a registry at some expense.
Benefits:
• All-zeros and all-ones subnets
– - Although some vendors, like Cisco, can also handle this with
classful routing protocols.
• VLSM
– Can have discontiguous subnets
– Better IP addressing allocation
• CIDR
– More control over route summarization
The following four features are the most significant new features added to RIP v2:
• Authentication of the transmitting RIP v2 node to other RIP v2 nodes
• Subnet Masks – RIP v2 allocates a 4-octet field to associate a subnet mask to
a destination IP address.
• Next Hop IP addresses – A better next-hop address, that the advertising
router, if one exists.
– It indicates a next-hop address, on the same subnet, that is metrically
closer to the destination than the advertising router.
– If this router’s interface is closest, then it is set to 0.0.0.0
– See Doyle, Routing TCP/IP for an example
• Multicasting RIP v2 messages – Multicasting is a technique for
simultaneously advertising routing information to multiple RIP or RIP v2
devices.
Rick Graziani graziani@cabrillo.edu 62
RIP v2 message format
• All the extensions to the original protocol are carried in the unused
fields.
• The Address Family Identifier (AFI) field is set to two for IP. The only
exception is a request for a full routing table of a router or host, in
which case it will be set to zero.
• The Route Tag field provides a way to differentiate between internal and
external routes. (RIP itself does not use this field.)
– External routes are those that have been redistributed into the RIP v2.
• The Next Hop field contains the IP address of the next hop listed in the IP
Address field.
• Metric indicates how many internetwork hops, between 1 and 15 for a valid
route, or 16 for an unreachable route.
Rick Graziani graziani@cabrillo.edu 64
Compatibility with RIP v1
RFC 1723 defines a compatibility with four settings, which allows versions
1 and 2 to interoperate:
1. RIP v1, in which only RIP v1 messages are transmitted
2. RIP v1 Compatibility, which causes RIP v2 to broadcast its messages
instead of multicast them so that RIP v1 may receive them
3. RIP v2, in which RIP v2 messages are multicast to destination
address 224.0.0.9
4. None, in which no updates are sent
Authentication is
supported by
modifying what
would normally be
the first route entry
of the RIP message
1 2
3 4
5 6
• Perhaps the single greatest limitation that RIP v2 inherited from RIP is
that its interpretation of infinity remained at 16.
Other:
For RIP and IGRP, the passive interface command stops the router from
sending updates to a particular neighbor, but the router continues to
listen and use routing updates from that neighbor. (More later.)
Router(config-router)# passive-interface interface
interface fastethernet0/0
ip address 192.168.50.129 255.255.255.192
ip rip send version 1
ip rip receive version 1
RIPv2
interface fastethernet0/1
ip address 172.25.150.193 255.255.255.240
ip rip send version 1 2
• FastEthernet0/1 is configured
to send both version 1 and 2 router rip
updates. version 2
• FastEthernet0/2 has no special network 172.25.0.0
configuration and therefore network 192.168.50.0
sends and receives version 2
by default.
router rip
version 2
no auto-summary
• If the command ip rip authentication mode md5 is not added, the interface will
use the default clear text authentication. Although clear text authentication may be
necessary to communicate with some RIP v2 implementations, for security concerns use
the more secure MD5 authentication whenever possible.
Scenario: 207.0.0.0/16
207.1.0.0/16
Internet
• Discontiguous subnets static route to
207.2.0.0/16
207.3.0.0/16
etc.
• VLSM 10.0.0.0/8 207.0.0.0/8
• CIDR .1
.1 e0
ISP
• Supernet to 207.0.0.0/8 .25 s0 s1 .21
172.30.1.0/24 172.30.100.0/24
Rick Graziani graziani@cabrillo.edu
SantaCruz1 RIPv2 Example
router rip
network 172.30.0.0 207.0.0.0/16
207.1.0.0/16
network 192.168.4.0 Internet 207.2.0.0/16
static route to 207.3.0.0/16
version 2 etc.
10.0.0.0/8 207.0.0.0/8
no auto-summary
.1 e0
.1
SantaCruz2 ISP
.25 s0 s1 .21
router rip
network 172.30.0.0
network 192.168.4.0 192.168.4.24/30
version 2 192.168.4.20/30
no auto-summary
172.30.200.32/28
Lo2
ISP .26 s0 s0 .22 `
172.30.200.16/28
Lo1
Lo0
router rip .1 SantaCruz1 SantaCruz2 Lo0
172.30.2.0/24 .1
redistribute static .1 e0 .1 e0 172.30.110.0/24
network 10.0.0.0
172.30.1.0/24 172.30.100.0/24
network 192.168.4.0
version 2
no auto-summary
172.30.200.32/28
Lo2
.26 s0 s0 .22 `
172.30.200.16/28
Lo1
Lo0
.1 SantaCruz1 SantaCruz2 Lo0
172.30.2.0/24 .1
.1 e0 .1 e0 172.30.110.0/24
172.30.1.0/24 172.30.100.0/24
Rick Graziani graziani@cabrillo.edu
RIPv2: Sending and Receiving Updates
version 2
no auto-summary 192.168.4.24/30
192.168.4.20/30
default-information originate
172.30.200.32/28
Lo2
172.30.200.16/28
ip route 207.0.0.0 255.0.0.0 null0 .26 s0 s0 .22 Lo1 `
Lo0
.1 SantaCruz1 SantaCruz2 Lo0
ip route 0.0.0.0 0.0.0.0 10.0.0.2 172.30.2.0/24 .1
172.30.110.0/24
.1 e0 .1 e0
etherenet0
172.30.1.0/24 172.30.100.0/24