Configuring RIP Version 2

Problem

You want to use the more flexible features of RIP Version 2.

Solution

By default, Cisco routers will listen for both RIP Version 1 and 2 packets, but they will only send Version 1. If you want to configure the router to send and receive only Version 2 RIP packets, use the version 2 configuration command:

Router2#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)#router rip
Router2(config-router)#version 2
Router2(config-router)#network 172.25.0.0
Router2(config-router)#network 192.168.30.0
Router2(config-router)#end
Router2#

You can also enable RIP Version 2 by sending and receiving separately for individual interfaces:

Router1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#interface Serial0/0.2 
Router1(config-subif)#ip rip send version 2
Router1(config-subif)#ip rip receive version 2
Router1(config-subif)#end
Router1#

 

Discussion

By default, the router listens for Version 1 and 2 packets but it only sends Version 1. You can run both versions simultaneously on the same interface by simply specifying both versions as follows:

Router1(config)#interface Serial0/0.2 
Router1(config-subif)#ip rip send version 1 2

However, the router will then have to transmit all updates by using both versions, which can cause an unnecessary burden both for the router and the network. In general, RIP Version 2 is preferred, particularly because of the support for modern IP features, such as variable length subnet masks:

Router2#show ip protocols 
Routing Protocol is "rip"
 Sending updates every 60 seconds, next due in 19 seconds
 Invalid after 180 seconds, hold down 180, flushed after 240
 Output delay 10 milliseconds between packets
 Outgoing update filter list for all interfaces is not set
 Incoming update filter list for all interfaces is not set
 Redistributing: rip
 Default version control: send version 2, receive version 2
 Interface Send Recv Triggered RIP Key-chain
 Ethernet0 2 2 
 Serial0.1 2 2 Yes 
 Automatic network summarization is in effect
 Maximum path: 4
 Routing for Networks:
 172.25.0.0
 192.168.30.0
 Routing Information Sources:
 Gateway Distance Last Update
 172.25.2.1 120 01:04:31
 Distance: (default is 120)
Router2#

This command shows that the router is sending and receiving only Version 2 on both interfaces. In this case, the router will reject any incoming RIP Version 1 packets on either of these ports. So you need to make sure that the neighboring routers on these interfaces are also running Version 2.

The second configuration example leaves the default configuration for all of the interfaces except Serial0/0.2, which only sends and receives RIP Version 2:

Router1#show ip protocols 
Routing Protocol is "rip"
 Sending updates every 30 seconds, next due in 11 seconds
 Invalid after 180 seconds, hold down 180, flushed after 240
 Outgoing update filter list for all interfaces is not set
 Incoming update filter list for all interfaces is not set
 Redistributing: static, rip
 Default version control: send version 1, receive any version
 Interface Send Recv Triggered RIP Key-chain
 Serial0/0.2 2 2 Yes 
 FastEthernet0/1 1 1 2 
 Automatic network summarization is in effect
 Maximum path: 4
 Routing for Networks:
 172.22.0.0
 172.25.0.0
 Routing Information Sources:
 Gateway Distance Last Update
 172.25.2.2 120 14:40:28
 172.22.1.4 120 01:06:11
 Distance: (default is 120)
Router1#

Debug traces show which version the router sends and receives for every update:

Router2#debug ip rip
RIP protocol debugging is on
Router2#
Aug 11 14:38:54: RIP: received v2 update from 172.25.2.1 on Serial0.1
Aug 11 14:38:54: 0.0.0.0/0 via 0.0.0.0 in 1 hops
Aug 11 14:38:54: 172.22.0.0/16 via 0.0.0.0 in 1 hops
Aug 11 14:38:54: 172.25.0.0/16 via 0.0.0.0 in 1 hops
Aug 11 14:38:54: 172.25.1.0/24 via 0.0.0.0 in 1 hops
Aug 11 14:38:54: 172.25.25.1/32 via 0.0.0.0 in 1 hops
Aug 11 14:38:57: RIP: sending v2 update to 224.0.0.9 via Serial0.1 
Aug 11 14:38:57: RIP: build update entries
Aug 11 14:38:57: 172.25.25.2/32 via 0.0.0.0, metric 1, tag 0
Aug 11 14:38:57: 192.168.30.0/24 via 0.0.0.0, metric 11, tag 0
Router2#

If you configure a router to listen only for one version, however, it will just drop any packets of the other version that it receives:

Router2#debug ip rip
RIP protocol debugging is on
Router2#
Aug 11 14:43:11: RIP: ignored v1 packet from 172.25.2.1 (illegal version)
Aug 11 14:43:11: RIP: received v2 update from 172.25.2.1 on Serial0.1


Router Configuration and File Management

Router Management

User Access and Privilege Levels

TACACS+

IP Routing

RIP

EIGRP

OSPF

BGP

Frame Relay

Handling Queuing and Congestion

Tunnels and VPNs

Dial Backup

NTP and Time

DLSw

Router Interfaces and Media

Simple Network Management Protocol

Logging

Access-Lists

DHCP

NAT

First Hop Redundancy Protocols

IP Multicast

IP Mobility

IPv6

MPLS

Security

Appendix 1. External Software Packages

Appendix 2. IP Precedence, TOS, and DSCP Classifications

Index



Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net