Tuesday, November 22, 2011

RIPv2

RIPv2 is a classless Distance-Vector routing protocol. It is designed to enhance the RIPv1 routing protocol. The most significant enhancement of RIPv2 is the advertisement of subnet mask information along with the subnet number in the routing updates. With this enhancement, RIPv2 supports classless routing, VLSM, route summarization, and discontiguous networks.
Note: Distance-Vector algorithms are often being associated with Bellman-Ford algorithms. However, this is somewhat confusing and inaccurate as Link-State algorithms can also use the Bellman-Ford algorithm to perform route computation.

RIPv2 route summarization improves routing scalability and efficiency in large networks by reducing the size of routing tables. However, RIPv2 is only able to summarize routes up to the classful network boundary. RIPv2 does not support CIDR-type summarization.

RIPv2 advertises routing updates in a more efficient manner by using multicasts. RIPv1 broadcast updates are normally being discarded by end systems. RIPv2 advertises routing updates to other routers with the 224.0.0.9 multicast address. With multicasts, the packets can be discarded at either L2 or L3 instead of based upon invalid destination port number at the transport layer (L4).
Note: RIP (both RIPv1 and RIPv2) updates are destined to UDP Port 520.

224.0.0.9 and 0100.5E00.0009 are the multicast IP and MAC addresses of RIPv2. Devices that can distinguish between a multicast and a broadcast at the data link layer (L2) can discard unwanted packets at the interface level. The worst case that will happen on devices that do not have such capability is that the RIPv2 update packets will be discarded at the network layer (L3) instead of the transport layer (L4), as those devices should never join the RIPv2 multicast group.

Another enhanced feature in RIPv2 is security – authentication. Cisco RIPv2 implementation supports plain text and Message Digest 5 (MD5) authentications. The ip rip authentication mode {md5 | text} and ip rip authentication key-chain {key-chain-name} interface subcommands are used to enable RIPv2 authentication on an interface.
!
key chain kc01
 key 1
  key-string cisco123
!
interface Serial0/0
 ip address 10.10.10.1 255.255.255.0
 ip rip authentication mode md5
 ip rip authentication key-chain kc01
!

The router rip global configuration command enables the RIPv1 process. By default, Cisco IOS receives versions 1 and 2 updates, but sends only version 1 updates.

The version {1 | 2} router subcommand can be used to configure a router to send and receive routing updates for the configured version only.

The ip rip send version {ver} and ip rip receive version {ver} interface subcommands can be used to control the version of the updates to be sent and received on a particular interface.
Router(config)#interface {intf-type intf-num}
Router(config-if)#ip rip send version {1 | 2 | 1 2}
Router(config-if)#ip rip receive version {1 | 2 | 1 2}

Sample RIPv2 Network

A router configured with the version 2 router subcommand sends and receives only RIPv2 updates. The ip rip send version 1 and ip rip receive version 1 interface subcommands configured on RT2’s S0/0 interface override the default settings and tell Cisco IOS to both send and receive RIPv1 updates on the interface.
Note: RT1 will only have the 172.16.0.0/16 network in its routing table (instead of 172.16.1.0), as RIPv1 is a classful routing protocol which does not advertise subnet mask information along with routing updates – RT2 does not advertise the info to RT1 as they are communicating using RIPv1.

The default-information originate router subcommand can be used to advertise a default route from a router through a routing protocol (RIPv1 for this case).

Note: An RIP router configured the default-information originate command will generate a default route 0.0.0.0 even if it does not has a gateway of last resort.

RIP Default Route Advertisement

Below shows the output of the debug ip routing and show ip route commands on RT1:
RT1#debug ip routing
IP routing debugging is on
RT1#
00:01:35: RT: add 0.0.0.0/0 via 10.10.10.2, rip metric [120/1]
00:01:35: RT: NET-RED 0.0.0.0/0
00:01:35: RT: default path is now 0.0.0.0 via 10.10.10.2
00:01:35: RT: new default network 0.0.0.0
00:01:35: RT: NET-RED 0.0.0.0/0
RT1#sh ip route

Gateway of last resort is 10.10.10.2 to network 0.0.0.0

     10.0.0.0/30 is subnetted, 1 subnets
R       10.11.11.0 [120/1] via 10.10.10.2, 00:00:14, Serial0/0
C       10.10.10.0 is directly connected, Serial0/0
R*   0.0.0.0/0 [120/1] via 10.10.10.2, 00:00:14, Serial0/0
RT1#
RT1#ping 12.12.12.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.12.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/76/112 ms
RT1#

Note: RT2 would propagate the default route information from RT3 to RT1 without having the default-information originate RIP router subcommand configured on it.

No comments:

Post a Comment