Vous êtes sur la page 1sur 6

ETTI. Lab: RIP (V1.

2)

Octavian Catrina, 2014

Lab: IP Routing Using RIP


Overall objective
The purpose of this lab is to study distance vector routing using the intra-domain routing protocol RIP
(Routing Information Protocol). The current specification of the protocol, RIP version 2 (RIPv2), is available in
RFC 2453.
Prerequisites
You should be familiar with the basic concepts and operation of IP networks, distance vector routing, and the
RIP protocol. A comprehensive description of distance vector routing and RIP is available in RFC 2453 and
in the course material. Review this documentation before the lab.
Case study
In this lab, you'll carry out a series of experiments in order to study router configuration for IP and RIPv2, as
well as the operation of these protocols. You'll use for this purpose an IP network with the topology shown in
Figure 1. The network consists of Cisco routers interconnected by Ethernet multi-access links (Ethernet
switches) and serial point-to-point links.

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

ETTI. Lab: RIP (V1.2)

Octavian Catrina, 2014

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 [...]

1. Preliminary Network Setup


We use the network shown in Figure 1 for all the experiments carried out in this lab. The instructions given in
the following assume that the experiments are carried out using the network emulator GNS3.
1.1. Load the initial GNS project.
You start with a GNS project that contains the network topology shown in Figure 1. The initial router
configuration contains only the host name and default settings.
1.2. Start the routers and check the CPU load.
Start a router using GNS (right-click on the router and select Start) and then check the CPU load (on
Windows, start the Task Manager and select the Performance tab). Wait until the router boots up.
If the CPU load does not decrease to a low level, adjust the Idle PC parameter (right-click on the router and
select Idle-PC); ask the instructor if necessary.
Then start the entire network, and check that the CPU load falls to a low level once all routers boot up.
1.3. Start router consoles.
Start consoles for all the 5 routers using GNS (use the Console button in the toolbar or right-click on the
router and select Console). In each console window you should see the Cisco CLI prompt router-name#
for privileged mode, that allows you to enter any command for configuring the router or examining its status.
1.4. Start packet capture.
Start packet capture on the interface e0/0 of router RC using GNS (right-click on the link and select Start
capturing). We'll examine the captured packets later on during the experiments.
For each step, verify if the current router configuration and operation are correct, then save the configuration
and the GNS project, before proceeding to the next step. To speed up the configuration process, edit at each
step the batches of commands for all the routers you configure using a text editor, and then copy each batch
from the text editor to the router's console window (right-click).

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.

ETTI. Lab: RIP (V1.2)

Octavian Catrina, 2014

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

Enter global configuration mode.


Enter interface configuration mode for e0/0.
Configure the IP address and mask for e0/0.
Turn on the interface.
Similar for the other interfaces.

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

Show the status of the interface if-name.


Example: show int e0/0

show ip interface brief

Summary of the IP configuration and the current


status of all the interfaces.

- 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 the routing table.

show ip protocols

Show the active routing protocols and their status.

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. RIP Configuration and Operation


We now configure the RIPv2 routing protocol and start RIP on all routers.
3.1. Configure RIPv2.
We first configure RIP without automatic route summarization (we'll add route summarization later on).
The sequence of configuration commands for the router RC is listed below; the configuration of the other
routers is similar.
conf term
router rip
version 2
no auto-summary
network 172.16.0.0
network 172.17.0.0

Enter global configuration mode.


Enter RIP config. mode, start RIP process.
Set RIP version 2.
Disable route summarization.
Activate RIP routing for 172.16.0.0/16.
Activate RIP routing for 172.17.0.0/16.

3.2. Verify the router configuration (show run), save it (copy run start), then save the GNS project.

ETTI. Lab: RIP (V1.2)

Octavian Catrina, 2014

3.3. Examine the current RIP status.


Examine the status of the routers after RIP configuration using the following command:
show ip protocols

Show the active routing protocols and their status.

- Is RIP running? Is it enabled for all the directly connected networks?


- Does it report as routing information sources all the neighbor routers?
- What is the purpose of the RIP timers listed by this command?
3.4. Examine the routing table (show ip route).
- Does the routing table contain routes to all destinations? Which routes are provided by RIP?
- The path metric (cost) used by RIP is the number of hops to the destination. Check if the routes' path
metric, interface, and next hop correspond indeed to the shortest paths.
The path metric of a route is displayed as a pair of values, e.g., [120/2]. The second value is the actual
RIP metric (the first value is an administrative metric used to select among different route information
sources, e.g., routes provided by different routing protocols or static routes).
- Determine by examining the routing table what happens when RIP discovers several alternate paths to
a destination, with the same cost and with different costs.
3.5. Test network connectivity and paths.
Test connectivity between the routers RA and RE using the command:
ping 172.18.1.1.
Determine the path used to forward packets from RA to RE using the command:
traceroute ip 172.18.1.1.
Is it the shortest path?

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

ETTI. Lab: RIP (V1.2)

Octavian Catrina, 2014

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.

5. Recovery After Link Failure


The next experiments allow you to see how RIP updates the routing tables when the network topology
changes. As in the previous experiments, you can view the RIP messages using either the debug command,
or the protocol analyzer.
5.1. Link failure without alternate routes:172.16.1.0/24 becomes unreachable.
- Start RIP debugging on RC (debug ip rip).
- Shut down the interface e1/0 of the router RA using the commands:
conf term
int e1/0
shutdown
- Examine the routing tables and check what happens to the route to 172.16.1.0/24.
- Stop RIP debugging on RC when the entry for the destination 172.16.1.0/24 is removed from the
periodic updates (undebug all). Examine the RIP messages received and sent by RC.
How does RC learn about the incident? How does it propagate this information? (Hint: Look for flash
updates.) What do the neighbor routers advertise for this unreachable destination? For how long do they
advertise it in the distance vectors?
- Start again RIP debugging on RC (debug ip rip).
- Turn on the interface e1/0 of the router RA using the commands:
conf term
int e1/0
no shutdown
- Examine the routing tables and check what happens to the route to 172.16.1.0/24.
- Stop RIP debugging on RC when the entry for destination 172.16.1.0/24 appears in the periodic updates
(undebug all). Examine the RIP messages received and sent by RC.
How does RC learn that 172.16.1.0/24 has become reachable again? How does it propagate this
information? (Hint: Look for flash updates.)
5.2. Link failure with alternate routes: failed link between RA and RC.
In this experiment, you'll disable the link between RA and RC and use ping to test the connectivity
between RA and RE while RIP updates the routing tables.
- Examine the route to 172.16.1.0/24 on RD (show ip route).
- Execute on RE the command: ping 172.16.1.1 repeat 100.
- Shut down the interface s0/1 of the router RA. The output of ping will show a temporary loss of
connectivity between RE and RA (it takes some time to update all the routing tables). Check on RD what
happens to the route to 172.16.1.0/24.
- Execute again on RE the command: ping 172.16.1.1 repeat 100.
- Turn on the interface s0/1 of the router RA. Check on RD what happens to the route to 172.16.1.0/24.
Does ping show some loss of connectivty?
5.3. Router failure (router RA).
- Start RIP debugging on RD.
- Suspend the router RA using GNS (right-click on RA and select Suspend).
- Stop RIP debugging on RD when RIP stops advertises the unreachable networks. Examine the
messages sent and received by RD. How does RD learn that RA failed? How does RD propagate this
5

ETTI. Lab: RIP (V1.2)

Octavian Catrina, 2014

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

Enter global configuration mode.


Enter RIP config. mode.
Enable route summarization.

6.2. Examine the routing tables.


What has changed in the routing tables after enabling route summarization?