Cisco Networking Academy's Introduction To Routing Dynamically
Cisco Networking Academy's Introduction To Routing Dynamically
Cisco Networking Academy's Introduction To Routing Dynamically
Join|Sign In
Home
Shop By Cert
CCENT
CCDA
CCDE
CCNA Cloud
CCNA Collaboration
CCNA CyberOps
CCNA Security
CCNA Wireless
CCNP Collaboration
CCNP Security
CCNP Wireless
CCIE
Formats
Books
eBooks
Exam Vouchers
Practice Tests
Product Support
Register a Product
Software
Video
Web Editions
Video Training
Explore
About
Affiliate Program
Authors
Newsletters
Safari
Sales
Series
Community
User Groups
Home > Articles > Cisco Network Technology > General Networking > Cisco Networking
Academy's Introduction to Routing Dynamically
Chapter Information
Contents
1. Objectives
2. Key Terms
3. Introduction (3.0.1.1)
4. Dynamic Routing Protocols (3.1)
5. Dynamic versus Static Routing (3.1.2)
6. Routing Protocol Operating Fundamentals (3.1.3)
7. Types of Routing Protocols (3.1.4)
8. Distance Vector Dynamic Routing (3.2)
9. Types of Distance Vector Routing Protocols (3.2.2)
10. RIP and RIPng Routing (3.3)
11. Link-State Dynamic Routing (3.4)
12. The Routing Table (3.5)
13. Summary (3.6)
14. Practice
15. Check Your Understanding Questions
Chapter Description
A routing table consists of directly connected networks and routes learned statically or
dynamically. This section examines these two types of routing table entries.
The topology displayed in Figure 3-50 is used as the reference topology for this section.
Figure 3-51 displays the IPv4 routing table of R1 with directly connected, static, and
dynamic routes.
NOTE
The routing table hierarchy in Cisco IOS 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.
As highlighted in Figure 3-52, the routing table of R1 contains three directly connected
networks. Notice that two routing table entries are automatically created when an active
router interface is configured with an IP address and subnet mask.
Figure 3-52 Directly Connected Interfaces of R1
Figure 3-53 displays one of the routing table entries on R1 for the directly connected
network 172.16.1.0. These entries were automatically added to the routing table when the
GigabitEthernet 0/0 interface was configured and activated.
Route source: Identifies how the route was learned. Directly connected interfaces
have two route source codes. C identifies a directly connected network. Directly
connected networks are automatically created whenever an interface is
configured with an IP address and activated. L identifies that this is a local route.
Local routes are automatically created whenever an interface is configured with an
IP address and activated.
Destination network: The address of the remote network and how that network is
connected.
Outgoing interface: Identifies the exit interface to use when forwarding packets
to the destination network.
NOTE
Local routing table entries did not appear in routing tables prior to IOS release 15.
A router typically has multiple interfaces configured. The routing table stores information
about both directly connected and remote routes. As with directly connected networks, the
route source identifies how the route was learned. For instance, common codes for
remote networks include:
D: Identifies that the route was learned dynamically from another router using the
EIGRP routing protocol.
O: Identifies that the route was learned dynamically from another router using the
OSPF routing protocol.
R: Identifies that the route was learned dynamically from another router using the
RIP routing protocol.
Figure 3-54 displays an IPv4 routing table entry on R1 for the route to remote network
172.16.4.0 on R3.
Metric: Identifies the value assigned to reach the remote network. Lower values
indicate preferred routes.
Next hop: Identifies the IPv4 address of the next router to forward the packet to.
Route timestamp: Identifies from when the route was last heard.
Outgoing interface: Identifies the exit interface to use to forward a packet toward
the final destination.
The structure or format of the routing table might seem obvious until you take a closer look.
Understanding the structure of the routing table will help you verify and troubleshoot
routing issues because you will understand the routing table lookup process.
Routing Table Terms (3.5.2.1)
A dynamically built routing table provides a great deal of information, as shown in Figure
3-55. Therefore, it is crucial to understand the output generated by the routing table.
Special terms are applied when discussing the contents of a routing table.
The Cisco IP routing table is not a flat database. 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.
Ultimate route
Level 1 route
An ultimate route is a routing table entry that contains either a next-hop IPv4 address or
an exit interface. Directly connected, dynamically learned, and local routes are ultimate
routes.
In Figure 3-56, the highlighted areas are examples of ultimate routes. Notice that all of
these routes specify either a next-hop IPv4 address or an exit interface.
Figure 3-56 Ultimate Routes of R1
A level 1 route is a route with a subnet mask equal to or less than the classful mask of the
network address. Therefore, a level 1 route can be a:
Network route: A network route has a subnet mask equal to that of the classful
mask.
Supernet route: A supernet route is a network address with a subnet mask less
than the classful mask, for example, a summary address.
Default route: A default route is a static route with the address 0.0.0.0/0.
The source of the level 1 route can be a directly connected network, static route, or a
dynamic routing protocol.
Figure 3-57 highlights how level 1 routes are also ultimate routes.
As illustrated in Figure 3-59, a level 1 parent route is a level 1 network route that is
subnetted. A parent route can never be an ultimate route.
Figure 3-60 highlights the level 1 parent routes in the routing table of R1. The routing table
basically provides a heading for the specific subnets it contains. Each entry displays the
classful network address, the number of subnets, and the number of different subnet
masks that the classful address has been subdivided into.
Figure 3-60 Level 1 Parent Routes of R1
A level 2 child route is a route that is a subnet of a classful network address. As illustrated
in Figure 3-61, a level 1 parent route is a level 1 network route that is subnetted.
A level 1 parent route contains level 2 child routes, as shown in Figure 3-62.
Figure 3-62 Child Routes Are Ultimate Routes
Like a level 1 route, the source of a level 2 route can be a directly connected network, a
static route, or a dynamically learned route. Level 2 child routes are also ultimate routes.
NOTE
The routing table hierarchy in Cisco IOS has a classful routing scheme. A level 1 parent
route is the classful network address of the subnet route. This is the case even if a
classless routing protocol is the source of the subnet route.
Figure 3-63 highlights the level 2 child routes in the routing table of R1.
The entire output in Figure 3-63 can be viewed in the online course on page 3.5.2.5
graphic number 3.
Now that you understand the structure of the routing table, this section will help you
understand the routing table lookup process.
When a packet arrives on a router interface, the router examines the IPv4 header,
identifies the destination IPv4 address, and proceeds through the router lookup process.
In Figure 3-64, the router examines level 1 network routes for the best match with the
destination address of the IPv4 packet.
1. If the best match is a level 1 ultimate route, then this route is used to forward the
packet.
2.
If the best match is a level 1 parent route, proceed to the next step.
3.
In Figure 3-65, the router examines child routes (the subnet routes) of the parent
route for a best match.
4.
5.
6.
7. If there is a match with a level 2 child route, that subnet is used to forward the
packet.
8.
If there is not a match with any of the level 2 child routes, proceed to the next step.
9.
In Figure 3-66, the router continues searching level 1 supernet routes in the
routing table for a match, including the default route, if there is one.
10.
11.
12.
13. If there is now a lesser match with a level 1 supernet or default routes, the router
uses that route to forward the packet.
14. If there is not a match with any route in the routing table, the router drops the
packet.
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.
What is meant by the router must find the best match in the routing table? Best match is
equal to the longest match.
For there to be a match between the destination IPv4 address of a packet and a route in
the routing table, a minimum number of far left bits must match between the IPv4 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 far left bits that must match.
Remember that an IPv4 packet only contains the IPv4 address and not the subnet mask.
The best match is the route in the routing table that has the most number of far left
matching bits with the destination IPv4 address of the packet. The route with the greatest
number of equivalent far left bits, or the longest match, is always the preferred route.
The router has three possible routes that match this packet: 172.16.0.0/12, 172.16.0.0/18,
and 172.16.0.0/26. Of the three routes, 172.16.0.0/26 has the longest match and is
therefore chosen to forward the packet. Remember, for any of these routes to be
considered a match there must be at least the number of matching bits indicated by the
subnet mask of the route.
The IPv6 routing table shares many similarities with the IPv4 routing table. It also consists
of directly connected networks and routes learned statically or dynamically. However, the
entries are displayed somewhat differently than IPv4 entries. This section examines the
IPv6 routing table.
Components of the IPv6 routing table are very similar to the IPv4 routing table. For
instance, it is populated using directly connected interfaces, static routes, and dynamically
learned routes.
Because IPv6 is classless by design, all routes are effectively level 1 ultimate routes.
There is no level 1 parent of level 2 child routes.
The topology displayed in Figure 3-68 is used as the reference topology for this section.
R1, R2, and R3 are configured in a full mesh topology. All routers have redundant
paths to various networks.
R2 is the edge router and connects to the ISP; however, a default static route is
not being advertised.
EIGRP for IPv6 has been configured on all three routers.
The routing table of R1 is displayed in Figure 3-69 using the show ipv6 route command.
Although the command output is displayed slightly differently than in the IPv4 version, it
still contains the relevant route information.
Figure 3-70 highlights the connected network and local routing table entries of the directly
connected interfaces. The three entries were added when the interfaces were configured
and activated.
Figure 3-70 Directly Connected Routes on R1
As shown in Figure 3-71, directly connected route entries display the following
information:
Route source: Identifies how the route was learned. Directly connected interfaces
have two route source codes (C identifies a directly connected network while L
identifies that this is a local route).
Metric: Identifies the value assigned to reach the remote network. Lower values
indicate preferred routes.
Outgoing interface: Identifies the exit interface to use when forwarding packets
to the destination network.
NOTE
The serial links have reference bandwidths configured to observe how EIGRP metrics
select the best route. The reference bandwidth is not a realistic representation of
modern networks. It is used only to provide a visual sense of link speed.
Figure 3-72 highlights the routing table entries for the three remote networks (i.e., R2 LAN,
R3 LAN, and the link between R2 and R3). The three entries were added by the EIGRP.
Figure 3-73 displays a routing table entry on R1 for the route to remote network
2001:DB8:CAFE:3::/64 on R3.
Figure 3-73 Remote Networks Entries on R1
Route source: Identifies how the route was learned. Common codes include O
(OSPF), D (EIGRP), R (RIP), and S (Static route).
Metric: Identifies the value assigned to reach the remote network. Lower values
indicate preferred routes.
Next hop: Identifies the IPv6 address of the next router to forward the packet to.
Outgoing interface: Identifies the exit interface to use to forward a packet toward
the final destination.
When an IPv6 packet arrives on a router interface, the router examines the IPv6 header
and identifies the destination IPv6 address. The router then proceeds through the
following router lookup process.
The router examines level 1 network routes for the best match with the destination
address of the IPv6 packet. Just like IPv4, the longest match is the best match. For
example, if there are multiple matches in the routing table, the router chooses the route
with the longest match. A match is made by matching the far left bits of the packet’s
destination IPv6 address with the IPv6 prefix and prefix-length in the IPv6 routing table.
By Sean Wilkins
Aug 27, 2015
See All Related Articles
About
Affiliates
Contact Us
FAQ
Legal Notice
Ordering Information
Privacy Notice
Site Help
Site Map
Write for Us
© 2019 Pearson Education, Cisco Press. All rights reserved.
221 River Street, Hoboken, NJ 07030