This routing protocol, also known as RIP, is a dynamic routing protocol which is utilized in both local area and wide area networks.
It is classified as distance vector protocol. The metric to calculate the distance between a source and a destination network is hop count.
The routing information protocol has had several revisions thus leading to RIPv2. Both RIP and RIPv2 are still widely used although they are now considered as obsolete and have been replaced by newer protocols (such as OSPF, EIGRP, IS-IS) in many situations. RIP has been classified into three versions. These are RIPv1, RIPv2 and RIPng.
RIPv1
RIPv1 is the first version of RIP and it uses class-full routing. This version of RIP operates when there are only 0-15 hop counts.
If the destination network is located more than 16 hops (routers) away, then it will fail to send the data packets to the destination network.
This version does not support VLSM (Variable Length Subnet Mask) since the routing updates will not bring any subnet information.
For this reason RIPv1 does not allow different sized subnets in the same network. For example, if the network to be advertised is 10.1.1.0, then RIPv1 assumes that the subnet mask of this network is Class A (i.e 255.0.0.0), even if the network administrator has broken down this network into a Class C subnet (10.1.1.0/24).
RIPv1 is also vulnerable to many attacks since it does not support any router authentication.
RIPv2
RIPv2 was built based on RIPv1 so as to address certain deficiencies of RIPv1. To be compatible with the older version of RIP the hop count was left at 15.
The new changes implemented in RIPv2 were its ability to carry the subnet information which in turn allow RIPv2 to support Classless Inter Domain Routing.
In order to avoid any needless load on hosts which are not participating in routing, this version will multicast the whole routing table to all the neighboring routers at 224.0.0.9.
There was also the addition of MD5 authentication for routing updates. Also, in order to distinguish the internal routes from the external routes, route tags were added to RIPv2.
RIPng
RIPng is an extended format of RIPv2 so as to support IPv6. There are a few differences between RIPng and RIPv2. RIPng will not support RIPv1 updates authentication. RIPng does not attach any tags to routers. In RIPv2 the next hop is encoded in each routes entry while in RIPng the next hop needs a specific encoding for a set route of entries.
Configuration of RIP
By default all RIP enabled routers will automatically run RIPv1. To activate RIP on a Cisco router one would need to issue the router rip command in global configuration mode. (RA, name of router)
RA (config)# router rip
To select the networks that should be advertised with RIP you would need to issue the network command in router configuration mode.
RA (config-router)#network 192.168.10.0
RA (config-router)#network 192.168.20.0
If you wanted to configure RIPv2 on a Cisco router then you would do basically the same configuration, only this time you would issue the version 2 command in router configuration mode.
RA (config)# router rip
RA (config-router)#version 2
RA (config-router)#network 192.168.10.0
RA (config-router)#network 192.168.20.0
Based on the kind of network you are operating you may need to allow updates between RIPv1 and RIPv2.
To do so you would need to specify which version goes to which interface. You would issue the ip rip send version command in the interface configuration mode. To allow an interface to receive RIP on this basis you would need to issue the ip rip receive version command in interface configuration mode.
RA (config-if) ip rip send version
RA (config-if) ip rip receive version