Routing Tables Explained

This document is designed to help those candidates who are preparing for the Cisco CCIE® Routing and Switching lab exam. The following topics are discussed: 1. Routing table structure 2. The routing table lookup process 3. Routing behavior in routed networks

1 Routing Tables Explained

Cisco Learning Network

www.cissco.com/go/learningnetwork

© 2009 Cisco Systems, Inc.

supernet route. . A parent route is a level 1 route. or network route.com/go/learningnetwork © 2009 Cisco Systems. Routing Table Structure Routing table entries come from the following sources : — Directly connected networks — Static routes — Dynamic routing protocols A Cisco IP routing table is a hierarchical structure. An ultimate route includes either a next-hop address or an exit interface. Child routes are level 2 routes. Level 1 routes have a subnet mask equal to or less than the classful mask of the network addresses. A parent route occurs any time a subnet is added to the routing table. — They are also considered ultimate routes. — They contain the route source and the network address of the route. — They are a subnet of a classful network address. A parent route does not contain a next-hop IP address or any exit interface information. Inc.1. 2 Routing Tables Explained Cisco Learning Network www. both child routes have the same subnet mask. It can be a default route. which speeds up the lookup process. In classful networks.cissco.

In Classless networks. .cissco.com/go/learningnetwork © 2009 Cisco Systems. Inc. child routes do not have to share the same subnet mask 3 Routing Tables Explained Cisco Learning Network www.

The following table compares classful with classless networks. .com/go/learningnetwork © 2009 Cisco Systems. Inc.cissco. The Term Variably Subnetted Is Seen in Parent Route in Routing Table Network Type Classful Classless Parent Route Classful Mask Is Displayed No Yes No Yes Includes the Number of Different Masks of Child Routes No Yes Subnet Mask Is Included with Each Child Route Entry No Yes 4 Routing Tables Explained Cisco Learning Network www.

— If there is a level 1 supernet or default route match. The router examines level 2 (child) routes. the packet is dropped.2.cissco. that subnet is used to forward the packet. — If there is no match. The router examines the longest match: level 1 network routes. The router determines classful or classless routing behavior. — If classless. If not. — If the best match is a level 1 ultimate route and is not a parent route. — If there is a match with a level 2 child route. The Routing Table Lookup Process The router examines level 1 routes. . this route is used to forward the packet. — The best match is the match that has the greatest number of leftmost bits matching between the destination IP address and the route in the routing table. — The best match is also known as the longest match.com/go/learningnetwork © 2009 Cisco Systems. 5 Routing Tables Explained Cisco Learning Network www. the packet is forwarded. the router searches for a level 1 supernet and default routes. — If classful. Inc. the packet is dropped. determine the routing behavior type.

What happens if there is no match with any level 2 child routes of the parent? The router must determine if the routing behavior is classless or classful. Inc. .cissco.com/go/learningnetwork © 2009 Cisco Systems. Routing Behavior in a Routed Network Classful routing behavior: The command no IP classless had been configured in the router.3. 6 Routing Tables Explained Cisco Learning Network www. — If the router is utilizing classful routing behavior. the lookup process is terminated and the packet is dropped.

The subnet mask of the destination is a /24. Inc.The following diagram is an example of when classful routing behavior is in effect. . and none of the leftmost bits of the child routes matches the first 24 bits.com/go/learningnetwork © 2009 Cisco Systems.cissco. 7 Routing Tables Explained Cisco Learning Network www. This means that the packet is dropped.

If there are no matches. 1) 2) 3) 4) Search level 1 routes for any matches. — After finding the match. If there is no match or no default route. If there are no matches.com/go/learningnetwork © 2009 Cisco Systems. the router searches the child route.Classless routing behavior works for discontiguous networks and classless interdomain routing (CIDR) supernets. because supernet and default routes can be used whenever they are needed. The router begins the search process by finding a match between the destination IP and the parent route.cissco. search default routes for any matches. Inc. Here is the route lookup process when the IP classless command is configured in the router. . 8 Routing Tables Explained Cisco Learning Network www. It is recommended that you use classless routing behavior. the packet is dropped. search supernet routes for any matches.