RIP and RIPng Routing (3.3)
Although the use of RIP has decreased in the past decade, it is still important to your networking studies because it might be encountered in a network implementation. As well, understanding how RIP operates and knowing its implementation will make learning other routing protocols easier.
Configuring the RIP Protocol (3.3.1)
In this section, you will learn how to configure, verify, and troubleshoot RIPv2.
Router RIP Configuration Mode (3.3.1.1)
Although RIP is rarely used in modern networks, it is useful as a foundation for understanding basic network routing. For this reason, this section provides a brief overview of how to configure basic RIP settings and to verify RIPv2.
Refer to the reference topology in Figure 3-22 and the addressing table in Table 3-7.
Figure 3-22 RIP Reference Topology
Table 3-7 Addressing Table
Device |
Interface |
IP Address |
Subnet Mask |
R1 |
G0/0 |
192.168.1.1 |
255.255.255.0 |
|
S0/0/0 |
192.168.2.1 |
255.255.255.0 |
R2 |
G0/0 |
192.168.3.1 |
255.255.255.0 |
|
S0/0/0 |
192.168.2.2 |
255.255.255.0 |
|
S0/0/1 |
192.168.4.2 |
255.255.255.0 |
R3 |
G0/0 |
192.168.5.1 |
255.255.255.0 |
|
S0/0/1 |
192.168.4.1 |
255.255.255.0 |
In this scenario, all routers have been configured with basic management features and all interfaces identified in the reference topology are configured and enabled. There are no static routes configured and no routing protocols enabled; therefore, remote network access is currently impossible. RIPv2 is used as the dynamic routing protocol.
To enable RIP, use the router rip command to enter router configuration mode, as shown in the following output. This command does not directly start the RIP process. Instead, it provides access to the router configuration mode where the RIP routing settings are configured.
R1# conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)# router rip R1(config-router)#
To disable and eliminate RIP, use the no router rip global configuration command. This command stops the RIP process and erases all existing RIP configurations.
Figure 3-23 displays a partial list of the various RIP commands that can be configured. This section covers the two highlighted commands as well as network, passive-interface, and version.
Figure 3-23 RIP Configuration Options
Advertising Networks (3.3.1.2)
By entering the RIP router configuration mode, the router is instructed to run RIP. But the router still needs to know which local interfaces it should use for communication with other routers, as well as which locally connected networks it should advertise to those routers.
To enable RIP routing for a network, use the network network-address router configuration mode command. Enter the classful network address for each directly connected network. This command:
- Enables RIP on all interfaces that belong to a specific network. Associated interfaces now both send and receive RIP updates.
- Advertises the specified network in RIP routing updates sent to other routers every 30 seconds.
In the following command sequence, the network command is used to advertise the R1 directly connected networks.
R1(config)# router rip R1(config-router)# network 192.168.1.0 R1(config-router)# network 192.168.2.0 R1(config-router)#
Examining Default RIP Settings (3.3.1.3)
The output of the show ip protocols command in Figure 3-24 displays the IPv4 routing protocol settings currently configured on the router.
Figure 3-24 Verifying RIP Settings on R1
This output confirms that:
- RIP routing is configured and running on router R1.
- The values of various timers; for example, the next routing update is sent by R1 in 16 seconds.
- The version of RIP configured is currently RIPv1.
- R1 is currently summarizing at the classful network boundary.
- The classful networks are advertised by R1. These are the networks that R1 includes in its RIP updates.
- The RIP neighbors are listed, including their next-hop IP address, the associated AD that R2 uses for updates sent by this neighbor, and when the last update was received from this neighbor.
The show ip route command displays the RIP routes installed in the routing table. In Figure 3-25, R1 now knows about the highlighted networks.
Figure 3-25 Verifying RIP Routes on R1
Enabling RIPv2 (3.3.1.4)
By default, when a RIP process is configured on a Cisco router, it is running RIPv1, as shown in the following output:
R1# show ip protocols *** IP Routing is NSF aware *** Routing Protocol is "rip" Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Sending updates every 30 seconds, next due in 16 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Redistributing: ripDefault version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 1 1 2
Serial0/0/0 1 1 2
Automatic network summarization is in effect Maximum path: 4 Routing for Networks: 192.168.1.0 192.168.2.0 Routing Information Sources: Gateway Distance Last Update 192.168.2.2 120 00:00:15 Distance: (default is 120) R1#
However, even though the router only sends RIPv1 messages, it can interpret both RIPv1 and RIPv2 messages. A RIPv1 router ignores the RIPv2 fields in the route entry.
Use the version 2 router configuration mode command to enable RIPv2, as shown in Figure 3-26.
Figure 3-26 Enable and Verify RIPv2 on R1
Notice how the show ip protocols command verifies that R2 is now configured to send and receive version 2 messages only. The RIP process now includes the subnet mask in all updates, making RIPv2 a classless routing protocol.
The following output verifies that there are no RIP routes still in the routing table:
R1# show ip route | begin Gateway Gateway of last resort is not set 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.1.0/24 is directly connected, GigabitEthernet0/0 L 192.168.1.1/32 is directly connected, GigabitEthernet0/0 192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.2.0/24 is directly connected, Serial0/0/0 L 192.168.2.1/32 is directly connected, Serial0/0/0 R1#
There are no RIP routes because R1 is now only listening for RIPv2 updates. R2 and R3 are still sending RIPv1 updates. Therefore, the version 2 command must be configured on all routers in the routing domain.
Disabling Auto Summarization (3.3.1.5)
As shown in Figure 3-27, RIPv2 automatically summarizes networks at major network boundaries by default, just like RIPv1.
Figure 3-27 Verify RIPv2 Route Summarization
To modify the default RIPv2 behavior of automatic summarization, use the no auto-summary router configuration mode command as shown in the following command sequence:
R1(config)# router rip R1(config-router)# no auto-summary R1(config-router)# end R1# *Mar 10 14:11:49.659: %SYS-5-CONFIG_I: Configured from console by console R1# show ip protocols | section Automatic Automatic network summarization is not in effect R1#
This command has no effect when using RIPv1. When automatic summarization has been disabled, RIPv2 no longer summarizes networks to their classful address at boundary routers. RIPv2 now includes all subnets and their appropriate masks in its routing updates. The show ip protocols output now states that automatic network summarization is not in effect.
Configuring Passive Interfaces (3.3.1.6)
By default, RIP updates are forwarded out all RIP-enabled interfaces. However, RIP updates really only need to be sent out interfaces connecting to other RIP-enabled routers.
For instance, refer to the topology in Figure 3-22. RIP sends updates out of its Gigabit Ethernet 0/0 interface even though no RIP device exists on that LAN. R1 has no way of knowing this and, as a result, sends an update every 30 seconds. Sending out unneeded updates on a LAN impacts the network in three ways:
- Wasted bandwidth: Bandwidth is used to transport unnecessary updates. Because RIP updates are either broadcasted or multicasted, switches also forward the updates out all ports.
- Wasted resources: All devices on the LAN must process the update up to the transport layers, at which point the devices will discard the update.
- Security risk: Advertising updates on a broadcast network is a security risk. RIP updates can be intercepted with packet sniffing software. Routing updates can be modified and sent back to the router, corrupting the routing table with false metrics that misdirect traffic.
To address these problems, an interface can be configured to stop sending routing updates. This is referred to as configuring a passive interface. Use the passive-interface router configuration command to prevent the transmission of routing updates through a router interface but still allow that network to be advertised to other routers. The command stops routing updates out the specified interface. However, the network that the specified interface belongs to is still advertised in routing updates that are sent out other interfaces.
There is no need for R1, R2, and R3 to forward RIP updates out of their LAN interfaces. The configuration in Figure 3-28 identifies the R1 Gigabit Ethernet 0/0 interface as passive.
Figure 3-28 Configuring and Verifying a Passive Interface on R1
The show ip protocols command is then used to verify that the Gigabit Ethernet interface was passive. Notice that the Gigabit Ethernet 0/0 interface is no longer listed as sending or receiving version 2 updates, but instead is now listed under the Passive Interface(s) section. Also notice that the network 192.168.1.0 is still listed under Routing for Networks, which means that this network is still included as a route entry in RIP updates that are sent to R2.
As an alternative, all interfaces can be made passive using the passive-interface default command. Interfaces that should not be passive can be re-enabled using the no passive-interface command.
Propagating a Default Route (3.3.1.7)
In the topology in Figure 3-29, R1 is single-homed to a service provider. Therefore, all that is required for R1 to reach the Internet is a default static route going out of the Serial 0/0/1 interface.
Figure 3-29 Propagating a Default Route on R1
Similar default static routes could be configured on R2 and R3, but it is much more scalable to enter it one time on the edge router R1 and then have R1 propagate it to all other routers using RIP. To provide Internet connectivity to all other networks in the RIP routing domain, the default static route needs to be advertised to all other routers that use the dynamic routing protocol.
To propagate a default route, the edge router must be configured with:
- A default static route using the ip route 0.0.0.0 0.0.0.0 exit-intf next-hop-ip command.
- The default-information originate router configuration command. This instructs R1 to originate default information, by propagating the static default route in RIP updates.
The example in Figure 3-30 configures a fully specified default static route to the service provider, and then the route is propagated by RIP. Notice that R1 now has a Gateway of Last Resort and default route installed in its routing table.
Figure 3-30 Configuring and Verifying a Default Route on R1
Configuring the RIPng Protocol (3.3.2)
In this section, you will learn how to configure, verify, and troubleshoot RIPng.
Advertising IPv6 Networks (3.3.2.1)
As with its IPv4 counterpart, RIPng is rarely used in modern networks. It is also useful as a foundation for understanding basic network routing. For this reason, this section provides a brief overview of how to configure basic RIPng.
Refer to the reference topology in Figure 3-31.
Figure 3-31 Enabling RIPng on the R1 Interfaces
In this scenario, all routers have been configured with basic management features and all interfaces identified in the reference topology are configured and enabled. There are no static routes configured and no routing protocols enabled; therefore, remote network access is currently impossible.
To enable an IPv6 router to forward IPv6 packets, ipv6 unicast-routing must be configured.
Unlike RIPv2, RIPng is enabled on an interface and not in router configuration mode. In fact, there is no network network-address command available in RIPng. Instead, use the ipv6 rip domain-name enable interface configuration command.
In the following output, IPv6 unicast routing is enabled and the Gigabit Ethernet 0/0 and Serial 0/0/0 interfaces are enabled for RIPng using the domain name RIP-AS:
R1(config)# ipv6 unicast-routing R1(config)# R1(config)# interface gigabitethernet 0/0 R1(config-if)# ipv6 rip RIP-AS enable R1(config-if)# exit R1(config)# R1(config)# interface serial 0/0/0 R1(config-if)# ipv6 rip RIP-AS enable R1(config-if)# no shutdown R1(config-if)#
The process to propagate a default route in RIPng is identical to RIPv2 except that an IPv6 default static route must be specified. For example, assume that R1 had an Internet connection from a Serial 0/0/1 interface to IP address 2001:DB8:FEED:1::1/64. To propagate a default route, R1 would have to be configured with:
- A default static route using the ipv6 route 0::/0 2001:DB8:FEED:1::1 global configuration command.
- The ipv6 rip domain-name default-information originate interface configuration mode command. For example, the Serial 0/0/1 interface of R1 would have to be configured with the ipv6 rip RIP-AS default-information originate command. This would instruct R1 to be the source of the default route information and propagate the default static route in RIPng updates sent out of the RIPng-enabled interfaces.
Examining the RIPng Configuration (3.3.2.2)
In Figure 3-32, the show ipv6 protocols command does not provide the same amount of information as its IPv4 counterpart.
Figure 3-32 Verifying RIPng Settings on R1
However, the command does confirm the following parameters:
- That RIPng routing is configured and running on router R1.
- The interfaces configured with RIPng.
The show ipv6 route command displays the routes installed in the routing table as shown in Figure 3-33. The output confirms that R1 now knows about the highlighted RIPng networks.
Figure 3-33 Verifying Routes on R1
Notice that the R2 LAN is advertised as two hops away. This is because there is a difference in the way RIPv2 and RIPng calculate the hop counts. With RIPv2 (and RIPv1), the metric to the R2 LAN would be one hop. This is because the metric (hop count) that is displayed in the IPv4 routing table is the number of hops required to reach the remote network (counting the next-hop router as the first hop). In RIPng, the sending router already considers itself to be one hop away; therefore, R2 advertises its LAN with a metric of 1. When R1 receives the update, it adds another hop count of 1 to the metric. Therefore, R1 considers the R2 LAN to be two hops away. Similarly it considers the R3 LAN to be three hops away.
Appending the rip keyword to the command as shown in Figure 3-34 only lists RIPng networks.
Figure 3-34 Verifying RIPng Routes on R1