Classful routing protocols can still be used in some of today’s
networks, but because they do not include the subnet mask,
they cannot be used in all situations. Classful routing protocols
cannot be used when a network is subnetted using more than
one subnet mask. In other words, classful routing protocols do
not support variable-length subnet masking (VLSM).
Other limitations come into play with classful routing protocols,
including their inability to support discontiguous networks and
supernets. Classful routing protocols include Routing
Information Protocol version 1 (RIPv1) and Interior Gateway
Routing Protocol (IGRP). CCNA exam topics do not include
either RIPv1 or IGRP.
Classless Routing Protocols
Classless routing protocols include the subnet mask with the
network address in routing updates. Today’s networks are no
longer allocated based on class, and the subnet mask cannot be
determined by the value of the first octet. Classless routing
protocols are required in most networks today because of their
support for VLSM and discontiguous networks and supernets.
Classless routing protocols include Routing Information
Protocol version 2 (RIPv2), Enhanced IGRP (EIGRP), Open
Shortest Path First (OSPF), Intermediate System-to-
Intermediate System (IS-IS), and Border Gateway Protocol
(BGP).
DYNAMIC ROUTING METRICS
In some cases, a routing protocol learns of more than one route
to the same destination from the same routing source. To select
the best path, the routing protocol must be capable of
evaluating and differentiating among the available paths. A
metric is used for this purpose. Two different routing protocols
might choose different paths to the same destination because
they use different metrics. Metrics used in IP routing protocols
include the following:
• RIP—Hop count: The best path is chosen by the route
with the lowest hop count.
• IGRP and EIGRP—Bandwidth, delay, reliability,
and load: The best path is chosen by the route with the
smallest composite metric value calculated from these
multiple parameters. By default, only bandwidth and delay
are used.
• IS-IS and OSPF—Cost: The best path is chosen by the
route with the lowest cost. The Cisco implementation of
OSPF uses bandwidth to determine the cost.
The metric associated with a certain route can best be viewed
using the show ip route command. The metric value is the
second value in the brackets for a routing table entry. In
Example 19-1, R2 has a route to the [Link]/24 network
that is two hops away.
Example 19-1 Routing Table for R2
R2# show ip route
<output omitted>
Gateway of last resort is not set
R [Link]/24 [120/1] via [Link], 00:00:20, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/24 is directly connected, Serial0/0/0
L [Link]/32 is directly connected, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/24 is directly connected, GigabitEthernet0/0
L [Link]/32 is directly connected, GigabitEthernet0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/24 is directly connected, Serial0/0/1
L [Link]/32 is directly connected, Serial0/0/1
R [Link]/24 [120/1] via [Link], 00:00:25, Serial0/0/1
R [Link]/24 [120/1] via [Link], 00:00:20, Serial0/0/0
[120/1] via [Link], 00:00:25, Serial0/0/1
R [Link]/24 [120/1] via [Link], 00:00:25, Serial0/0/1
R [Link]/24 [120/2] via [Link], 00:00:25, Serial0/0/1
Notice in the output that one network, [Link]/24, has two
routes. RIP will load balance between these equal-cost routes.
All the other routing protocols are capable of automatically load
balancing traffic for up to four equal-cost routes, by default.
EIGRP is also capable of load balancing across unequal-cost
paths.
ADMINISTRATIVE DISTANCE
Sometimes a router learns a route to a remote network from
more than one routing source. For example, a static route might
have been configured for the same network/subnet mask that
was learned dynamically by a dynamic routing protocol, such as
RIP. The router must choose which route to install.
Although it is less common, more than one dynamic routing
protocol can be deployed in the same network. In some
situations, it might be necessary to route the same network
address using multiple routing protocols, such as RIP and
OSPF. Because different routing protocols use different metrics
—for example, RIP uses hop count and OSPF uses bandwidth—
it is not possible to compare metrics to determine the best path.
Administrative distance (AD) defines the preference of a routing
source. Each routing source—including specific routing
protocols, static routes, and even directly connected networks—
is prioritized in order of most preferable to least preferable,
using an AD value. Cisco routers use the AD feature to select the
best path when they learn about the same destination network
from two or more different routing sources.
The AD value is an integer value from 0 to 255. The lower the
value, the more preferred the route source. An administrative
distance of 0 is the most preferred. Only a directly connected
network has an AD of 0, which cannot be changed. An AD of
255 means the router will not believe the source of that route,
and it will not be installed in the routing table.
In the routing table in Example 19-1, the AD value is the first
value listed in the brackets. You can see that the AD value for
RIP routes is 120. You can also verify the AD value with the
show ip protocols command, as Example 19-2 demonstrates.
Example 19-2 Verifying the AD Value with the show ip
protocols Command
R2# show ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 21 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 1 1 2
Serial0/0/0 1 1 2
Serial0/0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
[Link]
[Link]
[Link]
Routing Information Sources:
Gateway Distance Last Update
[Link] 120 00:00:01
[Link] 120 00:00:01
Distance: (default is 120)
R2#
Table 19-2 shows the different administrative distance values
for various routing protocols.
Table 19-2 Default Administrative Distances
IGP COMPARISON SUMMARY
Table 19-3 compares several features of the IGPs that are
currently most popular: RIPv2, OSPF, and EIGRP.
Table 19-3 Comparing Features of IGPs: RIPv2, OSPF,
and EIGRP
ROUTING LOOP PREVENTION
Without preventive measures, distance vector routing protocols
can cause severe routing loops in a network. A routing loop is a
condition in which a packet is continuously transmitted within a
series of routers without ever reaching its intended destination
network. A routing loop can occur when two or more routers
have inaccurate routing information to a destination network.
Several mechanisms are available to eliminate routing loops,
primarily with distance vector routing protocols. These
mechanisms include the following: