Routing Information Protocol

Last updated

The Routing Information Protocol (RIP) is one of the oldest distance-vector routing protocols which employs the hop count as a routing metric. RIP prevents routing loops by implementing a limit on the number of hops allowed in a path from source to destination. The largest number of hops allowed for RIP is 15, which limits the size of networks that RIP can support.

Contents

RIP implements the split horizon, route poisoning, and holddown mechanisms to prevent incorrect routing information from being propagated.

In RIPv1 routers broadcast updates with their routing table every 30 seconds. In the early deployments, routing tables were small enough that the traffic was not significant. As networks grew in size, however, it became evident there could be a massive traffic burst every 30 seconds, even if the routers had been initialized at random times.

In most networking environments, RIP is not the preferred choice of routing protocol, as its time to converge and scalability are poor compared to EIGRP, OSPF, or IS-IS. However, it is easy to configure, because RIP does not require any parameters, unlike other protocols.

RIP uses the User Datagram Protocol (UDP) as its transport protocol, and is assigned the reserved port number 520. [1]

Development of distance-vector routing

Based on the Bellman–Ford algorithm and the Ford–Fulkerson algorithm, distance-vector routing protocols started to be implemented from 1969 onwards in data networks such as the ARPANET and CYCLADES. The predecessor of RIP was the Gateway Information Protocol (GWINFO) which was developed by Xerox in the mid-1970s to route its experimental network. As part of the Xerox Network Systems (XNS) protocol suite GWINFO transformed into the XNS Routing Information Protocol. This XNS RIP in turn became the basis for early routing protocols, such as Novell's IPX RIP, AppleTalk's Routing Table Maintenance Protocol (RTMP), and the IP RIP. The 1982 Berkley Software Distribution of the UNIX operating system implemented RIP in the routed daemon. The 4.2BSD release proved popular and became the basis for subsequent UNIX versions, which implemented RIP in the routed or gated daemon. Ultimately, RIP had been extensively deployed [2] before the standard, written by Charles Hedrick, was passed as RIPv1 in 1988. [3]

The RIP hop count

The routing metric used by RIP counts the number of routers that need to be passed to reach a destination IP network. The hop count 0 denotes a network that is directly connected to the router. 16 hops denote a network that is unreachable, according to the RIP hop limit. [4]

Versions

There are three standardized versions of the Routing Information Protocol: RIPv1 and RIPv2 for IPv4, and RIPng for IPv6.

RIP version 1

The original specification of RIP was published in 1988. [3] When starting up, and every 30 seconds thereafter, a router with RIPv1 implementation broadcasts to 255.255.255.255 a request message through every RIPv1 enabled interface. Neighbouring routers receiving the request message respond with a RIPv1 segment, containing their routing table. The requesting router updates its own routing table, with the reachable IP network address, hop count and next hop, that is the router interface IP address from which the RIPv1 response was sent. As the requesting router receives updates from different neighbouring routers it will only update the reachable networks in its routing table, if it receives information about a reachable network it has not yet in its routing table or information that a network it has in its routing table is reachable with a lower hop count. Therefore, a RIPv1 router will in most cases only have one entry for a reachable network, the one with the lowest hop count. If a router receives information from two different neighbouring router that the same network is reachable with the same hop count but via two different routes, the network will be entered into the routing table two times with different next hop routers. The RIPv1 enabled router will then perform what is known as equal-cost load balancing for IP packets. [4]

RIPv1 enabled routers not only request the routing tables of other routers every 30 seconds, they also listen to incoming requests from neighbouring routers and send their own routing table in turn. RIPv1 routing tables are therefore updated every 25 to 35 seconds. [4] The RIPv1 protocol adds a small random time variable to the update time, to avoid routing tables synchronizing across a LAN. [5] It was thought, as a result of random initialization, the routing updates would spread out in time, but this was not true in practice. Sally Floyd and Van Jacobson showed in 1994 that, without slight randomization of the update timer, the timers synchronized over time. [6]

RIPv1 can be configured into silent mode, so that a router requests and processes neighbouring routing tables, and keeps its routing table and hop count for reachable networks up to date, but does not needlessly send its own routing table into the network. Silent mode is commonly implemented to hosts. [7]

RIPv1 uses classful routing. The periodic routing updates do not carry subnet information, lacking support for variable length subnet masks (VLSM). This limitation makes it impossible to have different-sized subnets inside of the same network class. In other words, all subnets in a network class must have the same size. There is also no support for router authentication, making RIP vulnerable to various attacks.

RIP version 2

Due to the deficiencies of the original RIP specification, RIP version 2 (RIPv2) was developed in 1993, [4] published in 1994, [8] and declared Internet Standard 56 in 1998. [9] It included the ability to carry subnet information, thus supporting Classless Inter-Domain Routing (CIDR). To maintain backward compatibility, the hop count limit of 15 remained. RIPv2 has facilities to fully interoperate with the earlier specification if all Must Be Zero protocol fields in the RIPv1 messages are properly specified. In addition, a compatibility switch feature [9] allows fine-grained interoperability adjustments.

In an effort to avoid unnecessary load on hosts that do not participate in routing, RIPv2 multicasts the entire routing table to all adjacent routers at the address 224.0.0.9, as opposed to RIPv1 which uses broadcast. Unicast addressing is still allowed for special applications.

(MD5) authentication for RIP was introduced in 1997. [10] [11]

Route tags were also added in RIP version 2. This functionality allows a distinction between routes learned from the RIP protocol and routes learned from other protocols.

RIPng

RIPng (RIP next generation) is an extension of RIPv2 for support of IPv6, the next generation Internet Protocol. [12] The main differences between RIPv2 and RIPng are:

RIPng sends updates on UDP port 521 using the multicast group ff02::9.

RIP messages between routers

RIP messages use the User Datagram Protocol on port 520 and all RIP messages exchanged between routers are encapsulated in a UDP segment. [4]

RIPv1 Messages

RIP defined two types of messages:

Request Message
Asking a neighbouring RIPv1 enabled router to send its routing table.
Response Message
Carries the routing table of a router.

Timers

The routing information protocol uses the following timers as part of its operation: [14]

Update Timer
Controls the interval between two gratuitous Response Messages. By default the value is 30 seconds. The response message is broadcast to all its RIP enabled interface. [14]
Invalid Timer
The invalid timer specifies how long a routing entry can be in the routing table without being updated. This is also called as expiration Timer. By default, the value is 180 seconds. After the timer expires the hop count of the routing entry will be set to 16, marking the destination as unreachable. [14]
Flush Timer
The flush timer controls the time between the route is invalidated or marked as unreachable and removal of entry from the routing table. By default the value is 240 seconds. This is 60 seconds longer than Invalid timer. So for 60 seconds the router will be advertising about this unreachable route to all its neighbours. This timer must be set to a higher value than the invalid timer. [14]
Holddown Timer
The hold-down timer is started per route entry, when the hop count is changing from lower value to higher value. This allows the route to get stabilized. During this time no update can be done to that routing entry. This is not part of the RFC 1058. This is Cisco's implementation. The default value of this timer is 180 seconds. [14]

Limitations

Implementations

Similar protocols

Cisco's proprietary Interior Gateway Routing Protocol (IGRP) was a somewhat more capable protocol than RIP. It belongs to the same basic family of distance-vector routing protocols.

Cisco has ceased support and distribution of IGRP in their router software. It was replaced by the Enhanced Interior Gateway Routing Protocol (EIGRP) which is a completely new design. While EIGRP still uses a distance-vector model, it relates to IGRP only in using the same composite routing metric. Both IGRP and EIGRP calculated a single composite metric for each route, from a formula of five variables: bandwidth, delay, reliability, load, and MTU; though on Cisco routers, by default, only bandwidth and delay are used in this calculation.

See also

Related Research Articles

The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol (IP) networks for automatically assigning IP addresses and other communication parameters to devices connected to the network using a client–server architecture.

An Internet Protocol address is a numerical label such as 192.0.2.1 that is connected to a computer network that uses the Internet Protocol for communication. An IP address serves two main functions: network interface identification and location addressing.

The Internet Control Message Protocol (ICMP) is a supporting protocol in the Internet protocol suite. It is used by network devices, including routers, to send error messages and operational information indicating success or failure when communicating with another IP address, for example, an error is indicated when a requested service is not available or that a host or router could not be reached. ICMP differs from transport protocols such as TCP and UDP in that it is not typically used to exchange data between systems, nor is it regularly employed by end-user network applications.

<span class="mw-page-title-main">Internet Protocol version 4</span> Fourth version of the Internet Protocol

Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version deployed for production on SATNET in 1982 and on the ARPANET in January 1983. It is still used to route most Internet traffic today, even with the ongoing deployment of Internet Protocol version 6 (IPv6), its successor.

<span class="mw-page-title-main">IPv6</span> Version 6 of the Internet Protocol

Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion, and is intended to replace IPv4. In December 1998, IPv6 became a Draft Standard for the IETF, which subsequently ratified it as an Internet Standard on 14 July 2017.

Border Gateway Protocol (BGP) is a standardized exterior gateway protocol designed to exchange routing and reachability information among autonomous systems (AS) on the Internet. BGP is classified as a path-vector routing protocol, and it makes routing decisions based on paths, network policies, or rule-sets configured by a network administrator.

A multicast address is a logical identifier for a group of hosts in a computer network that are available to process datagrams or frames intended to be multicast for a designated network service. Multicast addressing can be used in the link layer, such as Ethernet multicast, and at the internet layer for Internet Protocol Version 4 (IPv4) or Version 6 (IPv6) multicast.

In computing, Internet Protocol Security (IPsec) is a secure network protocol suite that authenticates and encrypts packets of data to provide secure encrypted communication between two computers over an Internet Protocol network. It is used in virtual private networks (VPNs).

Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP) networks. It uses a link state routing (LSR) algorithm and falls into the group of interior gateway protocols (IGPs), operating within a single autonomous system (AS).

Enhanced Interior Gateway Routing Protocol (EIGRP) is an advanced distance-vector routing protocol that is used on a computer network for automating routing decisions and configuration. The protocol was designed by Cisco Systems as a proprietary protocol, available only on Cisco routers. In 2013 Cisco decided to allow other vendors freely implement limited version of EIGRP with some of its associated features such as High Availability (HA), while withholding other EIGRP features such as EIGRP stub, needed for DMVPN and large-scale campus deployment, exclusively for themselves. Information needed for implementation was published with informational status as RFC 7868 in 2016, which did not make it into an Internet Standards Track specification and allowed Cisco to retain control of the EIGRP protocol.

<span class="mw-page-title-main">Network address translation</span> Protocol facilitating connection of one IP address space to another

Network address translation (NAT) is a method of mapping an IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device. The technique was originally used to bypass the need to assign a new address to every host when a network was moved, or when the upstream Internet service provider was replaced, but could not route the network's address space. It has become a popular and essential tool in conserving global address space in the face of IPv4 address exhaustion. One Internet-routable IP address of a NAT gateway can be used for an entire private network.

<span class="mw-page-title-main">Subnetwork</span> Logical subdivision of an IP network

A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing a network into two or more networks is called subnetting.

A distance-vector routing protocol in data networks determines the best route for data packets based on distance. Distance-vector routing protocols measure the distance by the number of routers a packet has to pass; one router counts as one hop. Some distance-vector protocols also take into account network latency and other factors that influence traffic on a given route. To determine the best route across a network, routers using a distance-vector protocol exchange information with one another, usually routing tables plus hop counts for destination networks and possibly other traffic information. Distance-vector routing protocols also require that a router inform its neighbours of network topology changes periodically.

The Internet Group Management Protocol (IGMP) is a communications protocol used by hosts and adjacent routers on IPv4 networks to establish multicast group memberships. IGMP is an integral part of IP multicast and allows the network to direct multicast transmissions only to hosts that have requested them.

The Virtual Router Redundancy Protocol (VRRP) is a computer networking protocol that provides for automatic assignment of available Internet Protocol (IP) routers to participating hosts. This increases the availability and reliability of routing paths via automatic default gateway selections on an IP subnetwork.

The Dynamic Host Configuration Protocol version 6 (DHCPv6) is a network protocol for configuring Internet Protocol version 6 (IPv6) hosts with IP addresses, IP prefixes, default route, local segment MTU, and other configuration data required to operate in an IPv6 network. It is the IPv6 equivalent of the Dynamic Host Configuration Protocol for IPv4.

<span class="mw-page-title-main">Routing protocol</span> Network protocol for distributing routing information to network equipment

A routing protocol specifies how routers communicate with each other to distribute information that enables them to select routes between nodes on a computer network. Routers perform the traffic directing functions on the Internet; data packets are forwarded through the networks of the internet from router to router until they reach their destination computer. Routing algorithms determine the specific choice of route. Each router has a prior knowledge only of networks attached to it directly. A routing protocol shares this information first among immediate neighbors, and then throughout the network. This way, routers gain knowledge of the topology of the network. The ability of routing protocols to dynamically adjust to changing conditions such as disabled connections and components and route data around obstructions is what gives the Internet its fault tolerance and high availability.

An IPv6 transition mechanism is a technology that facilitates the transitioning of the Internet from the Internet Protocol version 4 (IPv4) infrastructure in use since 1983 to the successor addressing and routing system of Internet Protocol Version 6 (IPv6). As IPv4 and IPv6 networks are not directly interoperable, transition technologies are designed to permit hosts on either network type to communicate with any other host.

<span class="mw-page-title-main">IPv6 address</span> Label to identify a network interface of a computer or other network node

An Internet Protocol Version 6 address is a numeric label that is used to identify and locate a network interface of a computer or a network node participating in a computer network using IPv6. IP addresses are included in the packet header to indicate the source and the destination of each packet. The IP address of the destination is used to make decisions about routing IP packets to other networks.

An IPv6 packet is the smallest message entity exchanged using Internet Protocol version 6 (IPv6). Packets consist of control information for addressing and routing and a payload of user data. The control information in IPv6 packets is subdivided into a mandatory fixed header and optional extension headers. The payload of an IPv6 packet is typically a datagram or segment of the higher-level transport layer protocol, but may be data for an internet layer or link layer instead.

References

  1. "Service Name and Transport Protocol Port Number Registry". www.iana.org. The Internet Assigned Numbers Authority (IANA). p. 10. Retrieved 25 February 2022.
  2. Jeff Doyle & Jennifer Carroll (2005). CCIE Professional Development: Routing TCP/IP Volume I, Second Edition. ciscopress.com. p. 169. ISBN   9781587052026.{{cite book}}: CS1 maint: uses authors parameter (link)
  3. 1 2 C. Hedrick (June 1988). Routing Information Protocol. Network Working Group. doi: 10.17487/RFC1058 . RFC 1058.Historic. Updated by RFC  1388 and 1723.
  4. 1 2 3 4 5 Jeff Doyle & Jennifer Carroll (2005). CCIE Professional Development: Routing TCP/IP Volume I, Second Edition. ciscopress.com. p. 170. ISBN   9781587052026.{{cite book}}: CS1 maint: uses authors parameter (link)
  5. Jeff Doyle & Jennifer Carroll (2005). CCIE Professional Development: Routing TCP/IP Volume I, Second Edition. ciscopress.com. p. 171. ISBN   9781587052026.{{cite book}}: CS1 maint: uses authors parameter (link)
  6. The Synchronization of Periodic Routing Messages, S. Floyd & V. Jacobson,April 1994
  7. Jeff Doyle & Jennifer Carroll (2005). CCIE Professional Development: Routing TCP/IP Volume I, Second Edition. ciscopress.com. p. 175. ISBN   9781587052026.{{cite book}}: CS1 maint: uses authors parameter (link)
  8. G. Malkin (November 1994). RIP Version 2 - Carrying Additional Information. Network Working Group. doi: 10.17487/RFC1723 . RFC 1723.Obsolete. Obsoleted by RFC  2453. Obsoletes RFC  1388. Updates RFC  1058.
  9. 1 2 G. Malkin (November 1998). RIP Version 2. Network Working Group. doi: 10.17487/RFC2453 . STD 53. RFC 2453.Internet Standard. Obsoletes RFC  1723 and 1388. Updated by RFC  4822.
  10. F. Baker; R. Atkinson (January 1997). RIP-2 MD5 Authentication. Network Working Group. doi: 10.17487/RFC2082 . RFC 2082.Obsolete. Obsoleted by RFC  4822.
  11. R. Atkinson; M. Fanto (February 2007). RIPv2 Cryptographic Authentication. Network Working Group. doi: 10.17487/RFC4822 . RFC 4822.Proposed Standard. Obsoletes RFC  2082. Updates RFC  2453.
  12. G. Malkin; R. Minnear (January 1997). RIPng for IPv6. Network Working Group. doi: 10.17487/RFC2080 . RFC 2080.G. Malkin (January 1997). RIPng Protocol Applicability Statement. Network Working Group. doi: 10.17487/RFC2080 . RFC 2080.Proposed Standard.
  13. Juniper Networks JNCIP-ENT. Cardiff, United Kingdom.
  14. 1 2 3 4 5 Balchunas, Aaron. "Routing Information Protocol (RIP v1.03)" (PDF). routeralley.com. Archived (PDF) from the original on 10 October 2022. Retrieved 25 April 2014.
  15. C. Hendrik (June 1988). "RFC 1058 Section 2.2". Routing Information Protocol. The Internet Society. doi: 10.17487/RFC1058 .
  16. "Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide, Release 6.x - Configuring RIP [Cisco Nexus 9000 Series Switches]".
  17. "routed, rdisc – network RIP and router discovery routing daemon". FreeBSD manual pages.
  18. "routed, rdisc – network RIP and router discovery routing daemon". NetBSD manual pages.
  19. "ripd – Routing Information Protocol daemon". OpenBSD manual pages.
  20. "How do I change the LAN TCP/IP settings on my Nighthawk router?". Netgear Support pages.

Further reading