2)
Figure 1. IP network used for experiments with the routing protocol RIP.
Summary of learning objectives
You will set up the network shown in Figure 1 and study the following topics:
IP and RIP configuration on Cisco routers.
IP addressing and packet forwarding.
Distance vector routing and RIP operation in typical situations (including topology changes).
You will learn how the protocols work by examining the status of the routers using Cisco IOS commands and
by studying the exchanged packets using a protocol analyzer.
Overview of Cisco IOS Commands for IP and RIP Configuration
This section provides a quick reference for the Cisco IOS commands that will be used in the lab to configure
RIP, examine the router status (protocol configuration and operation), and troubleshooting.
- Enter RIP configuration mode:
router(config)#router rip
- Set RIP version 2:
router(config-router)#version 2
The default RIP version is 1.
- Activate RIP for a network prefix (and associated interfaces):
1
router(config-router)#network address
Example: network 172.16.0.0 activates RIP for interfaces connected to subnets of 172.16.0.0/16.
- Disable route auto-summary (aggregation):
router(config-router)#no auto-summary
Route auto-summary is enabled in the default configuration of RIPv2.
- Examine IP routing protocols and routing table:
router# show ip protocols
router# show ip route
- RIP debugging:
router# debug ip rip [...]
2. Basic IP Configuration
2.1. Configure IP on all routers according to Figure 1.
The sequence of configuration commands for the router RC is listed below; the configuration of the other
routers is similar.
conf term
interface e0/0
ip address 172.16.3.2 255.255.255.0
no shutdown
interface e0/1
ip address 172.17.1.1 255.255.255.0
no shutdown
interface s1/0
ip address 172.16.2.6 255.255.255.252
no shutdown
2.2. Verify the router configuration (show run), save it (copy run start), then save the GNS project.
2.3. Examine the status of the router interfaces using the commands listed below.
show interface if-name
- Are all the interfaces used in the network topology shown in Figure 1 working properly? (You should
see: interface if-name is up, line protocol is up.)
- Are the IP addresses of the interfaces correctly configured?
2.4. Examine the status of IP routing using the commands listed below.
show ip route
show ip protocols
The initial routing table of each router should contain only the routes to directly connected networks. We
haven't started any routing protocol so far, so the second command should display nothing.
3.2. Verify the router configuration (show run), save it (copy run start), then save the GNS project.
4. RIPv2 Messages
In the following, we'll take a closer look at what happens behind the scenes: the RIP messages that the
routers exchange in order to distribute routing information and build and maintain their routing tables. We
can use two methods for this purpose: the Cisco IOS debug command and a protocol analyzer.
Note that RIPv2 uses the multicast address 224.0.0.9 (link scope) to send routing information to all RIPv2aware routers on a network segment.
4.1. Start RIP debugging on RC using the command debug ip rip.
The console window of the router will display the updates sent and received by RIP. Wait 1-2 minutes,
until you see several periodic updates. Then stop debugging with the command undebug all.
- Examine the RIP interactions: Does RC send RIP updates on all the interfaces for which RIP is
enabled? Does it receive updates from all the neighbor routers?
- Examine the RIP distance vectors: Do they match the shortest paths from the advertising router to the
specified destination? Do the RIP updates follow the split horizon rule? Is the routing table derived from
these distance vectors according to (the RIP variant of) the distance vector routing algorithm?
4.2. Start the Wireshark protocol analyzer from GNS in order to examine the netwrok traffic captured so far
(right-click on the host name in the Captures window and select Wireshark). Set the filter expression rip in
the Wireshark filter toolbar, to select the RIP messages.
As you began capturing the traffic between RB and RC before starting RIP, you should see all the RIP
messages exchanged so far by these routers: initial Requests, followed by Response replies to the
Requests, and then periodic Response messages sent every 30 sec.
- How are the RIP messages encapsulated?
- What is the purpose of the initial Request messages?
- Examine the distance vectors in the initial sequence of Response messages. Notice how the distance
4
vectors sent by RC grow, as RC learns from its neighbors the routes to networks that are not directly
connected and propagates these routes to RB.
- How much time passes until router RC learns (using RIP) the routes to all the destinations?
- Examine the contents of the distance vectors in the Response messages sent by RIP.
information? Check also what happens to the routes to the subnets of 172.16.0.0/16.
- Start the router RA using GNS (right-click on RA and select Start).
- Check on RD what happens to the routes to the subnets of 172.16.0.0/16.
6. Route Summarization
RIPv2 supports route summarization (aggregation), which allows to reduce the size of the routing tables and
the amount of routing information exchanged (the size of the distance vectors). We disabled this feature in
our initial router configuration. In the next experiment, you'll enable it on all routers and examine the effects.
6.1. Enable auto-summary.
The sequence of configuration commands for the router RC is listed below; the configuration of the other
routers is similar.
conf term
router rip
auto-summary