contact@embeddedgeeks.com
Embedded World

Configuring RIPv2

Configuring RIPv2 is a pretty straightforward process. Only three steps are required:

1. enabling RIP by using the router rip global configuration command
2. instructing the router to use RIPv2 by typing the version 2 command
3. telling RIP which networks to advertise by using one or more network commands.

The first two commands are easy to comprehend, but the last command requires a little bit more thought. With the network command, you specify which interfaces will participate in the routing process. This command takes a classful network as a parameter and enables RIP on the corresponding interfaces. Let’s configure our sample network to use RIP.

rip topology

Router R1 and R2 have directly connected subnets. We want to include these subnets in the RIP routing process. To do that, we first need to enable RIP on both routers and then advertise these subnets using the network command.

On router R1, in the global configuration mode, enter the router rip command to enable RIP. In the RIP configuration mode, change the version of the protocol to 2 by using the version 2 command. Next, use the network 10.0.0.0 command to include the Fa0/1 interface on the router R1 in the routing process. Remember, the network command takes a classful network number as a parameter, so in this case, every interface that has an IP address that begins with 10 will be included in the RIP process (IP addresses that begins with 10 are, by default, the class A addresses and have the default subnet mask of 255.0.0.0). For instance, if another interface on the router had the IP address of 10.1.0.1 it would also be included in the routing process with the network command. You also need to include the link between the two routers in the RIP routing process. This is done by adding another network statement, network 172.16.0.0.

So, the configuration on R1 should look like this:

router1 rip configuration

The configuration on R2 looks similar, but with different network number for the directly connected subnet:

router2 rip configuration

You can verify that router R1 have a route to the R2’s directly connected subnet by typing the show ip route command:

show ip route rip

The legend lists R for all RIP routes in the routing table. Also note that the administrative distance of 120 is shown, together with the metric of 1.

Passive-Interface Command

Consider the following example network with RIP turned on:

RIP example network

The RIP configuration on R2 looks like this:

 router rip
 version 2
 network 10.0.0.0
 network 192.168.0.0

As we’ve already mentioned, the network command does two things:

  • advertises the defined network in RIP.
  • activates RIP on the interfaces whose addresses fall within the specified classful networks.

So in the example network above, RIP will also be activated on the interface connected to the workstation on the right. This means that the workstation will also receive RIP updates, which is pointless. To prevent this from happening, the passive-interface command is used:

R2(config)#router rip
R2(config-router)#passive-interface Gi0/1

Now, the RIP process will no longer send RIP updates out of the Gi0/1 interface. However, all received RIP updates will be processed and the subnet 10.0.0.0/24 will still be advertised.