Routing Information Protocol (RIP) 263
RIP Timers
RIP uses three different kinds of timers to regulate its performance:
Route update timer Sets the interval (typically 30 seconds) between
periodic routing updates, in which the router sends a complete copy of its
routing table out to all neighbors.
Route invalid timer Determines the length of time that must expire (90
seconds) before a router determines that a route has become invalid. It
will come to this conclusion if it hasn’t heard any updates about a partic-
ular route for that period. When that happens, the router will send out
updates to all its neighbors letting them know that the route is invalid.
Route flush timer Sets the time between a route becoming invalid and
its removal from the routing table (240 seconds). Before it is removed
from the table, the router notifies its neighbors of that route’s impending
doom. The value of the route invalid timer must be less than that of the
route flush timer. This is to provide the router with enough time to tell its
neighbors about the invalid route before the routing table is updated.
Configuring RIP Routing
To configure RIP routing, just turn on the protocol with the router rip
command and tell the RIP routing protocol which networks to advertise.
That’s it. As an example, let’s configure our four-router internetwork with
RIP routing.
2621A
RIP has an administrative distance of 120. Static routes have an administrative
distance of 1 by default and, since you currently have static routes configured,
the routing tables won’t be propagated with RIP information. The first thing
you need to do is to delete the static routes off each router. This is done with
the no ip route command. Notice that in the 2621A router output below
you must type the whole ip route command to delete the entry.
2621A#config t
Enter configuration commands, one per line. End with
are in the routing table with a better administrative distance than 120, you
can add RIP. Again, if you do not remove the static routes, RIP routes will
never be used on the router.
2501A#config t
Enter configuration commands, one per line. End with
CNTL/Z.
2501A(config)#no ip route 172.16.30.0 255.255.255.0
172.16.20.2
2501A(config)#no ip route 172.16.40.0 255.255.255.0
172.16.20.2
2501A(config)#no ip route 172.16.50.0 255.255.255.0
172.16.20.2
2501A(config)#router rip
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
Routing Information Protocol (RIP) 265
2501A(config-router)#network 172.16.0.0
2501A(config-router)#^Z
2501A#
It doesn’t get much easier than this.
2501B
The 2501B router had only two static routes. Once you remove those, you
can turn on RIP routing.
2501B#config t
Enter configuration commands, one per line. End with
CNTL/Z.
2501B(config)#no ip route 172.16.10.0 255.255.255.0
172.16.20.1
2501B(config)#no ip route 172.16.50.0 255.255.255.0
172.16.40.2
Each routing table should now have the routers’ directly connected routes as
well as RIP-injected routes received from neighbor routers.
The router output below shows the contents of the 2621A routing table.
2621A#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M – [output cut]
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 5 subnets
R 172.16.50.0 [120/3] via 172.16.10.2, FastEthernet0/0
R 172.16.40.0 [120/2] via 172.16.10.2, FastEthernet0/0
R 172.16.30.0 [120/2] via 172.16.10.2, FastEthernet0/0
R 172.16.20.0 [120/1] via 172.16.10.2, FastEthernet0/0
C 172.16.10.0 is directly connected, FastEthernet0/0
2621A#
In this output, notice that the routing table has the same entries that the
routing tables had when you were using static routes. However, the R means
that the networks were added dynamically using the RIP routing protocol.
The [120/3] is the administrative distance of the route (120) along with the
number of hops to that remote network (3).
The next router output displays the routing table of the 2501A routers.
2501A#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M – [output cut]
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 5 subnets
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
Routing Information Protocol (RIP) 267
R 172.16.50.0 [120/2] via 172.16.20.2, 00:00:11, Serial0
R 172.16.40.0 [120/1] via 172.16.20.2, 00:00:11, Serial0
R 172.16.30.0 [120/1] via 172.16.20.2, 00:00:11, Serial0
C 172.16.20.0 is directly connected, Serial0
IP Routing
RIP has worked well in our little internetwork. However, since this tech-
nique has a maximum hop count of only 15 hops (where 16 is deemed
unreachable) and performs full routing-table updates every 30 seconds, it
can cause havoc on a larger internetwork.
Holding Down RIP Propagations
You may not want your RIP network advertised everywhere on your LAN
and WAN. For instance, there is no advantage to advertising your RIP net-
work to the Internet.
There are a few different ways to stop unwanted RIP updates from prop-
agating across your LANs and WANs. The easiest way to do this is through
the passive-interface command. This command prevents RIP update
broadcasts from being sent out a defined interface, but that same interface
can still receive RIP updates.
The following is an example of how to configure a passive-interface
on a router:
RouterA#config t
RouterA(config)#router rip
RouterA(config-router)#network 10.0.0.0
RouterA(config-router)#passive-interface serial 0
The above command will stop RIP updates from being propagated out
serial interface 0, but serial interface 0 can still receive RIP updates.
Interior Gateway Routing Protocol (IGRP)
Interior Gateway Routing Protocol (IGRP) is a Cisco proprietary
distance-vector routing protocol. This means that all your routers must be
Cisco routers to use IGRP in your network. Cisco created this routing pro-
tocol to overcome the problems associated with RIP.
IGRP has a maximum hop count of 255 with a default of 100. This is
helpful in larger networks and solves the problem of there being only 15
hops maximum possible in a RIP network. IGRP also uses a different metric
as in RIP routing except that IGRP uses an AS number. This number adver-
tises only to routers you want to share routing information with.
IGRP can load balance up to six unequal links. RIP networks must have
the same hop count to load balance, whereas IGRP uses bandwidth to deter-
mine how to load balance. To load balance over unequal-cost links, the
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
270 Chapter 5
IP Routing
variance command controls the load balancing between the best metric and
the worst acceptable metric.
There are two more commands that are used to help control traffic dis-
tribution among IGRP load-sharing routes: traffic-share balanced and
traffic-share min.
The router output below shows the options available under the router
igrp as command prompt.
Router(config-router)#variance ?
<1-128> Metric variance multiplier
Router(config-router)#traffic-share ?
balanced Share inversely proportional to metric
min All traffic shared among min metric paths
The router output above shows the variance command, which is the
available metric multiplier. The traffic-share output shows the two
options: balanced and min. The traffic-share balanced command tells
the IGRP routing protocol to share inversely proportional to the metrics,
and the traffic-share min command tells the IGRP routing process to use
routes that have only minimum costs.
The load balancing and traffic sharing are covered more in depth in Sybex’s
CCNP: Routing Study Guide.
2501A#config t
Enter configuration commands, one per line. End with
CNTL/Z.
2501A(config)#router igrp 10
2501A(config-router)#netw 172.16.0.0
2501A(config-router)#^Z
2501A#
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
272 Chapter 5
IP Routing
2501B
To configure 2501B, you need, once again, to turn on IGRP using AS 10.
2501B#config t
Enter configuration commands, one per line. End with
CNTL/Z.
2501B(config)#router igrp 10
2501B(config-router)#netw 172.16.0.0
2501B(config-router)#^Z
2501B#
2501C
The last router is 2501C; you need to use AS 10 as well.
2501C#config t
Enter configuration commands, one per line. End with
CNTL/Z.
2501C(config)#router igrp 10
2501C(config-router)#netw 172.16.0.0
2501C(config-router)#^Z
RouterC#
2501A#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M –
[output cut]
U - per-user static route, o - ODR
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 5 subnets
I 172.16.50.0 [100/160350] via 172.16.20.2, 00:00:49, Serial0
I 172.16.40.0 [100/160250] via 172.16.20.2, 00:00:49, Serial0
I 172.16.30.0 [100/158350] via 172.16.20.2, 00:00:49, Serial0
C 172.16.20.0 is directly connected, Serial0
C 172.16.10.0 is directly connected, Ethernet0
2501A#
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
274 Chapter 5
IP Routing
The following router output shows the 2501B routing table.
2501B#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M –
[output cut]
U - per-user static route, o - ODR
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 5 subnets
I 172.16.50.0 [100/8576] via 172.16.40.2, 00:01:11, Serial1
C 172.16.40.0 is directly connected, Serial1
C 172.16.30.0 is directly connected, Ethernet0
C 172.16.20.0 is directly connected, Serial0
I 172.16.10.0 [100/158350] via 172.16.20.1, 00:00:36, Serial0
2501B#
debug ip igrp events
debug ip igrp transactions
The Show Protocols Command
The show protocols command is useful because it shows you the Network
layer addresses configured on each interface.
2501B#sh protocol
Global values:
Internet Protocol routing is enabled
Ethernet0 is up, line protocol is up
Internet address is 172.16.30.1/24
Serial0 is up, line protocol is up
Internet address is 172.16.20.2/24
Serial1 is up, line protocol is up
Internet address is 172.16.40.1/24
2501B#
The output above shows the IP address of the Ethernet 0, serial 0, and
serial 1 interfaces of the 2501B router. If IPX or AppleTalk were configured
on the router, those network addresses would have appeared as well.
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
276 Chapter 5
IP Routing
The Show IP Protocol Command
The show ip protocol command shows you the routing protocols that are
configured on your router. Notice in the following output that both RIP and
IGRP are running on the router, but only IGRP appears in the routing table
because of its lower administrative distance.
Verifying Your Configurations 277
The router output below shows the IGRP routing information. The
default update timer is 90 seconds by default, and the administrative dis-
tance is 100.
Routing Protocol is "igrp 10"
Sending updates every 90 seconds, next due in 42 seconds
Invalid after 270 seconds, hold down 280, flushed after
630
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
IGRP maximum hopcount 100
IGRP maximum metric variance 1
Redistributing: eigrp 10, igrp 10
Routing for Networks:
172.16.0.0
Routing Information Sources:
Gateway Distance Last Update
172.16.40.2 100 00:00:47
172.16.20.1 100 00:01:18
Distance: (default is 100)
The information included in the show ip protocols command includes
the AS, routing timers, networks being advertised, gateways, and adminis-
trative distance (100).
The invalid timer is set at 270 seconds; it is three times the update timer.
If a router update is not received in three update periods, the route is con-
sidered invalid. The holddown timer is 280, which is around three times the
update timer. This is the number of seconds a route is suppressed while wait-
Serial0 (172.16.20.2)
07:12:58: subnet 172.16.40.0, metric 1
07:12:58: subnet 172.16.30.0, metric 1
07:12:58: RIP: sending v1 update to 255.255.255.255 via
Serial1 (172.16.40.1)
07:12:58: subnet 172.16.30.0, metric 1
07:12:58: subnet 172.16.20.0, metric 1
2501B#undebug all
All possible debugging has been turned off
2501B#
To turn off debugging, use the undebug all or the no debug all com-
mand. You can also use the un all shortcut command.
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
Verifying Your Configurations 279
The Debug IP IGRP Command
With the debug ip igrp command, there are two options, events and
transactions, as shown in the router output below:
2501B#debug ip igrp ?
events IGRP protocol events
transactions IGRP protocol transactions
The difference between these commands is explained in the following
sections.
The Debug IP IGRP Events Command
The debug ip igrp events command is a summary of the IGRP routing
information that is running on the network. The following router output
shows the source and destination of each update as well as the number of
routers in each update. Information about individual routes is not generated
with this command.
2501B#debug ip igrp events
router towards that neighbor router.
In the following output, a request was received from a neighbor router on
network 172.16.40.2 to serial 1 of 2501B. The 2501B router responded with
an update packet.
2501B#debug ip igrp transactions
IGRP protocol debugging is on
07:14:05: IGRP: received request from 172.16.40.2 on
Serial1
07:14:05: IGRP: sending update to 172.16.40.2 via Serial1
(172.16.40.1)
07:14:05: subnet 172.16.30.0, metric=1100
07:14:05: subnet 172.16.20.0, metric=158250
07:14:05: subnet 172.16.10.0, metric=158350
07:14:06: IGRP: received update from 172.16.40.2 on
Serial1
07:14:06: subnet 172.16.50.0, metric 8576 (neighbor
1100)
2501B#un all
All possible debugging has been turned off
2501B#
You can turn off the command with the undebug all command (un al
for short).
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
Summary 281
Summary
This chapter covered IP routing in detail. It is important that you
understand the basics covered in this chapter because everything that is done
on a Cisco router must have some type of IP routing configured and running.
This chapter covered the following topics:
IP Routing
Commands in This Chapter
Command Description
show ip route
Displays the IP routing table
IP route
Creates static and default routes
on a router
IP classless
Is a global configuration command
used to tell a router to forward
packets to a default route when the
destination network is not in the
routing table
router RIP
Turns on IP RIP routing on a
router
costs
show protocols
Shows the routed protocols and
network addresses configured on
each interface
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
Commands in This Chapter 283
Command Description
show ip protocols Shows the routing protocols
and timers associated with each
routing protocol configured on
a router
debug ip rip Sends console messages displaying
information about RIP packets
being sent and received on a router
interface
debug ip igrp events Provides a summary of the IGRP
routing information running on
the network
debug ip igrp transactions Shows message requests from
neighbor routers asking for an
update and the broadcasts sent
from your router to that neighbor
router
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
284 Chapter 5
The following labs will be covered:
Lab 5.1: Creating Static Routes
Lab 5.2: Dynamic Routing with RIP
Lab 5.3: Dynamic Routing with IGRP
Figure 5.9 will be used to configure all routers.
FIGURE 5.9 Hands-on lab internetwork
Lab 5.1: Creating Static Routes
In this first lab, you will create a static route in all four routers so that the
routers see all networks. Verify with the Ping program when complete.
1. The 2621 router is connected to network 172.16.10.0/24. It does not
know about networks 172.16.20.0/24, 172.16.30.0/24, 172.16.40.0/24,
and 172.16.50.0/24. Create static routes so that the 2621 router can see
all networks, as shown here.
2621#config t
2621(config)#ip route 172.16.20.0 255.255.255.0
172.16.10.1
2621(config)#ip route 172.16.30.0 255.255.255.0
172.16.10.1
172.16.10.0 172.16.20.0
172.16.30.0
172.16.40.0 172.16.50.0
S0E0
2501A
F0/0
2621A
S1S0
E0
2501B
E0S0
2501C
RouterB#config t
RouterB(config)#ip route 172.16.10.0 255.255.255.0
172.16.20.1
RouterB(config)#ip route 172.16.50.0 255.255.255.0
172.16.40.2
The first command told Router B that to get to network 172.16.10.0/24,
it needs to use 172.16.20.1. The next command told Router B to get
to network 172.16.50.0/24 through 172.16.40.2.
Save the current configuration for Router B by going to the enable
mode, typing copy run start, and pressing Enter.
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com
Hands-on Labs 287
6. Router C is connected to networks 172.16.50.0/24 and 172.16.40.0/
24. It does not know about networks 172.16.30.0/24, 172.16.20.0/
24, and 172.16.10.0/24. Create static routes so that Router C can see
all networks, as shown here.
RouterC#config t
RouterC(config)#ip route 172.16.30.0 255.255.255.0
172.16.40.1
RouterC(config)#ip route 172.16.20.0 255.255.255.0
172.16.40.1
RouterA(config)#ip route 172.16.10.0 255.255.255.0
172.16.40.1
Save the current configuration for Router C by going to the enable
mode, typing copy run start, and pressing Enter.
Now ping from each router to your hosts and from each router to each
router. If it is set up correctly, it will work.
Lab 5.2: Dynamic Routing with RIP
In this lab, we will use the dynamic routing protocol RIP instead of static and