10: ICMPv6 Neighbor Discovery Rick Graziani Cabrillo College [email protected].
Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani...
-
Upload
gloria-copeland -
Category
Documents
-
view
231 -
download
2
Transcript of Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani...
![Page 1: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/1.jpg)
Chapter 8The Routing Table: A Closer Look
CIS 82 Routing Protocols and Concepts
Rick Graziani
Cabrillo College
Last Updated: 4/14/2008
![Page 2: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/2.jpg)
2
Note My web site is www.cabrillo.edu/~rgraziani. For access to these PowerPoint presentations and other
materials, please email me at [email protected].
![Page 3: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/3.jpg)
3
For further information This presentation is an
overview of what is covered in the curriculum/book.
For further explanation and details, please read the chapter/curriculum.
Book: Routing Protocols
and Concepts By Rick Graziani and
Allan Johnson ISBN: 1-58713-206-0 ISBN-13: 978-58713-
206-3
![Page 4: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/4.jpg)
4
Topics The Routing Table Structure
Topology Routing Table Entries Level 1 Routes Parent and Child Routes:
Classful Networks Parent and Child Routes:
Classless Networks Routing Table Lookup Process
Steps in the Route Table Lookup Process
Longest Match: Level 1 Routes
Longest Match: Level 2 Routes
Routing Behavior Classful and Classless
Routing Behavior Classful Routing Behavior: no
ip classless Classless Routing Behavior: ip
classless
![Page 5: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/5.jpg)
The Routing Table Structure
![Page 6: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/6.jpg)
6
Understanding the Routing Table
Understanding the structure and lookup process of the routing table Help you diagnose any routing table issue
Regardless of your level of familiarity with the routing protocol. Is the packet is being forwarded as expected? Why or why not? Forwarded elsewhere? Discarded? For more details: Cisco IP Routing, by Alex Zinin (ISBN 0-201-60473-6)
![Page 7: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/7.jpg)
7
The Routing Table Structure
The structure of the routing table might seem obvious. Help you verify and troubleshoot routing issues because you will
understand the routing table lookup process. You will know exactly what the Cisco IOS software does when it
searches for a route.
Router# show ip route
172.16.0.0/24 is subnetted, 4 subnets
S 172.16.4.0 is directly connected, Serial0/0/1
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:08, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
10.0.0.0/16 is subnetted, 1 subnets
S 10.1.0.0 is directly connected, Serial0/0/1
C 192.168.1.0/24 is directly connected, Serial0/0/1
S 192.168.100.0/24 is directly connected, Serial0/0/1
![Page 8: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/8.jpg)
8
Notice that R3 also has a 172.16.4.0/24 subnet that is disconnected, or discontiguous, from the 172.16.0.0 network that R1 and R2 share.
The effects of this discontiguous subnet are examined later in this chapter when you look at the route lookup process.
Topology
![Page 9: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/9.jpg)
9
Topology: Interface Configurations for R1 and R3R1(config)# interface FastEthernet0/0
R1(config-if)# ip address 172.16.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# interface Serial0/0/0
R1(config-if)# ip address 172.16.2.1 255.255.255.0
R1(config-if)# clock rate 64000
R1(config-if)# no shutdown
R3(config)# interface FastEthernet0/0
R3(config-if)# ip address 172.16.4.1 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# interface Serial0/0/1
R3(config-if)# ip address 192.168.1.2 255.255.255.0
R3(config-if)# no shutdown
![Page 10: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/10.jpg)
10
Sample Routing Table Entries
Route entries from the following sources: Directly connected networks Static routes Dynamic routing protocols
The source of the route does not affect the structure of the routing table
Router# show ip route
172.16.0.0/24 is subnetted, 4 subnets
S 172.16.4.0 is directly connected, Serial0/0/1
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:08, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
10.0.0.0/16 is subnetted, 1 subnets
S 10.1.0.0 is directly connected, Serial0/0/1
C 192.168.1.0/24 is directly connected, Serial0/0/1
S 192.168.100.0/24 is directly connected, Serial0/0/1
![Page 11: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/11.jpg)
11
Sample Routing Table Entries
The routing table hierarchy in Cisco IOS software was originally implemented with the classful routing scheme.
Although the routing table incorporates both classful and classless addressing, the overall structure is still built around this classful scheme.
Router# show ip route
172.16.0.0/24 is subnetted, 4 subnets
S 172.16.4.0 is directly connected, Serial0/0/1
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:08, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
10.0.0.0/16 is subnetted, 1 subnets
S 10.1.0.0 is directly connected, Serial0/0/1
C 192.168.1.0/24 is directly connected, Serial0/0/1
S 192.168.100.0/24 is directly connected, Serial0/0/1
![Page 12: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/12.jpg)
12
Level 1 Routes
Serial 0/0/1 interface for R2 is configured with the 192.168.1.1/24 address As soon as no shutdown is entered, the output from debug ip routing
shows that this route has been added to the routing table.
R2# debug ip routing
IP routing debugging is on
R2# conf t
R2(config)# interface serial 0/0/1
R2(config-if)# ip address 192.168.1.1 255.255.255.0
R2(config-if)# clock rate 64000
R2(config-if)# no shutdown
R2(config-if)#
00:11:06: %LINK-3-UPDOWN: Interface Serial0/0/1, changed state to up
R2(config-if)#
RT: add 192.168.1.0/24 via 0.0.0.0, connected metric [0/0]
RT: interface Serial0/0/1 added to routing table
R2(config-if)# end
R2# undebug all
All possible debugging has been turned off
![Page 13: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/13.jpg)
13
Level 1 Routes
The routing table is actually a hierarchical structure that is used to speed up the lookup process when locating routes and forwarding packets.
Within this structure, the hierarchy includes several levels. For simplicity, we discuss all routes as one of two levels: level 1
or level 2.
RT: add 192.168.1.0/24 via 0.0.0.0, connected metric [0/0]
RT: interface Serial0/0/1 added to routing table
R2(config-if)# end
R2# show ip route
<output omitted>
C 192.168.1.0/24 is directly connected, Serial0/0/1
![Page 14: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/14.jpg)
14
Level 1 Routes
A level 1 route is a route with a subnet mask equal to or less than the classful mask of the network address. 192.168.1.0/24 is a level 1 network route because the subnet mask is
equal to the network’s classful mask. /24 is the classful mask for Class C networks, such as the 192.168.1.0
network.
R2# show ip route
<output omitted>
C 192.168.1.0/24 is directly connected, Serial0/0/1
![Page 15: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/15.jpg)
15
Level 1 Routes
A level 1 route can function as any of the following: Default route: A default route is a static route with the address 0.0.0.0/0. Supernet route: A supernet route is a network address with a mask less than
the classful mask. Network route: A network route is a route that has a subnet mask equal to that
of the classful mask. A network route can also be a parent route (next).
We will be using this chart throughout this chapter.
![Page 16: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/16.jpg)
16
Level 1 Routes
The level 1 route 192.168.1.0/24 can be further defined as an ultimate route.
An ultimate route is a route that includes one or both of the following: A next-hop IP address (another path) An exit interface
![Page 17: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/17.jpg)
17
Level 1 Routes
Directly connected network 192.168.1.0/24 is a level 1 network route - subnet mask that is the same as its
classful mask. ultimate route - contains the exit interface Serial 0/0/1.
![Page 18: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/18.jpg)
18
Parent and Child Routes: Classful Networks
Another type of level 1 network route, a parent route. When the 172.16.3.0 subnet was added to the routing table,
Another route, 172.16.0.0 also added. First entry: no next-hop IP address or exit interface information.
This route is known as a level 1 parent route.
R2(config)# interface fastethernet 0/0
R2(config-if)# ip address 172.16.3.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# end
R2# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
<text omitted>
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
Level 1 Parent RouteLevel 2 Child Route
![Page 19: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/19.jpg)
19
Parent and Child Routes: Classful Networks
A parent route is a heading: Indicates the presence of level 2 routes, also known as child routes.
A level 1 parent route is automatically created any time a subnet is added to the routing table.
A parent route is created whenever a route with a mask greater than the classful mask is entered into the routing table. The subnet 172.16.3.0 is the level 2 child route of the parent route
172.16.0.0.
R2# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
<text omitted>
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
Level 1 Parent RouteLevel 2 Child Route
![Page 20: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/20.jpg)
20
Parent and Child Routes: Classful Networks
A level 2 route is a route that is a subnet of a classful network address. Like a level 1 route, the source of a level 2 route can be a :
directly connected network static route dynamic routing protocol.
Note: This is the case even if a classless routing protocol is the source of the subnet route.
Level 1 Parent RouteLevel 2 Child Route
![Page 21: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/21.jpg)
21
Parent route: 172.16.0.0: The classful network address for our subnet. /24: The subnet mask for all the child routes. If the child routes have
variable-length subnet masks (VLSM), the subnet mask will be excluded from the parent route and included with the individual child routes. (later).
is subnetted, 1 subnets: This part of the route specifies that this is a parent route and in this case has one child route (that is, one subnet).
![Page 22: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/22.jpg)
22
Child route: C: The route code for a directly connected network. 172.16.3.0: The specific route entry. is directly connected: Along with the route code of C, this specifies that
this is a directly connected network with an administrative distance of 0. FastEthernet0/0: The exit interface for forwarding packets that match this
specific route entry.
![Page 23: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/23.jpg)
23
A level 2 child route contains the route source and the network address of the route.
Notice that the subnet mask is not included with the subnet, the level 2 child route.
The subnet mask for this child route is the /24 mask included in its parent route, 172.16.0.0.
Level 2 child routes are also considered ultimate routes because they contain the next-hop IP address or exit interface.
![Page 24: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/24.jpg)
24
Adding another child route
The routing table shows two child routes for the same 172.16.0.0/24 parent route.
172.16.2.0 and 172.16.3.0 are members both members of the 172.16.0.0/16 classful network.
Because both child routes have the same subnet mask, the parent route still maintains the /24 mask but now shows two subnets.
Later we will see the role of the parent route.
R2(config)# interface serial 0/0/0
R2(config-if)# ip address 172.16.2.2 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# end
R2# show ip route
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
![Page 25: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/25.jpg)
25
Adding another child route
If there is only a single level 2 child route and that route is removed, the level 1 parent route is automatically deleted.
A level 1 parent route exists only when there is at least one level 2 child route.
If child routes are deleted there is no parent route.
![Page 26: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/26.jpg)
26
Parent and Child Routes: Classless Networks
For this discussion, we switch briefly to the RouterX topology.
![Page 27: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/27.jpg)
27
Parent and Child Routes: Classless Networks
All three subnets belong to the classful network 172.16.0.0/16 and are therefore level 2 child routes.
Notice that the child routes do not share the same subnet mask, as was the case in the classful example.
Implementing a network addressing scheme with VLSM. Whenever there are two or more child routes with different subnet masks
belonging to the same classful network, the routing table presents a slightly different view, which states that this parent network is variably subnetted.
RouterX# show ip route
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C 172.16.1.4/30 is directly connected, Serial0/0/0
C 172.16.1.8/30 is directly connected, Serial0/0/1
C 172.16.3.0/24 is directly connected, FastEthernet0/0
![Page 28: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/28.jpg)
28
Parent and Child Routes: Classless Networks
The parent route of 172.16.0.0 now contains the classful mask /16. In the classful example shown earlier the classful mask was not displayed.
Parent route states that the child routes are variably subnetted. Includes the number of different masks of the child routes (2 masks). Each child route now contains the subnet mask for that specific route.
In the non-VLSM example both child routes shared the same subnet mask, and the parent displayed their common subnet mask.
![Page 29: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/29.jpg)
29
Parent route: 172.16.0.0: The parent route, the classful network address associated with
all child routes /16: The classful subnet mask of the parent route variably subnetted: States that the child routes are variably subnetted
and that there are multiple masks for this classful network 3 subnets, 2 masks: Indicates the number of subnets and the number of
different subnet masks for the child routes under this parent route
![Page 30: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/30.jpg)
30
Child route: C: The route code for a directly connected network 172.16.1.4: The specific route entry /30: The subnet mask for this specific route is directly connected: Along with the route code of C, specifies that this
is a directly connected network with an administrative distance of 0 Serial0/0/0: The exit interface for forwarding packets that match this
specific route entry
![Page 31: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/31.jpg)
Routing Table Lookup Process
![Page 32: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/32.jpg)
32
Routing Table Lookup Process
When a router receives a packet on one of its interfaces. The routing table lookup process compares the destination IP
address of the incoming packet with the entries in the routing table. The best match between the packet’s destination IP address and
the route in the routing table is used to determine to which interface to forward the packet.
IP Packet
Routing Table
Find “best match”
![Page 33: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/33.jpg)
33
We have specifically chosen a classful routing protocol with our discontiguous 172.16.0.0 subnets.
The reason for this will become evident in a later section.
R1(config)# router rip
R1(config-router)# network 172.16.0.0
R2(config)# router rip
R2(config-router)# network 172.16.0.0
R2(config-router)# network 192.168.1.0
R3(config)# router rip
R3(config-router)# network 172.16.0.0
R3(config-router)# network 192.168.1.0
Steps in the Route Table Lookup Process
![Page 34: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/34.jpg)
34
Steps in the Route Table Lookup ProcessR1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:07, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
R3# show ip route
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.4.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
Neither R1 nor R2 has a route to 172.16.4.0. Also, R3 does not have routes to subnets 172.16.1.0/24, 172.16.2.0/24, or
172.16.3.0/24.
![Page 35: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/35.jpg)
35
The Route Lookup Process
Step 1. The router examines level 1 routes, including network routes and
supernet routes, for the best match with the destination address of the IP packet
Routing Table
![Page 36: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/36.jpg)
36
Step 1a. If the best match is a level 1 ultimate route—a classful network,
supernet, or default route—this route is used to forward the packet
The Route Lookup Process Routing Table
![Page 37: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/37.jpg)
37
Step 1b. If the best match is a level 1 parent route, proceed to Step 2
The Route Lookup Process Routing Table
![Page 38: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/38.jpg)
38
Step 2. The router examines child routes (the subnet routes) of the parent
route for a best match.
The Route Lookup Process Routing Table
![Page 39: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/39.jpg)
39
Step 2a. If there is a match with a level 2 child route, that subnet is used to
forward the packet.
The Route Lookup Process Routing Table
![Page 40: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/40.jpg)
40
Step 2b. If there is not a match with any of the level 2 child routes, proceed to
Step 3.
The Route Lookup Process Routing Table
![Page 41: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/41.jpg)
41
Step 3. Is the router implementing classful or classless routing behavior.
(later) Router(config)# no ip classless Router(config)# ip classless
The Route Lookup Process Routing Table
![Page 42: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/42.jpg)
42
Step 3a. If classful routing behavior is in effect, terminate the lookup
process and drop the packet. Router(config)# no ip classless
The Route Lookup Process Routing Table
![Page 43: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/43.jpg)
43
Step 3b. If classless routing behavior is in effect, continue searching level
1 supernet routes in the routing table for a match, including the default route, if there is one.
The Route Lookup Process Routing Table
![Page 44: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/44.jpg)
44
Step 4. If there is now a lesser match with a level 1 supernet or default
routes, the router uses that route to forward the packet.
The Route Lookup Process Routing Table
![Page 45: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/45.jpg)
45
Step 5. If there is not a match with any route in the routing table, the router
drops the packet.
The Route Lookup Process Routing Table
![Page 46: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/46.jpg)
46
Longest Match
(Digressing from topology) For there to be a match between the destination IP address of a packet
and a route in the routing table, a minimum number of leftmost bits must match between the IP address of the packet and the route in the routing table.
The subnet mask of the route in the routing table is used to determine the minimum number of leftmost bits that must match.
IP packet only contains the IP address and not the subnet mask.
![Page 47: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/47.jpg)
47
Longest Match
The best match or longest match is the route in the routing table that has the greatest number of leftmost matching bits with the destination IP address of the packet. The route with the greatest number of equivalent leftmost bits, or the
longest match, is always the preferred route. Subnet mask in routing table specifies the minimum number of leftmost
matching bits – the only bits that are considered.
All three routes match but Route 3 has the longest match.
![Page 48: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/48.jpg)
48
Example: Level 1 Ultimate Route
![Page 49: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/49.jpg)
49 PC1 sends a ping to 192.168.1.2, the serial interface on R3.
Example: Level 1 Ultimate Route
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
![Page 50: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/50.jpg)
50
The router first examines level 1 routes for the best match.
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
192.168.1.2
![Page 51: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/51.jpg)
51
There is a match between the destination IP address 192.168.1.2 and the level 1 ultimate route of 192.168.1.0/24.
R1 uses this route and forwards the packet out interface Serial 0/0/0.
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
192.168.1.2
![Page 52: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/52.jpg)
52
Example: Level 1 Ultimate Route
Why is there a match with the 192.168.1.0/24 level 1 route and not with one of the 172.16.0.0 subnets?
Why is there not a match with any of the 172.16.0.0/24 subnets in the routing table?
192.168.1.2
![Page 53: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/53.jpg)
53
Example: Level 1 Ultimate Route
172.16.0.0/24 is a parent route of three subnets or child routes. Before a child route is examined for a match, there must be
at least a match between the destination IP address of the packet and the classful address of the parent route, or 172.16.0.0/16.
16 bits (/16) must match the route 172.16.0.0/16 – no match!
192.168.1.2
![Page 54: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/54.jpg)
54
Example: Level 1 Ultimate Route
The route, 192.168.1.0, is a level 1 ultimate route and, therefore, it also contains the subnet mask, /24.
Not only does the minimum of 24 bits match, but a total of 30 bits match.
Because there is not a longer, more specific match, the packet is forwarded out the exit interface Serial 0/0/0.
192.168.1.2
![Page 55: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/55.jpg)
55 R1 forwards the packet out Serial0/0/0.
Example: Level 1 Ultimate Route
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
No match
Match
192.168.1.2
![Page 56: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/56.jpg)
56
Longest Match: Level 1 Parent and Level 2 Child Routes
![Page 57: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/57.jpg)
57
Longest Match: Level 1 Parent and Level 2 Child Routes
Examine what happens when there is a match with a level 1 parent route.
Before any level 2 child routes are examined for a match, there must be a match between the classful address of the level 1 parent route and the destination IP address of the packet.
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
Match
172.16.3.10
![Page 58: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/58.jpg)
58
Longest Match: Level 1 Parent and Level 2 Child Routes
PC1 sends a ping to PC2 at 172.16.3.10. R1 receives the packet and forwards it to R2.
![Page 59: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/59.jpg)
59
Longest Match: Level 1 Parent and Level 2 Child Routes
PC1 sends a ping to PC2 at 172.16.3.10. R1 receives the packet and forwards it to R2.
172.16.3.10
![Page 60: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/60.jpg)
60
The first match that occurs is with the level 1 parent route, 172.16.0.0. With non-VLSM subnets, the classful mask of the parent is not
displayed. Before any child routes (subnets) are examined for a match, there must be
a match with the classful address of the parent route. Because 172.16.0.0 is a Class B address, 16 leftmost bits must match. 16 bits match the parent route, 172.16.0.0.
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
Match
172.16.3.10
![Page 61: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/61.jpg)
61
Because there is a match with the parent route, the level 2 child routes will be examined for a match.
The actual subnet mask of /24 is used for the minimum number of leftmost bits that must match.
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
172.16.3.10
Examine child routes
![Page 62: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/62.jpg)
62
The route lookup process searches the child routes for a match. In this case, there must be a minimum of 24 bits that match. Of the three subnets there is only one route that has 24 bits that
match: 172.16.3.0
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0Match
172.16.3.10
![Page 63: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/63.jpg)
63
The router checks the last child route for 172.16.3.0/24 and finds a match.
The first 24 bits do match.
172.16.3.10
Match Parent
No match child
No match child
Match child
![Page 64: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/64.jpg)
64
R1# show ip route
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
Match Parent
No match
No match
Match child
172.16.3.10
If this child route did not have an exit interface and only included a next-hop IP address, the next-hop IP address would need to be resolved to an exit interface.
The lookup process would need to start from the beginning, this time searching the routing table for the nexthop IP address.
What happens if the router does not have a route? In this scenario, it discards the packet.
![Page 65: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/65.jpg)
65
Example: Route Lookup Process with VLSM
![Page 66: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/66.jpg)
66
Example: Route Lookup Process with VLSM
Packet’s destination IP Address: 172.16.1.5 Using VSLM does not change the lookup process. The only difference with VLSM is that child routes display their own specific
subnet masks. 16 bits match the parent route, 172.16.0.0. For there to be a match with the 172.16.1.4 child route, a minimum of 30
leftmost bits must match because the subnet mask is /30
RouterX# show ip route
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C 172.16.1.4/30 is directly connected, Serial0/0/0
C 172.16.1.8/30 is directly connected, Serial0/0/1
C 172.16.3.0/24 is directly connected, FastEthernet0/0
172.16.1.5
Match ParentMatch child
![Page 67: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/67.jpg)
Routing Behavior
![Page 68: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/68.jpg)
68
Classful and Classless Routing Behavior
What happens when there is a match between the packet’s destination IP address and a level 1 parent route, but there is not a match with any of the level 2 child routes? We might assume the routing table lookup process continues looking for
a less-specific match in the routing table. However, you will see that this might or might not be the case
depending on the configuration of the router.
R2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:00, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S* 0.0.0.0/0 is directly connected, Serial0/0/1
Match Parent
No match
No match
No match
Now what?
172.16.4.10
![Page 69: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/69.jpg)
69
Classful and Classless Routing Behavior
Classless and classful routing behaviors are not the same as classless and classful routing protocols.
Classful and classless routing protocols affect how the routing table is populated.
Classful and classless routing behaviors determine how the routing table is searched after it is populated.
![Page 70: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/70.jpg)
70
Topology Changes
Classful routing protocols such as RIPv1 do not support discontiguous networks.
Even though our current topology has discontiguous networks, we can configure static routes to reach those networks.
![Page 71: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/71.jpg)
71
Topology ChangesR2(config)# ip route 0.0.0.0 0.0.0.0 s0/0/1
R2(config)# router rip
R2(config-router)# default-information originate
R2(config-router)# no network 192.168.1.0
R2(config-router)# end
R2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:00, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S* 0.0.0.0/0 is directly connected, Serial0/0/1
![Page 72: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/72.jpg)
72
Topology Changes
Notice that the static route for the same network as the parent route is a child route in the routing table.
This is because there is a child route for that parent. If there wasn’t a 172.16.4.0/24 child route, then this 172.16.0.0/16 static
route would be a level 1 ultimate route.
R3(config)# ip route 172.16.0.0 255.255.0.0 s0/0/1
R3(config)# no router rip
R3(config-router)# end
R3# show ip route
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.4.0/24 is directly connected, FastEthernet0/0
S 172.16.0.0/16 is directly connected, Serial0/0/1
C 192.168.1.0/24 is directly connected, Serial0/0/1
![Page 73: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/73.jpg)
73
Step 3. Is the router implementing classful or classless routing behavior.
(later) Router(config)# no ip classless Router(config)# ip classless
Routing Behavior Routing Table
![Page 74: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/74.jpg)
74
Classful Routing Behavior: no ip classless
What happens when there is a match with a parent, but none of the child routes match?
Before Cisco IOS Software Release 11.3, no ip classless was the default behavior for Cisco routers.
The command no ip classless means that the route lookup process uses classful routing table lookups by default.
R2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:00, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S* 0.0.0.0/0 is directly connected, Serial0/0/1
Match Parent
No match
No match
No match
Now what?
R1(config)# no ip classless
R2(config)# no ip classless
R3(config)# no ip classless
![Page 75: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/75.jpg)
75
Classful Routing Behavior: Search Process
R2 receives a packet destined for PC3 at 172.16.4.10
![Page 76: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/76.jpg)
76
Classful Routing Behavior: no ip classless
The routing process searches the routing table and finds a 16-bit match with the parent route 172.16.0.0.
None of the child routes have 24 leftmost bits that match the 24 leftmost bits of the destination IP address 172.16.4.10.
R2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:00, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S* 0.0.0.0/0 is directly connected, Serial0/0/1
Match Parent
No match
No match
No match
Now what?
172.16.4.10
![Page 77: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/77.jpg)
77
So, what happens next? Router R2 drops the
packet. Default route is never
checked or used.
Classful Routing Behavior: no ip classlessR2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:00, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S* 0.0.0.0/0 is directly connected, Serial0/0/1
Match Parent
No match
No match
No match
Now what?
172.16.4.10
DROP PACKET
![Page 78: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/78.jpg)
78
Classful Routing Behavior: no ip classless
Why does classful routing behavior perform like this? The general idea of classful routing behavior comes from the time when all
networks were of a classful nature. At the beginning of the Internet’s growth, an organization received a Class
A, Class B, or Class C major network address. When an organization had a classful IP major network address, that
organization would also administer all the subnets for that classful address. All routers belonging to the organization would know about all the subnets
for the major network. If a subnet was not in the routing table, the subnet did not exist
172.16.4.10
![Page 79: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/79.jpg)
79
Classless Routing Behavior: ip classless
Remember: R2 receives a packet destined for PC3 at 172.16.4.10
172.16.4.10
![Page 80: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/80.jpg)
80
Classless Routing Behavior: ip classless
Cisco IOS 11.3, Cisco changed the default routing behavior from classful to classless. ip classless command is configured by default. Classless routing behavior means that the routing process no longer assumes that all
subnets for a major classful network can be reached only within the child routes of the parent.
Classless routing behavior works well for discontiguous networks and classless interdomain routing (CIDR) supernets.
R2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:00, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S* 0.0.0.0/0 is directly connected, Serial0/0/1
Match Parent
No match
No match
No match
Now what?
R1(config)# ip classless
R2(config)# ip classless
R3(config)# ip classless
172.16.4.10
![Page 81: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/81.jpg)
81
Step 3b. If classless routing behavior is
in effect, continue searching level 1 supernet routes in the routing table for a match, including the default route, if there is one.
Step 4. If there is now a lesser match
with a level 1 supernet or default routes, the router uses that route to forward the packet.
172.16.4.10
![Page 82: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/82.jpg)
82
The 192.168.1.0/24 route does not have 24 leftmost bits that match the destination IP address.
/0, which means that zero or no bits need to match. A default route will be the lowest-bit match. In classless routing behavior, if
no other route matches, the default route will match.
R2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:00, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S* 0.0.0.0/0 is directly connected, Serial0/0/1
Match Parent
No match
No match
No match
Now what?
172.16.4.10
Classless Routing Behavior: ip classless
![Page 83: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/83.jpg)
83
R2# show ip route
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:00, Serial0/0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
S* 0.0.0.0/0 is directly connected, Serial0/0/1
Match Parent
No match
No match
No match
Now what?
172.16.4.10
Continue searching level 1 supernet routes. The default route is a match, so I is used to forward the packet.
Classless Routing Behavior: ip classless
![Page 84: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/84.jpg)
84
Step 5. If there is not a match with any route in the routing table, the router
drops the packet.
172.16.4.10
Classless Routing Behavior: ip classless
![Page 85: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/85.jpg)
85
What does R3 do with return traffic back to PC2 at 172.16.2.10? R3 uses the 172.16.0.0/16 child route and forwards the traffic out
Serial 0/0/1 back to R2
172.16.4.10
Classless Routing Behavior: ip classless
![Page 86: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/86.jpg)
86
Classful Routing Behavior: no ip classless
172.16.4.10
Classless Routing Behavior: ip classless
![Page 87: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/87.jpg)
87
Classful vs. Classless Routing Behavior in the Real World
Remember that classful and classless routing behaviors are independent from classful and classless routing protocols.
A router could be configured with classful routing behavior (no ip classless) and a classless routing protocol, such as RIPv2.
A router could also be configured with classless routing behavior (ip classless) and a classful routing protocol, such as RIPv1.
In today’s networks, it is recommended to use classless routing behavior so that supernet and default routes can be used whenever needed.
![Page 88: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/88.jpg)
88
Topics The Routing Table Structure
Topology Routing Table Entries Level 1 Routes Parent and Child Routes:
Classful Networks Parent and Child Routes:
Classless Networks Routing Table Lookup Process
Steps in the Route Table Lookup Process
Longest Match: Level 1 Routes
Longest Match: Level 2 Routes
Routing Behavior Classful and Classless
Routing Behavior Classful Routing Behavior: no
ip classless Classless Routing Behavior: ip
classless
![Page 89: Chapter 8 The Routing Table: A Closer Look CIS 82 Routing Protocols and Concepts Rick Graziani Cabrillo College graziani@cabrillo.edu Last Updated: 4/14/2008.](https://reader036.fdocuments.us/reader036/viewer/2022062315/5697bf741a28abf838c7fa2e/html5/thumbnails/89.jpg)
Chapter 8The Routing Table: A Closer Look
CIS 82 Routing Protocols and Concepts
Rick Graziani
Cabrillo College
Last Updated: 4/14/2008