Skip to main content

3. IP Routing Information Protocol Version 1

This section should be read in conjunction with reference [1].

IP RIP is a UDP-based protocol which generally sends and receives datagrams on UDP port number 520.

To support the mechanism outlined in this proposal the packet format for RIP version 1 [1] is modified as shown in Figure 2.

Every Routing Information Protocol datagram contains the following:

COMMAND Commands supported in RIP Version 1 are: request (1), response (2), traceon (3), traceoff (4), SUN reserved (5). The fields sequence number, fragment number and number of fragments MUST NOT be included in packets with these command values.

The following new commands (with values in brackets) are required:

TRIGGERED REQUEST (6)

A request for the responding system to send all of its routing database.

Only the first 4 octets of the packet format shown in figure 2 are sent, since all routing information is implied by this request type.

TRIGGERED RESPONSE (7)

A message containing all of the sender's routing database, excluding those entries learned from the interface to which the routing information is being sent.

This message may be sent in response to a triggered request, or it may be an update message resulting from a change in the routing database.

A triggered response message MUST be sent in response to a triggered request message even if there are no routes to propagate. This would be the case for a host which had a WAN interface only, but which wished to run the triggered update protocol.

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) | must be zero (2) |
+---------------+---------------+-------------------------------+

The following new fields are inserted for some commands

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sequence number (2) | fragment (1) |no of frags (1)|
+-------------------------------+-------------------------------+

Followed by up to 25 routing entries (each 20 octets)

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| address family identifier (2) | must be zero (2) |
+-------------------------------+-------------------------------+
| IP address (4) |
+---------------------------------------------------------------+
| must be zero (4) |
+---------------------------------------------------------------+
| must be zero (4) |
+---------------------------------------------------------------+
| metric (4) |
+---------------------------------------------------------------+
.
.

The format of an IP RIP datagram in octets, with each tick mark representing one bit. All fields are in network order.

The four octets: sequence number (2), fragment number (1) and number of fragments (1) are not present in the original RIP specification. They are only present if command takes the values 7 or 8.

Figure 2. IP Routing Information Protocol packet format

TRIGGERED ACKNOWLEDGEMENT (8)

A message sent in response to every triggered response packet received.

Only the first 8 octets of the packet format shown in figure 2 are sent.

VERSION In this instance Version 1.

SEQUENCE NUMBER

This is a new field inserted if command takes the values 7 or 8.

The sequence number MUST be incremented every time updated information is sent out on a WAN. The sequence number wraps round at 65535.

When a triggered acknowledgement is sent the sequence number is set to the same value as the triggered response packet being acknowledged.

The sequence number MUST be identical over fragments. If a fragment is retransmitted the sequence number MUST not change.

FRAGMENT NUMBER

The fragment number is one for the first fragment of a routing update, and is incremented for each subsequent fragment. A fragment can contain up to 25 routing entries.

When a triggered acknowledgement is sent the fragment number is set to the same value as the triggered response packet being acknowledged.

NUMBER OF FRAGMENTS

In a triggered response packet this indicates the number of packets required to complete the routing update.

This field has no relevance for triggered acknowledgement packets so should be set to zero.

For triggered response packets the rest of the datagram contains a list of destinations, with information about each. Each entry in this list contains the address family identifier (2 for IP), a destination network or host, and the metric for it. The packet format is intended to allow RIP to carry routing information for several different protocols, identifiable by the family identifier.

The IP address is the usual Internet address, stored as 4 octets in network order. The metric field contains a value between 1 and 15 inclusive, specifying the current metric for the destination, or the value 16 (representing 'infinity'), which indicates that the destination is not reachable. Each route sent by a router supersedes any previous route to the same destination from the same router.

The maximum datagram size is 508 octets, excluding UDP and IP headers.