Professional Documents
Culture Documents
Introduction To Classless Routing Concepts and RIPv2
Introduction To Classless Routing Concepts and RIPv2
1
Introduction to Classless
Routing Concepts and RIPv2
(Extra: The Routing Table)
Rick Graziani
graziani@cabrillo.edu
http://www.cabrillo.cc.ca.us/~rgraziani
Session Number
Updated:2/18/03
Presentation_ID © 2002, Cisco Systems, Inc. All rights reserved. 2
Note to Instructors
This presentation will introduce you to the following:
• Classless Routing Protocols
• RIPv2
• The Routing Table
– The route lookup process
– Classful versus Classless routing behavior
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
Router(config-router)# no auto-summary
With
autosummarization 192.168.4.24/30
192.168.4.20/30
ISP will load
balance for all
172.30.200.32/28
packets destined
Lo2
for 172.30.0.0/16 .26 s0 s0 .22 `
172.30.200.16/28
Lo1
Lo0
172.30.2.0/24
.1 SantaCruz1 SantaCruz2 Lo0
.1
.1 e0 .1 e0 172.30.110.0/24
172.30.1.0/24 172.30.100.0/24
Presentation_ID © 2002, Cisco Systems, Inc. All rights reserved. 11
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
version 2 static route to 207.3.0.0/16
etc.
no auto-summary 10.0.0.0/8 207.0.0.0/8
.1 e0
.1
SantaCruz2
ISP
router rip .25 s0 s1 .21
network 172.30.0.0
network 192.168.4.0
version 2 192.168.4.24/30
192.168.4.20/30
no auto-summary
172.30.200.32/28
ISP Lo2
.26 s0 s0 .22 `
172.30.200.16/28
router rip Lo0
Lo1
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
Presentation_ID © 2002, Cisco Systems, Inc. All rights reserved. 13
RIPv2: Sending and Receiving Updates
ISP(config)# line console 0
ISP(config-line)# logging synchronous
ISP#debug ip rip
RIP protocol debugging is on
ISP#01:23:34: RIP: received v2 update from 192.168.4.22 on Serial1
01:23:34: 172.30.100.0/24 -> 0.0.0.0 in 1 hops
01:23:34: 172.30.110.0/24 -> 0.0.0.0 in 1 hops
ISP# Includes mask
01:23:38: RIP: received v2 update from 192.168.4.26 on Serial0
01:23:38: 172.30.2.0/24 -> 0.0.0.0 in 1 hops
01:23:38: 172.30.1.0/24 -> 0.0.0.0 in 1 hops multicast
ISP#
01:24:31: RIP: sending v2 update to 224.0.0.9 via Ethernet0 (10.0.0.1)
01:24:31: 172.30.2.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.1.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.100.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.110.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 192.168.4.24/30 -> 0.0.0.0, metric 1, tag 0
01:24:31: 192.168.4.20/30 -> 0.0.0.0, metric 1, tag 0
<text omitted>
Session Number
Presentation_ID © 2002, Cisco Systems, Inc. All rights reserved. 16
The IP Routing Table
• This information is included as two PDF documents.
• Can also be downloaded from my web site:
The Routing Table: Part 1 or 2 - The Routing Table Structure (PDF)
The Routing Table: Part 2 or 2 - The Routing Table Lookup Process
(PDF)
Parent Route
• Created automatically whenever there is a route with a mask greater
than the classful mask.
• For non-VLSM routes, contains the mask of the child routes.
Child Routes
• Routes with masks greater than the default classful mask.
DA = 192.168.1.10
• 16 bits of 172.16.0.0 do not match, so child routes are not checked.
• 24 bits of 192.168.1.0/24 do match, so this route is used.
DA = 172.16.2.1
• 16 bits of 172.16.0.0 do match, so child routes are checked.
• 24 bits of 172.16.1.0 do not match, so continue to next child route.
• 24 bits of 172.16.2.0 do match, so this route is used!
Presentation_ID © 2002, Cisco Systems, Inc. All rights reserved. 20
Parent and Child Routes
RouterB#show ip route
DA = 32.1.1.10
• 16 bits of 172.16.0.0 do not match, so child routes are not checked.
• 24 bits of 192.168.1.0/24 do not match, so this route is not used.
• 8 bits of 172.0.0.0/8 do not match, so this route is not used.
• 4 bits of 160.0.0.0/4 do not match, so this route is not used.
• 0 bits of 0.0.0.0/0 does match, so this route is used!
DA = 172.16.4.1
• 16 bits of 172.16.0.0 do match, so child routes are checked.
• 24 bits of 172.16.1.0 do not match, so continue to next child route.
• 24 bits of 172.16.2.0 do not match, so continue to next child route.
• 24 bits of 172.16.3.0 do not match, no more child routes.
Now what??? It depends!
DA = 172.16.4.1
Router(config)# no ip classless
• With classful routing behavior, if the child routes are checked but
there are no matches, the routing lookup process ends and the Packet
is dropped. (The packets get in, but they can’t get out!)
• Supernet and default routes are not checked.
• Default with IOS 11.2 and prior
Presentation_ID © 2002, Cisco Systems, Inc. All rights reserved. 23
Classless Routing Behavior
RouterB#show ip route
DA = 172.16.4.1
Router(config)# ip classless
• With classless routing behavior, if the child routes are checked but
there are no matches, the routing lookup process continues with other
routes in the routing table, including supernet and default routes.
• 8 bits of 172.0.0.0/8 do match, so this route is used!
• Default with IOS 11.3 and later
Presentation_ID © 2002, Cisco Systems, Inc. All rights reserved. 24
VLSM and Routing Tables
RouterX#show ip route
Parent Route
• Created automatically whenever there is a route with a mask greater
than the classful mask.
• For VLSM routes, the mask is the default classful mask.
Child Routes
• Routes with masks greater than the default classful mask.
• For VLSM routes, each child route has its own mask.