1. Chapter 8
THE ROUTING TABLE:
A CLOSER LOOK
Reporters:
Norly A. Estopa
Namerto C. Medura
Andy D. Ando
Junrey F. Layao
2. THE ROUTING TABLE:
A CLOSER LOOK
Objectives:
- Describe the various route types found in the routing table
- Describe the routing table look-up process
- Describe the routing behavior in routed networks
- Determine the parent route and child route
3. This chapter analyzes the lookup process of the routing
table. Discuss classful routing behavior, as well as classless routing
behavior, which uses the no ip classless and ip classless commands.
Also, will take a closer look at the routing table. This chapter
focuses on the structure of Cisco's IP routing table. Examine the
format of the routing table and learn about level 1 and level 2 routes.
4. Routing Table Entries
The sample routing table in the
figure consists of 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. The figure shows a sample
routing table with directly
connected, static, and dynamic
routes. Notice that the Note: The routing table hierarchy in Cisco IOS was
172.16.0.0/24 subnets have a originally implemented with the classful routing
combination of all three types of scheme. Although the routing table incorporates both
routing sources. classful and classless addressing, the overall structure
is still built around this classful scheme.
5. Level 1 Routes
Routers R1 and R3 already have their interfaces configured with the appropriate
IP addresses and subnet masks. We will now configure the interfaces for R2 and use debug
ip routing to view the routing table process that is used to add these entries.
The figure shows what happens as the 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.
6. Level 1 Routes
A level 1 route can function as a:
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. Parent C 192.168.1.0/24 is directly connected,
routes will be discussed in the Serial0/0/1
next section.
7. Ultimate Route
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:
- either a next-hop IP address
(another path)
- and/or an exit interface
The directly connected
network 192.168.1.0/24 is a
level 1 network route because
it has a subnet mask that is the C 192.168.1.0/24 is directly connected,
same as its classful mask. This Serial0/0/1
same route is also an ultimate
route because it contains the We will see in the next topic that level 2
exit interface Serial 0/0/1. routes are also ultimate routes.
8. Parent and Child Routes : Classful Networks
When the 172.16.3.0 subnet was added to the routing table, another route,
172.16.0.0, was also added. The first entry, 172.16.0.0/24, does not contain any next-
hop IP address or exit interface information. This route is known as a level 1 parent
route.
9. A level 1 parent route is a
network route that does not
contain a next-hop IP address
or exit interface for any
network.
172.16.0.0/24 is subnetted, 1 subnets
A level 2 route is a route that is a
subnet of a classful network
address
C 172.16.3.0 is directly connected,
FastEthernet0/0
10. Level 1 Parent Route
This parent route contains the following
information:
172.16.0.0 - The classful network address for
our subnet. Remember, the Cisco IP routing
table is structured in a classful manner.
/24 - The subnet mask for all of 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. This will be
shown in a later section.
is subnetted, 1 subnet - This part of the route
specifies that this is a parent route and in this
case has one child route, that is, 1 subnet.
11. Level 2 Child Route
The second entry, 172.16.3.0, is the actual
route for our directly connected network. This
is a level 2 route, also known as a child route,
and contains the following information:
C - The route code for 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.
12. The level 2 child route is the specific route
entry for the 172,16.3.0/24 subnet. Notice
that the subnet mask is not included with
the subnet, the level 2 child route. The
subnet mask for this child route (subnet) is
the /24 mask included in its parent route,
172.16.0.0.
Level 2 child routes contain the route
source and the network address of the
route.
Level 2 child routes are also considered
ultimate routes because they will contain
the next-hop IP address and/or exit
interface.
13. Parent and Child Routes : Classful
Networks
The parent route contains the
following information:
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 3 subnets, 2 masks - Indicates the number of
child routes are variably subnetted subnets and the number of different subnet
and that there are multiple masks masks for the child routes under this parent
for this classful network. route.
14. Parent and Child Routes : Classful
Networks
Using one of the child routes as an
example, we can see the following
information:
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 Serial0/0/0 - The exit interface for forwarding
route code of C, specifies that this is a packets that match this specific route entry.
directly connected network with an
administrative distance of 0.
15. Steps in the Route Look up process
The Route Lookup Process
Follow these steps in the figure to
see the route lookup process.
Don't worry about fully
understanding the steps right
now. You will better understand
this process when we examine a
few examples in the following
sections.
16. Steps in the Route Look up 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.
17. Steps in the Route Look up process
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.
18. Steps in the Route Look up process
Step 1b.
If the best match is a level 1 parent route, proceed to Step 2.
19. Steps in the Route Look up process
Step 2.
The router examines child routes (the subnet routes) of the
parent route for a best match.
20. Steps in the Route Look up process
Step 2a.
If there is a match with a level 2 child route, that subnet will be used to
forward the packet.
21. Steps in the Route Look up process
Step 2b.
If there is not a match with any of the level 2 child routes, proceed to
Step 3.
22. Steps in the Route Look up process
Step 3.
Is the router implementing classful or classless routing behavior?
23. Steps in the Route Look up process
Step 3a.
Classful routing behavior: If classful routing behavior is in effect,
terminate the lookup process and drop the packet.
24. Steps in the Route Look up process
Step 3b.
Classless routing behavior: 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.
25. Steps in the Route Look up process
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.
26. Steps in the Route Look up process
Step 5.
If there is not a match with any route in the routing table, the router
drops the packet.
27. Steps in the Route Look up process
Note:
A route referencing only a next-hop IP address and not an
exit interface must be resolved to a route with an exit interface. A
recursive lookup is performed on the next-hop IP address until the
route is resolved to an exit interface.
28. Longest Match :
Level 1 Network
Routes
The best match or
longest match is the
route in the routing
table that has the
most number of left-
most matching bits
with the destination
IP address of the The route with the most number of equivalent left-most
packet. bits, or the longest match, is always the preferred route.
29. Step 1-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.
Step 1a - R 192.168.1.0/24 [120/1] via
172.16.2.2, 00:00:25, Serial0/0/0
30. Level 1 Ultimate Route
The subnet mask that is used to
determine the longest match is not
always obvious. Let's examine this
concept in more detail, using several
examples.
31. The 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.
32. Note:
Remember that the route lookup process will need to do a
recursive lookup on any route that references only a next-hop IP
address and not an exit interface. For a review of recursive lookups,
refer to Chapter 2, "Static Routing."
33. Routing Table Lookup Process
As shown in the figure, a parent route does not include a next-hop address or an exit interface but is only a "header" for its level 2
child routes, the subnets.
The subnet mask for the child routes - /24 in the figure - is displayed in the parent route, 172.16.0.0, for subnets that use the same
subnet mask.
Before any level 2 child routes are examined for a match, there must first be a match between the classful address of the level 1
parent route and the destination IP address of the packet.
34. Routing Table Lookup Process
Example: Level 1 Parent
Route and Level 2 Child
Routes
• In the example in the
figure, PC1 sends a ping to
PC2 at 172.16.3.10. R1
receives the packet and
begins to search the routing
table for a route.
35. Routing Table Lookup Process
The first match that occurs is with
the level 1 parent route, 172.16.0.0.
Remember, with non-VLSM subnets
the classful mask of the parent is
now displayed. Before any child
routes (subnets) are examined for a
match, there must first be a match
with the classful address of the
parent route.
Because the first route entry is a
level 1 parent route that matches
the destination address (Step 1b of
the route lookup process), the route
lookup process moves to Step 2.
36. Routing Table Lookup Process
Because there is a match with the
parent route, the level 2 child routes
will be examined for a match.
However, this time the actual subnet
mask of /24 is used for the minimum
number of left-most bits that must
match.
37. Routing Table Lookup Process
The route lookup process searches
the child routes for a match. In this
case, there must be a minimum of 24
bits that match.
38. Routing Table Lookup Process
• After the match with parent route has been made Level 2 child routes
will be examined for a match
-Route lookup process searches for child
routes with a match with destination IP
39. Routing Table Lookup Process
First, the router examines the
parent route for a match. In
this example, the first 16 bits
of the IP address must match
that of the parent route. The
left-most 16 bits must match
because that is the classful
mask of the parent route, /16.
If there is a match with the
parent route, then the router
checks the 172.16.1.0 route.
Child routes are only
examined when there is a
match with the classful mask
of the parent.
40. Routing Table Lookup Process
Checking the first subnet,
172.16.1.0, the 23rd bit does
not match; therefore, this
route is rejected because the
first 24 bits do not match.
41. Routing Table Lookup Process
Next, the router checks the
172.16.2.0/24 route. Because
the 24th bit does not match,
this route is also rejected. All
24 bits must match.
42. Routing Table Lookup Process
The router checks the last child route for 172.16.3.0/24 and finds a match. The first 24 bits do
match. The routing table process will use this route, 172.16.3.0/24, to forward the packet with
the destination IP address of 172.16.3.10 out the exit interface of Serial 0/0/0.
R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25, Serial0/0/0
What happens if the router does not have a route? Then it discards the packet.
43. Routing Table Lookup Process
• How a router finds a match with one of the level 2 child routes
-First router examines parent routes for a match
-If a match exists then:
Child routes are examined
Child route chosen is the one with the
longest match
44. Routing Table Lookup Process
Example: Route Lookup Process with VLSM
• What about our RouterX topology, which is using a VLSM
addressing scheme? How does this change the lookup
process?
• Using VSLM does not change the lookup process. With VLSM,
the /16 classful mask is displayed with the level 1 parent
route (172.16.0.0/16 in the figure).
• As with non-VLSM networks, if there is a match between the
packet's destination IP address and the classful mask of the
level 1 parent route, the level 2 child routes will be searched.
• The only difference with VLSM is that child routes display
their own specific subnet masks. These subnet masks are
used to determine the number of left-most bits that must
match the packet's destination IP address. For example, for
there to be a match with the 172.16.1.4 child route, a
minimum of 30 left-most bits must match because the subnet
mask is /30.
45. Routing Table Lookup Process
• Example: Route
Lookup Process with
VLSM
-The use of VLSM does not
change the lookup process
-If there is a match between
destination IP address and the
level 1 parent route then
-Level 2 child routes will be
searched