Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    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.Note that the functionality of configuring the sending and receiving of RIPv1 and RIPv2 packets described in this topic is not supported in Junos OS Releases 15.1X49, 15.1X49-D30, or 15.1X49-D40.

    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

    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, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

    Device R1

    set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.1/30set interfaces lo0 unit 1 family inet address 172.16.0.1/32set interfaces lo0 unit 1 family inet address 192.168.1.1/32set protocols rip group rip-group export advertise-routes-through-ripset protocols rip group rip-group neighbor fe-1/2/0.1 receive version-2set policy-options policy-statement advertise-routes-through-rip term 1 from protocol directset policy-options policy-statement advertise-routes-through-rip term 1 from protocol ripset policy-options policy-statement advertise-routes-through-rip term 1 then accept

    Device R2

    set interfaces fe-1/2/0 unit 2 family inet address 10.0.0.2/30set interfaces fe-1/2/1 unit 5 family inet address 10.0.0.5/30set interfaces lo0 unit 2 family inet address 192.168.2.2/32set interfaces lo0 unit 2 family inet address 172.16.2.2/32set protocols rip group rip-group export advertise-routes-through-ripset protocols rip group rip-group neighbor fe-1/2/0.2set protocols rip group rip-group neighbor fe-1/2/1.5set policy-options policy-statement advertise-routes-through-rip term 1 from protocol directset policy-options policy-statement advertise-routes-through-rip term 1 from protocol ripset policy-options policy-statement advertise-routes-through-rip term 1 then accept

    Device R3

    set interfaces fe-1/2/0 unit 6 family inet address 10.0.0.6/30set interfaces lo0 unit 3 family inet address 192.168.3.3/32set interfaces lo0 unit 3 family inet address 172.16.3.3/32set protocols rip group rip-group export advertise-routes-through-ripset protocols rip group rip-group neighbor fe-1/2/0.6set policy-options policy-statement advertise-routes-through-rip term 1 from protocol directset policy-options policy-statement advertise-routes-through-rip term 1 from protocol ripset policy-options policy-statement advertise-routes-through-rip term 1 then accept

    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:

    1. 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
    2. 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
    3. 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
    4. 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.

    user@R1# show interfaces
    fe-1/2/0 {unit 1 {family inet {address 10.0.0.1/30;}}}
    lo0 {unit 1 {family inet {address 172.16.0.1/32;address 192.168.1.1/32;}}}
    user@R1# show protocols
    rip {group rip-group {export advertise-routes-through-rip;neighbor fe-1/2/0.1 {receive version-2;}}}
    user@R1# show policy-options
    policy-statement advertise-routes-through-rip {term 1 {from protocol [ direct rip ];then accept;}}

    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.

                      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.

    Release History Table

    Release
    Description
    Note that the functionality of configuring the sending and receiving of RIPv1 and RIPv2 packets described in this topic is not supported in Junos OS Releases 15.1X49, 15.1X49-D30, or 15.1X49-D40.

    Modified: 2016-12-28