How to configure RIP v2
Basic RIP Configuration
On this page we'll look at:
Lets use the network topology below for example:
Configuring RIP v2 on a Network.
HQ#configure terminal
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.3.0
Router(config-router)#network 192.168.4.0
Router(config-router)#network 172.16.1.0
Router(config-router)#network 172.16.2.0
Router(config-router)#no auto-summary
Router(config-router)#end
From the command above, all other routers on the network must be configured the same way, each router must declare its directly connected network to be seen by other routers on the network.
Redistributing Static Routes into RIP
You want RIP to redistribute static routes that you have configured on your router it works on both versions, make sure you include the version during your configuration.
The redistribute static command tells RIP to forward static routes in addition to the directly connected routes and the routes that have been learned from other RIP routers, which it forwards by default:
Router1#configure terminal
HQ(config)#ip route 192.168.2.0 255.255.255.0 172.16.1.2
HQ(config)#router rip
HQ(config-router)#redistribute static
HQ(config-router)#end
HQ#
You can characterize how these routes will appear to other routers when they are redistributed:
Router1#configure terminal
HQ(config)#ip route 192.168.2.0 255.255.255.0 172.16.1.2
HQ(config)#router rip
HQ(config-router)#redistribute static metric 4
HQ(config-router)#distribute-list 7 out static
HQ(config-router)#exit
HQ(config)#access-list 7 permit 192.168.2.0
HQ(config)#end
HQ#
Explaination:
One of the potential problems that network administrators do encounter with redistributing routes into RIP enabled network comes from the breaking down of network class boundaries. RIP is classful, so you have to be rather careful about how you distribute routing information from other sources that may be classless. In the above example, Router1 or HQ (or any other hostname) redistributes a static route for the Class C network 192.168.2.0. Most times to redistribute a larger range (192.168.2.0 /22) there would be no displayed errors in the redistribution rather; the router would refuse to forward this route
To view the redistributed static route:
Router1#show ip rip database 192.168.2.0 255.255.255.0
192.168.20.0/24 redistributed
[5] via 0.0.0.0,
HQ#
After the configuration of the second example, use the show ip protocols to view information about the filtering. This command also tells you what protocols RIP is distributing;
Router1#show ip protocols
Creating a Default Route in RIP
You want RIP to propagate a default route.
One of the two ways to get RIP to propagate a default route is to use the default-information originate command.
The preferred method is as follows:
Router1#configure terminal
HQ(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2
HQ(config)#router rip
Router(config-router)#version 2
HQ(config-router)#default-information originate
HQ(config-router)#end
HQ#
Another method is using redistribute static; you will accomplish the same thing:
Router1#configure terminal
HQ(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2
HQ(config)#access-list 7 permit 0.0.0.0
HQ(config)#router rip
HQ(config-router)#version 2
HQ(config-router)#redistribute static
HQ(config-router)#distribute-list 7 out static
HQ(config-router)#end
HQ#
Disabling RIP on an Interface
You want to prevent an interface from participating in RIP.
You don’t want an interface to participate in RIP, use the following set of commands:
Router1#configure terminal
HQ(config)#access-list 10 deny any
HQ(config)#router rip
Router(config-router)#version 2
HQ(config-router)#passive-interface FastEthernet0/1
HQ(config-router)#distribute-list 10 in FastEthernet0/1
HQ(config-router)#end
HQ#
Reasons to disable RIP on a particular interface.
a.), If another protocol is running on a particular interface, the additional RIP traffic could consume important bandwidth resources.
b.), There may be devices on a particular network segment that you do not trust. In this case, you want to make sure that you don't allow this device or equipment distribute routing information into your network.
.