How to Run RIPv2 on Junos Devices
Routing Information Protocol version 2 (RIPv2) is a distance-vector routing protocol and uses the distance, measured in hops, to determine the best route to a destination. (A distance-vector routing protocol uses only the number of routers on a path to determine the next hop.)
In RIPv2, each hop corresponds to a single router, and the number of hops to a destination is the sum of the number of routers a packet has to pass through, starting at its origin.
RIPv2 is generally used in smaller or less complex networks, partly because it’s something of a simple protocol, and partly because of a design limitation. The maximum hop count that a route can have is 15. If a destination is more than 15 routers away, RIPv2 can’t forward packets to that destination and simply discards (drops) the packets.
The two other interior gateway protocols (IGPs), OSPF and IS-IS, don’t have this limitation. For this reason, and also because OSPF and IS-IS provide more features than RIPv2, they’re used more often for a network’s IGP.
You want to use RIPv2 on the Juniper router when you’re connecting the router to a network that is already running RIPv2. The router configuration is very straightforward. You activate RIPv2 on each interface that is directly connected to a neighboring router running RIPv2.
In the following configuration, the Junos OS router connects to the neighbor using the Fast Ethernet interface fe-0/0/1’s unit 0 logical interface, and sets the router to send and receive RIPv2:
[edit protocols] user@junos-router# set rip group user-group neighbor fe-0/0/1.0 user@junos-router# set rip receive version-2 user@junos-router# set rip send version-2
The Junos OS configuration requires that all RIPv2 neighbors be part of a group, which you define with the group keyword. Here, the group has a name of user-group, but you can name it almost anything you like. For a simple network, you can configure all the RIPv2 interfaces and routers to be in a single group. If you want to enable RIPv2 packet authentication and want routers to have different passwords, you need to configure the routers to be in different groups.
The RIPv2 configuration on the neighboring router is similar. You can use the same group name and the appropriate interface. Use the show rip neighbor command to check that the interface is configured:
user@junos-router> show rip neighbor Source Destination Send Receive In Neighbor State Address Address Mode Mode Met -------- ----- ------- ----------- ---- ------- --- fe-0/0/1.0 Up 10.0.29.2 220.127.116.11 mcast both 1
The first column of the output shows that you’re running RIPv2 on the configured interface, fe-0/0/1.0, and the State column shows that the connection is Up. The two Address columns show the address of the local interface and the interface to which the router is sending updates. The last column reports the inbound metric, which is how many hops will be added to received routes. Here, the metric is the expected value of 1.
The Routing Information Protocol (RIP) is one of the first routing protocols, developed as part of the ARPANET project in 1969. It was included in the UNIX BSD operating system in the early 1980s, before specialized devices called routers had even been developed, and as a result, became the de facto routing protocol and was widely used.
RIP is an IGP, meaning that it routes traffic within a single administrative domain, such as a company or a university. RIP was standardized by the IETF in 1988 and became known as RIP version 1. The protocol was updated to version 2 in 1994 to add support for Classless Interdomain Routing (CIDR) and MD5 authentication.