Routing Information Protocol

from Wikipedia, the free encyclopedia
RIP in the TCP / IP protocol stack :
application RIP
transport UDP
Internet IP ( IPv4 , IPv6 )
Network access Ethernet Token
bus
Token
ring
FDDI ...

The Routing Information Protocol ( RIP ) is a routing - protocol based on the distance-vector routing protocol , which within one autonomous system (. Eg LAN) is used to the routing tables of routers to create automatically. It belongs to the class of Interior Gateway Protocols (IGP).

RIP was first defined in RFC 1058 (1988). The protocol has been expanded several times since then and is now available as RIP version 2 ( RFC 2453 ).

Both versions are still used today, but they are considered technically obsolete and have been replaced by newer protocols such as Open Shortest Path First (OSPF) or the OSI protocol IS-IS .

RIP is used in the IP and IPX protocols and was expanded under the name RIPng (RIP next generation) in RFC 2080 (1997) to also support IPv6.

overview

When a router is started, it only knows its directly connected networks . A new router therefore sends a request to all of its neighbors on each RIP-configured interface, asking them to send their complete routing table. From the answers received, the questioning router calculates the first entries in its as yet unfilled routing table. Then it sends a triggered update with its newly created routing table to all RIP neighbors so that they are informed about any new paths.

RIPv1 does not know any subnet information. A router can therefore only consider subnets in two ways: either it uses the subnet mask specially configured on its interface or it uses the standard subnet mask. Due to this restriction, networks managed via RIPv1 cannot take VLSM or distributed subnets into account.

In order to detect changes in the network (failure or start of a router), the sending of the routing table - the so-called advertisement  - is repeated regularly (every 30 seconds for IP), but the entire routing table is only sent to all direct neighbors. The routing information thus spreads relatively slowly in the network, with a maximum network expansion of 15 routers ("hops") the duration is already seven minutes. In addition, it is not guaranteed that the information will arrive at the neighboring routers, since the advertisements are sent via UDP , so the transmission is not reliable.

The costs (also metrics ) describe the effort to reach a certain network. With the RIP protocol, only the hop count is used to calculate the metric ; it denotes the number of routers that must be traversed along a path to the destination network. In contrast to other routing protocols, RIP does not take into account the bandwidth of several available routes. With RIP for IPX, the tick count is also used; it describes the delay of a packet through all routers to the destination network.

In contrast to OSPF and NLSP , a RIP router only ever knows its direct neighbors. When changes are made to the network, it takes a certain amount of time until all routers have a uniform view of the network again. When this state is reached, one speaks of convergence . By using the BFD protocol by RIP, convergence times in the millisecond range can be achieved.

The only direct acquaintance of his neighbors is also the biggest problem for RIP. On the one hand, there are long convergence times and the count-to-infinity problem. Infinity refers to the inaccessibility of a target and is specified with the hop count 16 for RIP.

example

Netz 1 – Router A ------- Router B ------- Router C

Network 1 is thus reached by:

  • Router A with hop 0
  • Router B with hop 1 via router A
  • Router C with hop 2 via router B and router A.

If router A fails, router B informs router C of the hop count 16 during the next periodic update: Infinity (cannot be reached). If a packet from another router arrives at router B that can still reach network 1, its hop count is lower and router B will update its routing table accordingly.

Problem cases

If network 1 has failed and router C sends its routing table to router B before the message that the network cannot be reached was propagated through the network, router B receives the information after the update from router A that network 1 is still via router C with a hop count 3 to be able to achieve. Router C has not yet updated its routing table and continues to send this outdated information to its neighbors until it learns the hop count 16 from there. Router B then takes over the route into network 1 with hop count 4.

On the next exchange, router B would send hop 4 to router C, which takes over this information and enters hop 5 in its routing table, since it has already reached network 1 via router B. Thus, both routers gradually rock themselves up to hop 16 - with the corresponding time delay until convergence.

Mechanisms for avoiding special cases of this problem are Split Horizon , Triggered Updates and (for RIP with IP) Split Horizon with Poisoned Reverse . With the extension algorithm RIP-MTI, routing loops can even be fully recognized and the count-to-infinity problem no longer occurs at all.

RIP therefore only allows networks with a maximum length of 15 routers (i.e. the longest path can go through a maximum of 15 routers). It also has other disadvantages, depending on the version: Long convergence time, only small to medium-sized networks, flooding of the network by exchanging the routing tables with RIPv1 (every 30 seconds for IP, every 60 seconds for IPX) via broadcast , no subnet support and none Authentication. RIP is being replaced more and more by OSPF .

Versions

There are three versions of RIP: RIP (v1), RIPv2 and RIPng.

The Bellman-Ford algorithm on which the RIP protocol is based was used for the first time in a computer network in 1967 as the first routing protocol for the ARPANET .

RIPv1

The original specification of RIP in RFC 1058 does not yet use CIDR . The routing information sent regularly does not contain any information about the subnets used, so that all networks must have the size of the associated network class. Furthermore, no authentication option is provided in RIPv1, so that various attacks on the routing of a network can take place. RIPv1 also limits the number of possible HOPs between routers to 15.

RIPv2

With the version RIPv2 in 1993 some restrictions were removed. RIPv2 represents the seamless transition to a new version of RIPv1, with the aim of removing the limitation of the subnet information not being passed on, while largely retaining the packet format and its transport mechanism. Therefore RIPv2 turns into a classless protocol CIDR as the most important difference from the previous version, but it has also further minor adjustments such as the use of multicast addresses Multicast for updates or authentication options. However, many of the features that characterize RIPv1 are retained in RIPv2. This includes the reachability limit with 15 "hops", the use of the mechanisms for loop suppression and triggered updates for faster convergence.

RIPng

RIPng is defined in RFC 2080 and contains extensions to support IPv6 .

Package formats

RIP v1

command version must be zero
address family identifier (of net 1) must be zero
IP address (of net 1)
must be zero
must be zero
metric (distance to net 1)
address family identifier (of net 2) must be zero
IP address (of net 2)
must be zero
must be zero
metric (distance to net 2)
...
address family identifier (of net 25) must be zero
IP address (of net 25)
must be zero
must be zero
metric (distance to net 25)

The table is 4 bytes wide, blocks via net2 – net25 are optional.

RIP v2

command version must be zero
RIP entry (20 bytes)

The tables are 4 bytes wide.

Depending on the entry in the version field , a RIP entry consists of a RIPv1 entry ( AFI etc.), a RIPv2 entry (see below) or an authentication entry (see below). More details are in RFC 2453 .

Examples of a RIP entry

1. RIP entry with subnet mask ( version must be set to 2)

address family identifier route tag
IP address
Subnet mask
Next hop
Metric

2. RIP entry with authentication ( version must be set to 2)

0xFFFF Authentication Type
Authentication (16 bytes)

Free software implementations

  • Quagga (further development of Zebra)

See also

OSPF , IGRP , EIGRP , BGP , IS-IS , BFD

Web links