Routing Table Look Up Process
Routing Table Look Up Process
- Understanding ip classless
CCNA/CCNP
Rick Graziani
Cabrillo College
The IP Routing Table
Routing Protocol
• Classful/Classless routing protocols are only concerned about how
the routes get into the table. (Building the routing table.)
RouterB#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
RouterB#
RouterB#debug ip routing
RouterB(config)#interface s 1
RouterB(config-if)#ip add 192.168.1.1 255.255.255.0
RouterB(config-if)#no shutdown
00:59:48: %LINK-3-UPDOWN: Interface Serial1, changed state to up
00:59:48: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state
to up
00:59:48: RT: add 192.168.1.0/24 via 0.0.0.0, connected metric [0/0]
00:59:48: RT: interface Serial1 added to routing table
RouterB(config-if)#end
RouterB#undebug all
All possible debugging has been turned off
RouterB#
RouterB#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
<text omitted>
Ultimate Routes
• Routes with masks equal to or less than default classful mask (includes
supernet routes.
So far on Router B:
RouterB(config)#inter s 0
RouterB(config-if)#ip add 172.16.2.2 255.255.255.0
RouterB(config-if)#end
RouterB#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
<text omitted>
RouterB#show ip route
RouterB#show ip route
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.
Ultimate Routes
• Routes with masks equal to or less than default classful mask (includes
Ricksupernet routes.
Graziani [email protected]
Lookup what?
RouterB#show ip route
RouterB#show ip route
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!
Rick Graziani [email protected]
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!
RouterB#show ip route
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!
RouterB#show ip route
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
Rick Graziani [email protected]
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
Rick Graziani [email protected]
Classful Routing Behavior
RouterB#show ip route
DA = 172.16.4.1
RouterB(config)# no ip classless
A Graphical Look! The Roach Router Motel
• This might help you remember the difference between the no ip classless and the ip
classless command (and then again, maybe not )
• no ip classless: “The packets get in, but they can’t get out.”
• Once the lookup process enters, because of the parent-bait, they never look any further.
(Looks for a match within the child routes.)
• Note: They only enter if there is a match with the parent-bait.
Rick Graziani [email protected]
Classful Routing Behavior
RouterB#show ip route
DA = 172.16.4.1
RouterB(config)# no ip classless
RouterB#ping 172.26.4.1
Sending 5, 100-byte ICMP Echoes to 172.16.4.1, timeout is 2
seconds:
.....
Success rate is 0 percent (0/5)
Rick Graziani [email protected]
Classless Routing Behavior
RouterB#show ip route
DA = 172.16.4.1
RouterB(config)# ip classless
The Roach Router Motel – There’s a hole!
• ip classless: “The packets get in, and they have a way out.”
• Once the lookup process enters, because of the parent-bait, they can look
further in the routing table if there is no match.
• If there is a match, the process ends, else the process continues looking for a
default or supernet route.
•Rick Graziani [email protected]
Again, they only enter if there is a match with the parent-bait.
Classless Routing Behavior
RouterB#show ip route
DA = 172.16.4.1
RouterB(config)# ip classless
RouterB#ping 172.16.4.1
Sending 5, 100-byte ICMP Echoes to 172.16.4.1, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5),round-trip
min/avg/max=56/57/60 ms
Rick Graziani [email protected]
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.
Routing Protocol
• Classful/Classless routing protocols are only concerned about how
the routes get into the table. (Building the routing table.)
CCNA/CCNP
Rick Graziani
Cabrillo College