Working with Routing Information Protocol (RIP)
Routing Information Protocol (RIP) is designed to function on small to large networks but can suffer when a network is not designed to accommodate its eccentricities. The information presented focuses primarily on RIPv2, rather than on RIPv1, because with RIPv1, all systems must use class-based network masks or be subnetted exactly the same way. RIPv2, on the other hand, supports Variable Length Subnet Masks (VLSM).
If you choose to deploy network IDs across your network you will likely want to deploy VSLM in order to conserve addresses on your network. So, if you plan to deploy RIP as a protocol, you will likely use version 2.
The biggest issue with RIPv1 is that all systems must use class-based network masks or be subnetted exactly the same way, whereas RIPv2 supports Variable Length Subnet Masks (VLSM).
To work with the RIP commands, you start by enabling the protocol. However, before enabling the routing protocol, you need to enable IP routing, if you have not already done so, which you can see in Chapter 3 of this minibook.
As with most routing protocols, when you enable the RIP protocol, you will be placed in Router Configuration mode (config-router), so take note of the change in the configuration prompt during the following example. The main configuration requirement is the list of networks for which RIP will be routing.
The following enables routing for two connected networks, 192.168.1.0/24 and 192.168.10.0/24.
Router2>enable Password: Router2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router2(config)#ip routing Router2(config)#router rip Router2(config-router)#network 192.168.10.0 Router2(config-router)#network 192.168.1.0 Router2(config-router)#exit Router2(config)#exit
Following this command, RIP automatically starts sending out copies of its routing information for the two identified networks through all of its network interfaces. RIPv1 sends the copies via a broadcast, whereas RIPv2 performs a multicast to 188.8.131.52. For Router2 to receive updates, you also must enable RIP on Router1 with the following commands:
Router1>enable Password: Router1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#ip routing Router1(config)#router rip Router1(config-router)#network 192.168.5.0 Router1(config-router)#network 192.168.1.0 Router1(config-router)#exit Router1(config)#exit
At the same time, RIP receives the data from neighboring RIP routers at 30-second intervals. After this data is received, Router2 updates its routing table so that the new routing table looks like this:
Router2>enable Password: Router2#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set R 192.168.10.0/24 [120/1] via 192.168.1.1, 00:00:07, FastEthernet0/0 C 192.168.5.0/24 is directly connected, FastEthernet0/1 C 192.168.1.0/24 is directly connected, FastEthernet0/0 S 192.168.3.0/24 [1/0] via 192.168.1.1
The last routing table has several routes. Notably, the first listed route has an R identifier, which denotes that this route was ascertained via RIP.
The C identifies directly connected network segments, and the S identifies static routes.
Showing routes coming from a specific routing protocol
To see only the routes that come from specific routing protocols, you modify the show ip route command in the following manner. Now, only the directly connected interfaces and the RIP-provided routes are shown.
Router>enable Password: Router2#show ip route connected C 192.168.5.0/24 is directly connected, FastEthernet0/1 C 192.168.1.0/24 is directly connected, FastEthernet0/0 Router2#show ip route rip R 192.168.10.0/24 [120/1] via 192.168.1.1, 00:00:15, FastEthernet0/0
Configuring your RIP version
The version of RIP that is currently enabled allows receipt of RIPv1 and RIPv2 data, but it sends out only RIPv1 data. To configure this version of RIP to support only the more modern and flexible version 2, use the following command. Note that this setting has a lot of flexibility, because you can configure RIP to send and receive any combination of RIPv1 and RIPv2 data.
Router2>enable Password: Router2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router2(config)#ip routing Router2(config)#router rip Router2(config-router)#version 2 Router2(config-router)#no auto-summary Router2(config-router)#neighbor 192.168.1.1 Router2(config-router)#exit Router2(config)#exit
The preceding command also includes two other commands within the router configuration prompt:
auto-summary: RIPv2 supports the auto-summary feature, which automatically summarizes along classful boundaries. You can configure this behavior to use other network ranges in the interface configuration of your router, or you can completely disable auto-summary using the no auto-summary command in Router Configuration mode.
In Interface Configuration mode, you can use the command ip summary-address rip 10.1.0.0 255.255.0.0 to force the summarization to occur at a specific boundary rather than the Class A boundary. In this case, you would be forcing route summary to occur at the 10.1.0.0/16 boundary rather than the class boundary of 10.0.0.0/8.
neighbor: RIP detects neighbor routers, but this process can take time because RIP has to wait for advertisements from neighboring routers. You can use the neighbor to specify on this router what the neighbor routers are.
When you do this, rather than send a broadcast and multicast update, RIP sends unicast or directed RIP update messages. Configuring neighbors on each router takes a little more time, but reduces the network traffic associated with RIP by reducing the broadcast traffic.