background image
402 Chapter 6: Routing
the mask is shown only in the line referring to the network (as is the case in Example 6-20,
network 172.16.0.0). If the network uses VLSM, as network 10.0.0.0 appears to do because of
the route summarization done by Seville, then the mask information is listed on the lines
referring to each of the individual subnets.
Each routing entry lists the subnet number and the outgoing interface. In most cases, the next-
hop router's IP address is also listed. The outgoing interface is needed so that the router can
choose the type of data link header to use to encapsulate the packet before transmission on that
interface. The next-hop router's IP address is needed on interfaces for which the router needs
the IP address so that it can find the associated data link address to put in the newly built data
link header. For instance, knowing the next-hop IP address of 172.16.3.252, Yosemite's IP
address on the Frame Relay VC allows Albuquerque to find the correlated DLCI in the Frame
Relay map.
The numbers in brackets in the show ip route output for each route are interesting. The second
number in brackets represents the metric value for this route. The first number defines the
administrative distance.
Administrative distance is important only if multiple IP routing protocols are in use in a single
router. When this is true, both routing protocols can learn routes to the same subnets. Because
their metric values are different (for example, hop count or a function of bandwidth and delay),
there is no way to know which routing protocol's routes are better. So, Cisco supplies a method
of defining which routing protocol's routes are better. The IOS implements this concept using
something called administrative distance.
Administrative distance is an integer value; a value is assigned to each source of routing
information. The lower the administrative distance, the better the source of routing information.
IGRP's default is 100, OSPF's is 110, RIP's is 120, and Enhanced IGRP's is 90. The value 100
in brackets in the show ip route output signifies that the administrative distance used for IGRP
routes is 100--in other words, the default value is in use. So, if RIP and IGRP are both used,
and if both learn routes to the same subnets, only IGRP's routing information for those subnets
will be added to the routing table. If RIP learns about a subnet that IGRP does not know about,
that route will be added to the routing table.
Moving down Example 6-20, the show ip route ? command lists several options, many of
which are shown in the ensuing commands in the example. Limiting the show ip route output
to the routes learned by a particular routing protocol can be accomplished by referring to that
routing protocol. Likewise, the output can be limited to just show connected routes.
One of the more important options for the show ip route command is to simply pass an IP
address as the last parameter. This tells the router to perform routing table lookup, just as it
would for a packet destined to that address. In Example 6-20, the show ip route 10.1.5.8 returns
a set of messages, the first of which identifies the route to 10.1.4.0/22 as the route matched in
the routing table. The route that is matched is listed so that you can always know the route that
would be used by this router to reach a particular IP address.
ch06.fm Page 402 Monday, March 20, 2000 5:11 PM