Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Tracing RIP Protocol Traffic

Understanding RIP Trace Operations

You can trace various types of RIP protocol traffic to help debug RIP protocol issues.

To trace RIP protocol traffic, include the traceoptions statement at the [edit protocols rip] hierarchy level:

traceoptions {file filename <files number> <size size> <world-readable | no-world-readable>;flag flag <flag-modifier> <disable>;}

You can specify the following RIP protocol-specific trace options using the flag statement:

  • auth—RIP authentication
  • error—RIP error packets
  • expiration—RIP route expiration processing
  • holddown—RIP hold-down processing
  • nsr-synchronizationNonstop active routing synchronization events
  • packets—All RIP packets
  • request—RIP information packets
  • trigger—RIP triggered updates
  • update—RIP update packets

You can optionally specify one or more of the following flag modifiers:

  • detail—Detailed trace information
  • receive—Packets being received
  • send—Packets being transmitted

    Note: Use the detail flag modifier with caution as this may cause the CPU to become very busy.

Global tracing options are inherited from the configuration set by the traceoptions statement at the [edit routing-options] hierarchy level. You can override the following global trace options for the RIP protocol using the traceoptions flag statement included at the [edit protocols rip] hierarchy level:

  • all—All tracing operations
  • general—All normal operations and routing table changes (a combination of the normal and route trace operations)
  • normal—Normal events
  • policy—Policy processing
  • route—Routing information
  • state—State transitions
  • task—Routing protocol task processing
  • timer—Routing protocol timer processing

Note: Use the trace flag all with caution because this may cause the CPU to become very busy.

Example: Tracing RIP Protocol Traffic

This example shows how to trace RIP protocol operations.

Requirements

No special configuration beyond device initialization is required before configuring this example.

Overview

In this example, Device R1 is set to trace routing information updates.

An export policy is also shown because an export policy is required as part of the minimum configuration for RIP.

Figure 1 shows the topology used in this example.

Figure 1: RIP Trace Operations Network Topology

RIP Trace Operations Network Topology

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

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 traceoptions file rip-trace-fileset protocols rip traceoptions flag routeset protocols rip group rip-group export advertise-routes-through-ripset protocols rip group rip-group neighbor fe-1/2/0.1set 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 the RIP update interval:

  1. Configure the network interfaces.

    This example shows multiple loopback interface addresses to simulate attached networks.

    [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. Configure the RIP group, and add the interface to the group.

    To configure RIP in Junos OS, you must configure a group that contains the interfaces on which RIP is enabled. You do not need to enable RIP on the loopback interface.

    [edit protocols rip group rip-group]user@R1# set neighbor fe-1/2/0.1
  3. Configure RIP tracing operations.
    [edit protocols rip traceoptions]user@R1# set file rip-trace-fileuser@R1# set flag route
  4. 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
  5. 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 {traceoptions {file rip-trace-file;flag route;}group rip-group {export advertise-routes-through-rip;neighbor fe-1/2/0.1;}}
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.

Checking the Log File

Purpose

Make sure that the RIP route updates are logged in the configured log file.

Action

  1. Deactivate the extra loopback interface address on Device R3.
    [edit interfaces lo0 unit 3 family inet]user@R3# deactivate address 172.16.3.3/32user@R3# commit
  2. From operational mode on Device R1, enter the show log rip-trace-file command with the | match 172.16.3.3 option.
    user@R1> show log rip-trace-file | match 172.16.3.3
    Mar  1 11:39:53.975192 Setting RIPv2 rtbit on route 172.16.3.3/32, tsi = 0xbb69228
    Mar  1 11:39:59.847118  172.16.3.3/32: metric-in: 16, change: 3 -> 16; # gw: 1, pkt_upd_src 10.0.0.2, inx: 0, rte_upd_src 10.0.0.2
    Mar  1 11:39:59.847568 CHANGE   172.16.3.3/32       nhid 591 gw 10.0.0.2        RIP      pref 100/0 metric 3/0 fe-1/2/0.1 <Delete Int>
    Mar  1 11:39:59.847629 Best route to 172.16.3.3/32 got deleted. Doing route calculation on the stored rte-info

Meaning

The output shows that the route to 172.16.3.3/32 was deleted.

Published: 2013-09-24

Published: 2013-09-24