Supported Platforms
Example: Configuring the Sending and Receiving of RIPv1 and RIPv2 Packets
Understanding the Sending and Receiving of RIPv1 and RIPv2 Packets
RIP version 1 (RIPv1) and RIP version 2 (RIPv2) can run simultaneously. This might make sense when you are migrating a RIPv1 network to a RIPv2 network. This also allows interoperation with a device that supports RIPv1 but not RIPv2.
By default, when RIP is enabled on an interface, Junos OS receives both RIPv1 and RIPv2 packets and sends only RIPv2 packets. You can configure this behavior by including the send and receive statements in the RIP configuration.
Example: Configuring the Sending and Receiving of RIPv1 and RIPv2 Packets
This example shows how to configure whether the RIP update messages conform to RIP version 1 (RIPv1) only, to RIP version 2 (RIPv2) only, or to both versions. You can also disable the sending or receiving of update messages.
Requirements
No special configuration beyond device initialization is required before configuring this example.
Overview
By default, when RIP is enabled on an interface, Junos OS receives both RIPv1 and RIPv2 packets and sends only RIPv2 packets.
Figure 1 shows the topology used in this example.
Figure 1: Sending and Receiving RIPv1 and RIPv2 Packets Network Topology

In this example, Device R1 is configured to receive only RIPv2 packets.
CLI Quick Configuration shows the configuration for all of the devices in Figure 1. The section Step-by-Step Procedure describes the steps on Device R1.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.
Device R1
Device R2
Device R3
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure a RIP packet versions that can be received:
- Configure the network interfaces.[edit interfaces]user@R1# set fe-1/2/0 unit 1 family inet address 10.0.0.1/30
user@R1# set lo0 unit 1 family inet address 172.16.0.1/32user@R1# set lo0 unit 1 family inet address 192.168.1.1/32 - Create the RIP groups and add the interfaces.
To configure RIP in Junos OS, you must configure one or more groups that contain the interfaces on which RIP is enabled. You do not need to enable RIP on the loopback interface.
For the interface that is facing Device R2, the receive version-2 setting causes this interface to accept only RIPv2 packets.
[edit protocols rip group rip-group]user@R1# set neighbor fe-1/2/0.1 receive version-2 - Create the routing policy to advertise both direct and
RIP-learned routes.[edit policy-options policy-statement advertise-routes-through-rip term 1]user@R1# set from protocol directuser@R1# set from protocol ripuser@R1# set then accept
- Apply the routing policy.
In Junos OS, you can only apply RIP export policies at the group level.
[edit protocols rip group rip-group]user@R1# set export advertise-routes-through-rip
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, and show policy-options commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Verification
Confirm that the configuration is working properly.
Verifying That the Receive Mode Is Set to RIPv2 Only
Purpose
Make sure that the interfacing Device R2 is configured to receive only RIPv2 packets, instead of both RIPv1 and RIPv2 packets.
Action
From operational mode, enter the show rip neighbor command.
user@R1> show rip neighbor
Local Source Destination Send Receive In Neighbor State Address Address Mode Mode Met -------- ----- ------- ----------- ---- ------- --- fe-1/2/0.1 Up 10.0.0.1 224.0.0.9 mcast v2 only 1
Meaning
In the output, the Receive Mode field displays v2 only. The default Receive Mode is both.