RIP

This chapter provides information about configuring the Routing Information Protocol (RIP).

RIP overview

RIP is an interior gateway protocol (IGP) that uses a distance-vector (Bellman-Ford) algorithm to determine the best route to a destination. The algorithm advertises network reachability by advertising prefix/mask and the metric (also known as hop count or cost). RIP selects the route with the lowest metric as the best route. In order for the protocol to provide complete information about routing, every router in the domain must participate in the protocol.

RIP is a routing protocol based on a distance vector (Bellman-Ford) algorithm, which advertises network reachability by advertising prefix/mask and the metric (also known as hop count or cost). RIP selects the route with the lowest metric as the best route. RIP differs from link-state database protocols, such as OSPF and IS-IS, in that RIP advertises reachability information directly and link-state-database-based protocols advertise topology information. Each node is responsible for calculating the reachability information from the topology.

The router software supports RIPv1 and RIPv2. RIPv1, specified in RFC 1058, was written and implemented before the introduction of classless interdomain routing (CIDR). It assumes the netmask information for non-local routes, based on the class the route belongs to:

  • class A

    8 bit mask

  • class B

    16 bit mask

  • class C

    24 bit mask

RIPv2 was written after CIDR was developed and transmits netmask information with every route. Because of the support for CIDR routes and other enhancements in RIPv2 such as triggered updates, multicast advertisements, and authentication, most production networks use RIPv2. However, some older systems (hosts and routers) only support RIPv1, especially when RIP is used simply to advertise default routing information.

RIP is supported on all IP interfaces, including both network and access interfaces.

RIP features

RIP, a UDP-based protocol, updates its neighbors, and the neighbors update their neighbors, and so on. Each RIP host has a routing process that sends and receives datagrams on UDP port number 520.

Each RIP router advertises all RIP routes periodically via RIP updates. Each update can contain a maximum of 25 route advertisements. This limit is imposed by RIP specifications. RIP can sometimes be configured to send as many as 255 routes per update. The formats of the RIPv1 and RIPv2 updates are slightly different and are shown below. Additionally, RIPv1 updates are sent to a broadcast address, RIPv2 updates can be either sent to a broadcast or multicast address (224.0.0.9). RIPv2 supports subnet masks, a feature that was not available in RIPv1.

A network address of 0.0.0.0 is considered a default route. A default route is used when it is not convenient to list every possible network in the RIP updates, and when one or more closely-connected gateways in the system are prepared to handle traffic to the networks that are not listed explicitly. These gateways create RIP entries for the address 0.0.0.0, as if it were a network to which they are connected.

RIP version types

SR OS allows the user to specify the RIP version that is sent to RIP neighbors and RIP updates that are accepted and processed. The following combinations are allowed:

  • Send only RIPv1 or send only RIPv2 to either the broadcast or multicast address or send no messages.

    The default sends RIPv2 formatted messages to the broadcast address.

  • Receive only RIPv1, receive only RIPv2, or receive both RIPv1 and RIPv2, or receive none.

    The default receives both.

RIPv2 authentication

RIPv2 messages carry more information, which allows the use of a simple authentication mechanism to secure table updates. The router implementation enables the use of a simple password (plain text) or message digest (MD5) authentication.

RIP packet format

The RIP packet format is displayed in RIP packet format.

Figure 1. RIP packet format

A RIP packet consists of the following fields:

  • Command

    This field indicates whether the packet is a request or a response message. The request asks the responding system to send all or part of its routing table. The response may be sent in response to a request, or it may be an unsolicited routing update generated by the sender.

  • Version

    This field indicates the RIP version used. This field can signal different potentially incompatible versions.

  • Must be zero

    Not used in RIPv1. This field provides backward compatibility with pre-standard varieties of RIP. The default value is zero.

  • Address family identifier (AFI)

    This field indicates the type of address. RIP can carry routing information for several different protocols. Each entry in this field has an AFI to indicate the type of address being specified. The IP AFI is 2.

  • Address

    This field indicates the IP address for the packet.

  • Metric

    This field specifies the number of hops to the destination.

  • Mask

    This field specifies the IP address mask.

  • Next hop

    This field specifies the IP address of the next router along the path to the destination.

RIPv1 packet format

There can be between 1 and 25 (inclusive) RIP entries. RIPv1 packet format displays RIPv1 packet format.

Figure 2. RIPv1 packet format
RIPv2 packet format

The RIP packet format is displayed in RIPv2 packet format.

Figure 3. RIPv2 packet format

The RIPv2 packets include the following fields:

  • Subnet Mask

    The subnet mask for the entry. If this field is zero, no subnet mask has been specified for the entry.

  • Nexthop

    The IP address of the next hop to forward packets.

BFD monitoring of RIP neighbor liveliness

BFD can be used to monitor the liveliness of the RIP neighbors. If a BFD session, associated with a RIP neighbor fails, that RIP neighbor is declared down and all routes learned from that RIP neighbor are withdrawn from the associated route tables.

BFD is enabled for RIP by configuring the commands in the following context:

  • MD-CLI
    configure router rip group neighbor bfd-liveness true
  • classic CLI
    configure router rip group neighbor enable-bfd

BFD must be also be enabled on the interface associated with the RIP neighbor. The bfd command sets the necessary transmit and receive intervals, as well as sets the optional multiplier.

RIPng

RIPng is the IPv6 form of the interior gateway protocol (IGP) Routing Information Protocol (RIP), originally implemented for IPv4 routing. This protocol is a distance vector routing protocol that periodically advertises IPv6 routing information to neighbors, typically through the use of UDP based multicast updates carrying a list of one or more entries, each containing an IPv6 prefix, prefix length, route metric and a possible route tag.

RIPng is supported in the base routing context and also as a PE-CE routing protocol within a VPRN context.

RIPng protocol

RIPng packets are sent using the UDP protocol and the protocol port number 521. Unsolicited updates messages are sent with 521 as both the source and destination port.

  • Source IP address

    The Link-Local IPv6 address of the interface sending the RIPng packet is used as the source IP address of any RIPng update sent.

  • Destination IP address

    The destination IP for any periodic or triggered update should be sent to the multicast group FF02::9, (all-rip-routers multicast group). When sending responses to an RIPng request, the RIPng response is sent to the unicast IP address of the requester.

Each route entry in an update message contains the following:

  • IPv6 prefix

  • prefix length

  • route metric

  • route tag (optional)

Common attributes

The following sections provide information about common RIP attributes.

Metrics

By default, RIP advertises all RIP routes to each peer every 30 seconds. RIP uses a hop count metric to determine the distance between the packet’s source and destination. The metric/cost values for a valid route is 1 through 15. A metric value of 16 (infinity) indicates that the route is no longer valid and should be removed from the router’s routing table.

Each router along the path increments the hop count value by 1. When a router receives a routing update with new or different destination information, the metric increments by one.

The maximum number of hops in a path is 15. If a router receives a routing update with a metric of 15 and contains a new or modified entry, increasing the metric value by one will cause the metric increment to 16 (infinity). Then, the destination is considered unreachable.

The router implementation of RIP uses split horizon with poison reverse to protect from such problems as ‟counting to infinity”. Split horizon with poison reverse means that routes learned from a neighbor through a specified interface are advertised in updates out of the same interface but with a metric of 16 (infinity).

Timers

RIP uses the following timers to determine the frequency of RIP updates and the duration that routes are maintained.

  • update

    Times the interval between periodic routing updates.

  • timeout

    This timer is initialized when a route is established and any time an update message is received for the route. When this timer expires, the route is no longer valid. It is retained in the table for a short time, so that neighbors can be notified that the route has been dropped.

  • flush

    When the flush timer expires, the route is removed from the tables.

Import and export policies

Routing policies can control the content of the routing tables, advertised routes, and the best route to reach a destination. Import route policies determine which routes are accepted from RIP neighbors. Export route policies determine which routes are exported from the route table to RIP. By default, RIP does not export learned routes to its neighbors.

There are no default routing policies. A policy must be created explicitly and applied to a RIP import or export command.

Hierarchical levels

The minimum RIP configuration must define one group and one neighbor. For more information about RIP hierarchy levels, see Basic RIP configuration.

Configuration notes

This section describes RIP configuration restrictions.

General

Before RIP neighbor command options can be configured, router interfaces must be configured.

RIP must be explicitly created for each router interface. There are no default RIP instances on a router.

Configuring RIP with CLI

This section provides information to configure Routing Information Protocol (RIP) using the command line interface.

RIP and RIPng configuration overview

Preconfiguration requirements

Configure the following entities before beginning the RIP configuration.

Optionally, use the commands in the following context to define the policy statements:

  • MD-CLI
    configure policy-options
  • classic CLI
    configure router policy-options

RIP hierarchy

RIP is configured in the configure router rip context. RIP is not enabled by default.

Three hierarchical levels are included in RIP configurations in the classic CLI:

  • global
  • group
  • neighbor

Commands and command options configured at the global level are inherited by the group and neighbor levels. However, command options configured at the group and neighbor levels take precedence over global configurations.

Basic RIP configuration

This section provides information to configure RIP and examples of common configuration tasks. For a router to accept RIP updates, in the configure router rip context, you must define at least one group and one neighbor. A router ignores updates received from routers on interfaces not configured for RIP. Configuring other RIP commands and parameters is optional.

By default, the local router imports all routes from this neighbor and does not advertise routes. The router receives both RIPv1 and RIPv2 update messages with 25 to 255 route entries per message.

The RIP configuration commands have three primary configuration levels:

  • rip for RIP global configurations
  • group for RIP group configurations
  • neighbor for RIP neighbor configurations

Within these levels, the RIP configuration commands are identical. For repeated commands, the value most specific to the neighboring router is used. Therefore, a RIP group-specific command takes precedence over a global RIP command. A neighbor-specific configuration statement takes precedence over a global RIP and group-specific command. For example, if the user modifies a RIP neighbor-level command default, the new value takes precedence over group- and global-level settings.

At a minimum, the group- and neighbor-level RIP parameters must be configured in the configure router rip context.

The following example displays a basic RIP configuration.

MD-CLI

[ex:/configure router "Base" rip]
A:admin@node-2# info
    group "RIP-ALA-A" {
        neighbor "to-ALA-4"
    }

classic CLI

A:node-2>config>router>rip# info
----------------------------------------------
            group "RIP-ALA-A"
                neighbor "to-ALA-4"
                    no shutdown
----------------------------------------------

Common configuration tasks

This section provides an overview of RIP configuration tasks and the CLI commands.

Configure RIP hierarchically using the global level (applies to all peers), the group level (applies to all peers in peer-group), or the neighbor level (only applies to the specified interface). By default, group members inherit the group’s configuration parameters; however, a parameter can be modified on a per-member basis without affecting the group-level command options. For more information about the hierarchy of RIP configuration levels, see RIP hierarchy and Basic RIP configuration.

The user must explicitly create all RIP instances on each device. After the instances are created, RIP is administratively enabled.

To configure RIP, perform the following steps:

  1. Configure the interfaces.
  2. Optionally configure the policy statements.
  3. Enable the RIP.
  4. Configure the group command options.
  5. Configure the neighbor command options.

Configuring interfaces

The following command sequences create a logical IP interface. The logical interface can associate attributes like an IP address, port, Link Aggregation Group (LAG), or the system. For more information about configuring interfaces, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR Interface Configuration Guide.

Use the commands in the following context to configure a network interface.

configure router interface
Note: The link-local-modifier command can only be configured in the classic CLI.

The following example displays the interface information.

MD-CLI
[ex:/configure router "Base" interface "itf1"]
A:admin@node-2# info
    port 1/1/1
    ipv4 {
        primary {
            address 10.10.10.1
            prefix-length 24
        }
    }
    ipv6 {
        address 2000:1:: {
            prefix-length 64
        }
        neighbor-discovery {
            secure-nd {
                admin-state enable
            }
        }
    }
classic CLI
A:node-2>config>router# info
#--------------------------------------------------
echo "IP Configuration"
#--------------------------------------------------
      interface "itf1"
            address 10.10.10.1/24
            port 1/1/1
            ipv6
                secure-nd
                    link-local-modifier 0xbe571f90d13a73ebde8ee34b0f90e5ad
                    no shutdown
                exit
                address 2000:1::/64 modifier 0x2ec57d275ba420d094deaeb7f0545827
            exit
            no shutdown

Configuring a route policy

Use the import route policy to filter routes imported by the local router from its neighbors. If no match is found, the local router does not import any routes.

Use the export route policy to determine which routes are exported from the route table to RIP. By default, RIP does not export learned routes to its neighbors. If no export policy is specified, non-RIP routes are not exported from the routing table manager to RIP.

If multiple policy names are specified, the policies are evaluated in the order they are specified. The first policy that matches is applied. If multiple export commands are issued, the last command entered overrides the previous command. A maximum of five policy names can be specified.

This section only provides brief instructions to configure route policies. For more details, see the Route policy configuration overview chapter.

Use the following command to enter the mode to create or edit route policies:

  • MD-CLI
    configure policy-options
  • classic CLI

    In the classic CLI, use the begin command in the following context to start creating or editing route policies.

    configure router policy-options

Other editing commands include:

  • the commit command saves and enables changes made to route policies during a session

  • the abort command discards changes that have been made to route policies during a session

Use the commands in the following context to configure a policy to use for the RIP global, group, and neighbor commands:

  • MD-CLI
    configure policy-options
  • classic CLI
    configure router policy-options

The following example display the policy option information.

MD-CLI
[ex:/configure policy-options]
A:admin@node-2# info
    policy-statement "RIP-policy" {
        entry 1 {
            action {
                action-type accept
            }
        }
        default-action {
            action-type reject
        }
    }
classic CLI
A:node-2>config>router>policy-options# info
----------------------------------------------
            policy-statement "RIP-policy"
                description "this is a test RIP policy"
                entry 1
                    action accept
                    exit
                exit
                default-action drop
                exit
----------------------------------------------

Use the begin command in the configure router policy-options context to enter edit mode and the commit command to save the changes.

Configuring RIP command options

Use the commands in the following context to configure RIP command options at the global, group, and neighbor level.

configure router rip group neighbor

Configuring global-level command options

After the RIP protocol instance is created, the no shutdown command is not required because RIP is administratively enabled upon creation. To enable RIP on a router, at least one group and one neighbor must be configured. There are no default groups or neighbors. Each group and neighbor must be explicitly configured.

Note: Careful planning is essential to implement commands that can affect the behavior of global, group, and neighbor levels. Because the RIP commands are hierarchical, analyze the values that can disable features on a specific level.

Use the commands in the following context to configure global-level RIP command options.

configure router rip

The following example displays the RIP group configuration.

MD-CLI
[ex:/configure router "Base" rip]
A:admin@node-2# info
    authentication-key "TRCHaEdwwfZ8PxeZSkzmH/nOiAQxBJXzPGXj hash2"
    authentication-type password
    timers {
        update 300
        timeout 600
        flush 600
    }
classic CLI
A:node-2>config>router>rip$ info
----------------------------------------------
            authentication-key "TRCHaEdwwfZ8PxeZSkzmH/nOiAQxBJXzPGXj" hash2
            authentication-type password
            timers 300 600 600
            no shutdown
----------------------------------------------

Configuring group-level command options

A group is a collection of related RIP peers. The group name should be a descriptive name for the group. Follow your group, name, and ID naming conventions for consistency and to help when troubleshooting faults.

All command options configured for a group are applied to the group and are inherited by each peer (neighbor), but a group command option can be overridden on a specific neighbor-level basis.

Use the commands in the following context to configure a group.

configure router rip group

The following example displays the RIP group configuration.

MD-CLI
[ex:/configure router "Base" rip]
A:admin@node-2# info
    authentication-key "TRCHaEdwwfZ8PxeZSkzmH/nOiAQxBJXzPGXj hash2"
    authentication-type password
    timers {
        update 300
        timeout 600
        flush 600
    }
    group "headquarters" {
        description "Mt. View"
    }
classic CLI
A:node-2>config>router>rip$ info
----------------------------------------------
            authentication-key "TRCHaEdwwfZ8PxeZSkzmH/nOiAQxBJXzPGXj" hash2
            authentication-type password
            timers 300 600 600
            group "headquarters"
                description "Mt. View"
                no shutdown
            exit
            no shutdown
----------------------------------------------

Configuring neighbor-level command options

After you create a group name and assign options, add neighbor interfaces within the same group. All command options configured for the peer group level are applied to each neighbor, but a group command option can be overridden on a specific neighbor basis.

Use the commands in the following context to add a neighbor to a group and define options that override the same group-level command value.

configure router rip group neighbor

The following example displays the neighbor configured in group ‟headquarters”.

MD-CLI
[ex:/configure router "Base" rip group "headquarters" neighbor "ferguson-274"]
A:admin@node-2# info
    message-size 255
    preference 255
    split-horizon true
classic CLI
A:node-2>config>router>rip>group>neighbor$ info
----------------------------------------------
                    message-size 255
                    preference 255
                    split-horizon enable
                    no shutdown
----------------------------------------------

RIP configuration management tasks

This section provides information about RIP configuration management tasks.

Modifying RIP command options

Modify, add, or remove RIP command options in the CLI. The changes are applied immediately. For the complete list of CLI commands, see the Configuring RIP command options.

Deleting a group

In the classic CLI, you must administratively disable a group before deleting it using the following command:

configure router rip group shutdown

Deleting the group without first shutting it down displays the following message.

INFO: RIP #1204 group should be administratively down - virtual router index 1,group
RIP-ALA-4 

Deleting a neighbor

In the classic CLI, you must administratively disable a neighbor before deleting it using the following command:

configure router rip group neighbor shutdown

Deleting the neighbor without first shutting it down causes the following message to appear.

INFO: RIP #1101 neighbor should be administratively down - virtual router index