Skip to main content

3. Protocol Extensions

This document does not change the RIP protocol per se. Rather, it provides extensions to the datagram format which allows routers to share important additional information. The new RIP datagram format is:

 0                   1                   2                   3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Command (1) | Version (1) | Routing Domain (2) |
+---------------+---------------+-------------------------------+
| Address Family Identifier (2) | Route Tag (2) |
+-------------------------------+-------------------------------+
| IP Address (4) |
+---------------------------------------------------------------+
| Subnet Mask (4) |
+---------------------------------------------------------------+
| Next Hop (4) |
+---------------------------------------------------------------+
| Metric (4) |
+---------------------------------------------------------------+

The Command, Address Family Identifier (AFI), IP Address, and Metric all have the meanings defined in RFC 1058. The Version field will specify version number 2 for RIP datagrams which use authentication or carry information in any of the newly defined fields. All fields are coded in IP network byte order (big-endian).

3.1. Authentication​

Since authentication is a per packet function, and since there is only one 2-byte field available in the packet header, and since any reasonable authentication scheme will require more than two bytes, the authentication scheme for RIP version 2 will use the space of an entire RIP entry. If the Address Family Identifier of the first (and only the first) entry in the packet is 0xFFFF, then the remainder of the entry contains the authentication. This means that there can be, at most, 24 RIP entries in the remainder of the packet. If authentication is not in use, then no entries in the packet should have an Address Family Identifier of 0xFFFF. A RIP packet which contains an authentication entry would have the following format:

 0                   1                   2                   3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Command (1) | Version (1) | Routing Domain (2) |
+---------------+---------------+-------------------------------+
| 0xFFFF | Authentication Type (2) |
+-------------------------------+-------------------------------+
~ Authentication (16) ~
+---------------------------------------------------------------+

Currently, the only Authentication Type is simple password and it is type 2. The remaining 16 bytes contain the plain text password. If the password is under 16 bytes, it must be left-justified and padded to the right with nulls (0x00).

3.2. Routing Domain​

The Routing Domain (RD) number is the number of the routing process to which this update belongs. This field is used to associate the routing update to a specific routing process on the receiving router. The RD is needed to allow multiple, independent RIP "clouds" to co- exist on the same physical wire. This gives administrators the ability to run multiple, possibly parallel, instances of RIP in order to implement simple policy. This means that a router operating within one routing domain, or a set of routing domains, should ignore RIP packets which belong to another routing domain. RD 0 is the default routing domain.

3.3. Route Tag​

The Route Tag (RT) field exists as a support for EGPs. The contents and use of this field are outside the scope of this protocol. However, it is expected that the field will be used to carry Autonomous System numbers for EGP and BGP. Any RIP system which receives a RIP entry which contains a non-zero RT value must re- advertise that value. Those routes which have no RT value must advertise an RT value of zero.

3.4. Subnet mask​

The Subnet Mask field contains the subnet mask which is applied to the IP address to yield the non-host portion of the address. If this field is zero, then no subnet mask has been included for this entry. On an interface where a RIP-1 router may hear and operate on the information in a RIP-2 routing entry the following two rules apply:

  1. information internal to one network must never be advertised into another network, and
  2. information about a more specific subnet may not be advertised where RIP-1 routers would consider it a host route.

3.5. Next Hop​

The immediate next hop IP address to which packets to the destination specified by this route entry should be forwarded. Specifying a value of 0.0.0.0 in this field indicates that routing should be via the originator of the RIP advertisement. An address specified as a next hop must, per force, be directly reachable on the logical subnet over which the advertisement is made. The purpose of the Next Hop field is to eliminate packets being routed through extra hops in the system. It is particularly useful when RIP is not being run on all of the routers on a network. A simple example is given in Appendix A. Note that Next Hop is an "advisory" field. That is, if the provided information is ignored, a possibly sub-optimal, but absolutely valid, route may be taken.

3.6. Multicasting​

In order to reduce unnecessary load on those hosts which are not listening to RIP-2 packets, an IP multicast address will be used for periodic broadcasts. The IP multicast address is 224.0.0.9. Note that IGMP is not needed since these are inter-router messages which are not forwarded. In order to maintain backwards compatibility, the use of the multicast address will be configurable, as described in section 4.1. If multicasting is used, it should be used on all interfaces which support it.