Home > Articles > Networking > Routing & Switching

This chapter is from the book

This chapter is from the book

The Routing Table (3.5)

As a network administrator, it is important to know the routing table in depth when troubleshooting network issues. Understanding the structure and lookup process of the routing table will help you diagnose any routing table issue, regardless of your level of familiarity with a particular routing protocol. For example, you might encounter a situation in which the routing table has all of the routes you would expect to see, but packet forwarding is not performing as expected. Knowing how to step through the lookup process of a destination IP address for a packet will enable you to determine whether the packet is being forwarded as expected, if and why the packet is being sent elsewhere, or whether the packet has been discarded.

Parts of an IPv4 Route Entry (3.5.1)

A routing table consists of directly connected networks and routes learned statically or dynamically. This section examines these two types of routing table entries.

Routing Table Entries (3.5.1.1)

The topology displayed in Figure 3-50 is used as the reference topology for this section.

Figure 3-50

Figure 3-50 Reference Topology

Notice that in the topology:

  • R1 is the edge router that connects to the Internet. Therefore, it is propagating a default static route to R2 and R3.
  • R1, R2, and R3 contain discontiguous networks separated by another classful network.
  • R3 is also introducing a 192.168.0.0/16 supernet route.

Figure 3-51 displays the IPv4 routing table of R1 with directly connected, static, and dynamic routes.

Figure 3-51

Figure 3-51 Routing Table of R1

Directly Connected Entries (3.5.1.2)

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

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.

Figure 3-53

Figure 3-53 Directly Connected Routes of R1

The entries contain 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. 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.

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:

  • S: Identifies that the route was manually created by an administrator to reach a specific network. This is known as a static route.
  • 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.

Remote Network Entries (3.5.1.3)

Figure 3-54 displays an IPv4 routing table entry on R1 for the route to remote network 172.16.4.0 on R3.

Figure 3-54

Figure 3-54 Remote Network Route Entry on R1

The entry identifies the following information:

  • Route source: Identifies how the route was learned.
  • Destination network: Identifies the address of the remote network.
  • Administrative distance: Identifies the trustworthiness of the route source.
  • 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.

Dynamically Learned IPv4 Routes (3.5.2)

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.

Figure 3-55

Figure 3-55 Routing Table of R1

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.

Routes are discussed in terms of:

  • Ultimate route
  • Level 1 route
  • Level 1 parent route
  • Level 2 child routes

Ultimate Route (3.5.2.2)

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

Figure 3-56 Ultimate Routes of R1

Level 1 Route (3.5.2.3)

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.

Figure 3-57

Figure 3-57Sources of Level 1 Routes

Figure 3-58 highlights level 1 routes.

Figure 3-58

Figure 3-58 Example of Level 1 Routes

Level 1 Parent Route (3.5.2.4)

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-59

Figure 3-59 Level 1 Parent 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

Figure 3-60 Level 1 Parent Routes of R1

Level 2 Child Route (3.5.2.5)

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.

Figure 3-61

Figure 3-61 Level 2 Child Routes

A level 1 parent route contains level 2 child routes, as shown in Figure 3-62.

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.

Figure 3-63 highlights the level 2 child routes in the routing table of R1.

Figure 3-63

Figure 3-63 Example of Level 2 Child Routes

The IPv4 Route Lookup Process (3.5.3)

Now that you understand the structure of the routing table, this section will help you understand the routing table lookup process.

Route Lookup Process (3.5.3.1)

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.

Figure 3-64

Figure 3-64 Match Level 1 Routes

Specifically, the router proceeds as follows:

  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.

    In Figure 3-65, the router examines child routes (the subnet routes) of the parent route for a best match.

    Figure 3-65

    Figure 3-65 Match Level 2 Child Routes

  3. If there is a match with a level 2 child route, that subnet is used to forward the packet.
  4. If there is not a match with any of the level 2 child routes, proceed to the next step.

    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.

    Figure 3-66

    Figure 3-66 Match Supernet and Then Default Route

  5. If there is now a lesser match with a level 1 supernet or default routes, the router uses that route to forward the packet.
  6. If there is not a match with any route in the routing table, the router drops the packet.

Best Route = Longest Match (3.5.3.2)

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.

In Figure 3-67, a packet is destined for 172.16.0.10.

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.

Figure 3-67

Figure 3-67 Matches for Packets Destined to 172.16.0.10

Analyze an IPv6 Routing Table (3.5.4)

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.

IPv6 Routing Table Entries (3.5.4.1)

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.

Figure 3-68

Figure 3-68 Reference IPv6 Topology

Notice that in the topology:

  • 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.

Directly Connected Entries (3.5.4.2)

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-69

Figure 3-69 IPv6 Routing Table of R1

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

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).
  • Directly connected network: The IPv6 address of the directly connected network.
  • Administrative distance: Identifies the trustworthiness of the route source. IPv6 uses the same distances as IPv4. A value of 0 indicates the best, most trustworthy source.
  • 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.

    Figure 3-71

    Figure 3-71 Directly Connected Routes on R1

Remote IPv6 Network Entries (3.5.4.3)

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-72

Figure 3-72 Remote Networks Entries on R1

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

Figure 3-73 Remote Networks Entries on R1

The entry identifies the following information:

  • Route source: Identifies how the route was learned. Common codes include O (OSPF), D (EIGRP), R (RIP), and S (Static route).
  • Destination network: Identifies the address of the remote IPv6 network.
  • Administrative distance: Identifies the trustworthiness of the route source. IPv6 uses the same distances as IPv4.
  • 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.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020