Chapter 5. Routing 149
5.1.3 Routing Information Protocol (RIP)
This section provides an overview of the RIP protocol. RIP is designed to manage relatively
small networks.
RIP uses a hop count (distance vector) to determine the best possible route to a network or
host. The hop count is also known as the routing metric, or the cost of the route. A router is
defined as being zero hops away from its directly connected networks, one hop away from
networks that can be reached through one gateway, and so on. The fewer hops, the better.
The route that has the fewest hops will be the preferred path to a destination. A hop count of
16 means infinity, or that the destination cannot be reached. Thus, very large networks with
more than 15 hops between potential partners cannot make use of RIP. The information is
kept in a distance vector table, which is periodically advertised to each neighboring router.
The router also receives updates from neighboring gateways and uses these to update its
routing tables. If an update is not received for three minutes, a gateway is assumed to be
down, and all routes through that gateway are set to a metric of 16 (infinity).
Basic distance vector algorithm
The following procedure is carried out by every entity that participates in the RIP routing
protocol. This must include all of the gateways in the system. Hosts that are not gateways
may participate as well.
򐂰 Keep a table with an entry for every possible destination in the system. The entry contains
the distance D to the destination, and the first gateway G on the route to the network.
򐂰 Periodically, send a routing update to every neighbor. The update is a set of messages
that contains all the information from the routing table. It contains an entry for each
destination, with the distance shown to that destination.
򐂰 When a routing update arrives from the neighbor G', add the metric associated with the
network that is shared with G'. Call the resulting distance D'. Compare the resulting
distance with the current routing table entries. If the new distance D' for N is smaller than
the existing value D, adopt the new route. That is, change the table entry for N to have
metric D' and gateway G'. If G' is the gateway from which the existing route came, G' = G,
then use the new metric, even if it is larger than the old one.
RIP version 1
RIP is a protocol that manages IP routing table entries dynamically. The gateways using RIP
exchange their routing information in order to allow the neighbors to learn of topology
changes. The RIP server updates the local routing tables dynamically, resulting in current and
accurate routing tables. The protocol is based on the exchange of protocol data units (PDUs)
between RIP servers (OMPROUTE). There are various types of PDUs, but the two most
important PDUs are:
REQUEST PDU Sent from an OMPROUTE server as a request to other OMPROUTE
servers to transmit their routing tables immediately.
RESPONSE PDU Sent from an OMPROUTE server to other OMPROUTE servers either
as a response to a REQUEST PDU or as a result of expiration of the
broadcast timer (every 30 seconds).
RIP V1 limitations
Since RIP is designed for a specific network environment, it has some limitations. These
should be considered before implementing RIP in your network.
򐂰 RIP V1 declares a route invalid if it passes through 16 or more gateways. Therefore, RIP
V1 places a limitation of 15 hops on the size of a large network.

Get Communications Server for z/OS V1R7 TCP/IP Implementation, Volume 1: Base Functions, Connectivity, and Routing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.