7. RIP

This chapter provides information on configuring RIP on the 7705 SAR.

Topics in this chapter include:

7.1. RIP Overview

Routing Information Protocol (RIP) is an interior gateway protocol (IGP) that uses a Bellman-Ford distance-vector algorithm to determine the best route to a destination, using hop count as the metric. In order for the protocol to provide complete information on routing, every router in the domain must participate in the protocol.

The 7705 SAR supports RIPv1 and RIPv2 on all IP network interfaces. RIPv1, specified in RFC 1058, was written and implemented prior to the introduction of CIDR. The RIPv1 protocol does not send subnet mask information during routing updates; instead, it assumes the subnet mask information for non-local routes based on the class the route belongs to:

  1. Class A – 8-bit mask
  2. Class B – 16-bit mask
  3. Class C – 24-bit mask

RIPv2, as defined in RFC 2453, was written after CIDR was developed and transmits subnet mask 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 hosts and routers only support RIPv1, especially when RIP is used simply to advertise default routing information.

RIP, which is carried over UDP protocol, updates its neighbors, and the neighbors update their neighbors, and so on. Each host that uses RIP has a routing process that sends and receives datagrams on UDP port number 520. Although the RIP mechanism is fairly simple, it requires a lot of convergence time in large networks and is prone to routing loops unless additional measures are taken.

Each RIP router advertises all RIP routes periodically via RIP updates. By default, each update can contain a maximum of 25 route advertisements. This limit is imposed by RIP specifications. RIP can be configured to send as many as 255 routes per update. RIPv1 and RIPv2 updates are formatted slightly differently. RIPv1 updates are sent to a broadcast address (255.255.255.255); RIPv2 updates can be sent either to a broadcast or multicast address (224.0.0.9).

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.

7.1.1. RIP Versions

You can specify the RIP version that will be sent to RIP neighbors and the version of RIP updates that will be accepted and processed. The 7705 SAR allows the following combinations:

  1. send only RIPv1 or RIPv2 messages to either the broadcast or multicast address, or send no messages
    If the sending router’s RIP interface is configured to send to the broadcast address, the receiving router interface must be configured to allow directed broadcasts in the config>router>interface context. The 7705 SAR sends RIPv2 formatted messages to the broadcast address by default.
  2. receive only RIPv1 updates, receive only RIPv2 updates, receive both RIPv1 and RIPv2 updates, or receive no updates
    The 7705 SAR receives both RIPv1 and RIPv2 updates by default.

7.1.2. RIPv2 Authentication

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

7.1.3. Metrics

By default, RIP advertises all RIP routes to each peer every 30 s. RIP uses a hop count metric to determine the distance between the packet’s source and destination. The metric/cost value for a valid route is 1 through 15.

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 1.

The maximum number of hops in a path is 15. The router treats any number over 15 as infinitely large. If a router receives a routing update with a metric of 15 that contains a new or modified entry, the route metric value increments to 16 and the destination is considered unreachable.

The 7705 SAR uses split horizon and split horizon with poison reverse to avoid looping routes propagating through the network. When split horizon is enabled, the local router does not readvertise routes learned from a neighbor back to the same neighbor. When split horizon with poison is enabled and the router receives an update over an interface, the router sets the route metric to 16 (infinity) and advertises the route back to the network where it is now considered unreachable.

7.1.4. Timers

RIP uses three timers to determine how often RIP updates are sent and how long routes are maintained:

  1. update — times the interval between periodic routing updates
  2. timeout — 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.
  3. flush — when the flush timer expires, the route is removed from the tables

7.1.5. Import and Export Policies

Routing policies control the content of the routing tables, the routes that are advertised, and the best route to take 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.

There are no default import or export routing policies. Policies must be explicitly created and applied with RIP import or export commands.

7.1.6. RIP Packet Format

There can be 1 to 25 route entries. The RIP packet header format is displayed in Figure 25. Figure 26 and Figure 27 display the RIPv1 and RIPv2 packet formats.

Figure 25:  RIP Packet Format 
Figure 26:  RIPv1 Packet Format 
Figure 27:  RIPv2 Packet Format 

RIP packets contain the following fields:

  1. Command — indicates whether the packet is a request or a response message. A request message asks the responding system to send all or part of its routing table. The response message may be sent in response to a request, or it may be an unsolicited routing update generated by the sender.
  2. Version — specifies the RIP version used and can be used to signal different, and potentially incompatible, versions
  3. Must be zero — provides backward compatibility with pre-standard varieties of RIP. RIP messages with non-zero values in this field are rejected unless the check-zero command is disabled.
  4. Address family identifier (AFI) — 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.
  5. IP Address — the IP address for the packet
  6. Metric — specifies the number of hops to the destination
  7. Next hop — the IP address of the next router along the path to the destination. This field appears only in RIPv2 packets.
  8. Subnet mask — the subnet mask for the entry. If this field is 0, no subnet mask has been specified for the entry. This field appears only in RIPv2 packets.

7.1.7. RIP Hierarchical Levels

The minimum RIP configuration must define one group and one neighbor. The parameters configured at the RIP global level are inherited by the group and neighbor levels. Parameters can be modified and overridden on a level-specific basis. The RIP command hierarchy consists of three levels:

  1. global
  2. group
  3. neighbor

Hierarchical RIP commands can be modified on different levels. The most specific value is used. A RIP group-specific command takes precedence over a global RIP command. A neighbor-specific command takes precedence over a global RIP or group-specific RIP command.

7.2. RIP Configuration Process Overview

Figure 28 displays the process to configure RIP parameters.

Figure 28:  RIP Configuration and Implementation Flow 

7.3. Configuration Notes

The following guidelines and caveats apply to RIP configuration.

  1. Before RIP neighbor parameters can be configured, router interfaces must be configured.
  2. RIP must be explicitly created for each router interface. There are no default RIP instances on a 7705 SAR router.