RFC 1388

RIP Version 2 Carrying Additional Information

๐Ÿ“… published January 1993, from ietf

RIP Version 2 Carrying Additional Information ๐ŸŽ€

Network Working Group ๐Ÿ’– Request for Comments: 1388 โœจ

  • Author: G. Malkin, Xylogics, Inc. ๐Ÿ’…
  • Category: IAB standards track protocol ๐Ÿ”ฅ
  • Date: January 1993 ๐ŸŒธ
  • Updates: RFC 1058 ๐Ÿฆ‹ (its header doesn't list anything it obsoletes)

Status of this Memo โœจ

okay so this one is an IAB standards track protocol for the Internet community, and it's literally asking for discussion and suggestions for improvements ๐Ÿซถ For the standardization state and status of this protocol, go check the current edition of the "IAB Official Protocol Standards" (that's the source of truth, bestie ๐Ÿ“š). Distribution of this memo is unlimited ๐ŸŒˆ

Abstract ๐Ÿฆ‹

this doc extends the Routing Information Protocol (RIP), as defined in [1], so RIP packets can carry way more useful info and get a measure of security ๐Ÿ” A companion document will define the SNMP MIB objects for RIP-2 [2] ๐Ÿ’œ

Acknowledgements ๐Ÿซถ

huge thanks to Fred Baker, Noel Chiappa and Vince Fuller for their contributions ๐Ÿ˜ญ This memo is a product of the RIP-2 Working Group of the Internet Engineering Task Force (IETF) โœจ

Table of Contents ๐Ÿ“–

1.  Justification . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.  Current RIP . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3.  Protocol Extensions . . . . . . . . . . . . . . . . . . . . . . 2
3.1   Authentication  . . . . . . . . . . . . . . . . . . . . . . . 3
3.2   Routing Domain  . . . . . . . . . . . . . . . . . . . . . . . 4
3.3   Route Tag . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.4   Subnet Mask . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.5   Next Hop  . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.6   Multicasting  . . . . . . . . . . . . . . . . . . . . . . . . 5
4.  Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . 5
4.1   Compatibility Switch  . . . . . . . . . . . . . . . . . . . . 5
4.2   Authentication  . . . . . . . . . . . . . . . . . . . . . . . 6
4.3   Larger Infinity . . . . . . . . . . . . . . . . . . . . . . . 6
4.4   Addressless Links . . . . . . . . . . . . . . . . . . . . . . 6
Appendix A  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
References  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Security Considerations . . . . . . . . . . . . . . . . . . . . . . 7
Author's Address  . . . . . . . . . . . . . . . . . . . . . . . . . 7

1. Justification ๐Ÿ“

okay so with OSPF and IS-IS showing up, some people are like "RIP is obsolete" ๐Ÿ’€ And honestly? The newer IGP routing protocols are way superior to RIP. BUT RIP still has some main-character advantages ๐Ÿ‘‘ Mainly, in a small network, RIP has very little overhead in terms of bandwidth used and configuration and management time. It's also super easy to implement, especially compared to the newer IGPs ๐Ÿงš

Also, there are many, many more RIP implementations out in the field than OSPF and IS-IS combined ๐Ÿ˜ญ That's likely to stay true for some years yet.

So since RIP is gonna be useful in lots of environments for a while, it makes total sense to make RIP more useful ๐Ÿ’… This is especially true since the gain is way bigger than the cost of the change โœจ

2. Current RIP ๐ŸŒธ

the current RIP packet carries the minimal amount of info routers need to route packets through a network. It also has a big chunk of unused space, which is giving history and origins ๐Ÿ™ˆ

The current RIP protocol doesn't consider autonomous systems, IGP/EGP interactions, subnetting, or authentication, because implementations of those came after RIP did ๐Ÿซ  The lack of subnet masks is a seriously big problem for routers, since they need a subnet mask to know how to determine a route. If a RIP route is a network route (all non-network bits 0), the subnet mask equals the network mask. But if some of the non-network bits are set, the router can't determine the subnet mask. Worse still, the router can't tell whether the RIP route is a subnet route or a host route. Right now, some routers just pick the subnet mask of the interface the route was learned over, and figure out the route type from that ๐Ÿ˜ฌ

3. Protocol Extensions ๐Ÿฆ‹

this doc does not change the RIP protocol per se. Instead, it adds extensions to the datagram format so routers can share important additional info ๐Ÿ’œ

the new RIP datagram format looks like this:

    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 keep the meanings defined in RFC 1058 ๐Ÿซถ The Version field will specify version number 2 for RIP datagrams that use authentication or carry info in any of the newly defined fields โœจ

All fields are coded in IP network byte order (big-endian) ๐Ÿ”ข

3.1. Authentication ๐Ÿ”

okay the vibe here: authentication is a per packet function, and there's only one 2-byte field available in the packet header. Any reasonable authentication scheme needs more than two bytes, so the authentication scheme for RIP version 2 uses 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 that entry contains the authentication. That means there can be, at most, 24 RIP entries in the remainder of the packet ๐Ÿงฎ If authentication isn't in use, then no entries in the packet should have an Address Family Identifier of 0xFFFF. A RIP packet that contains an authentication entry would look like this:

    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's type 2 ๐Ÿ”‘ The remaining 16 bytes hold 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 that this update belongs to ๐Ÿงš This field is used to associate the routing update with a specific routing process on the receiving router. The RD is needed so multiple, independent RIP "clouds" can co-exist on the same physical wire ๐Ÿซง This gives administrators the ability to run multiple, possibly parallel, instances of RIP to implement simple policy ๐Ÿ“‹ That means a router operating within one routing domain, or a set of routing domains, should ignore RIP packets that belong to another routing domain ๐Ÿšซ RD 0 is the default routing domain ๐Ÿ’–

3.3. Route Tag ๐Ÿท๏ธ

The Route Tag (RT) field exists as support for EGPs ๐ŸŒธ The contents and use of this field are outside the scope of this protocol. However, it's expected that the field will be used to carry Autonomous System numbers for EGP and BGP โœจ Any RIP system that receives a RIP entry containing a non-zero RT value must re-advertise that value. Routes that have no RT value must advertise an RT value of zero ๐Ÿ’…

3.4. Subnet mask ๐ŸŽ€

The Subnet Mask field contains the subnet mask 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 info 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 that packets to the destination specified by this route entry should be forwarded to ๐Ÿƒโ€โ™€๏ธ 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 whole purpose of the Next Hop field is to stop packets from being routed through extra hops in the system โœจ It's especially useful when RIP isn't 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 means if the provided info is ignored, a possibly sub-optimal, but absolutely valid, route may be taken ๐Ÿคทโ€โ™€๏ธ

3.6. Multicasting ๐Ÿ“ก

To cut down on unnecessary load on those hosts that aren't 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 that aren't forwarded ๐Ÿ™…โ€โ™€๏ธ

To keep 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 that support it ๐ŸŒˆ

4. Compatibility ๐Ÿซถ

RFC 1058 showed considerable forethought in how it specifies handling of version numbers ๐Ÿง  It specifies that RIP packets of version 0 are to be discarded, that RIP packets of version 1 are to be discarded if any Must Be Zero (MBZ) field is non-zero, and that RIP packets of any version greater than 1 should not be discarded simply because an MBZ field contains a value other than zero. This means the new version of RIP is totally backwards compatible with existing RIP implementations that adhere to this part of the specification ๐Ÿฅนโœจ

4.1. Compatibility Switch ๐Ÿ”€

A compatibility switch is necessary for two reasons ๐Ÿฉท First, there are implementations of RIP-1 in the field that don't follow RFC 1058 as described above. Second, the use of multicasting would stop RIP-1 systems from receiving RIP-2 updates, which may be a desired feature in some cases ๐Ÿ™ˆ

The switch has three settings ๐ŸŽ›๏ธ RIP-1, where only RIP-1 packets are sent. RIP-1 compatibility, where RIP-2 packets are broadcast. And RIP-2, where RIP-2 packets are multicast. The recommended default for this switch is RIP-1 compatibility ๐Ÿ’œ

4.2. Authentication โœจ

okay so bestie ๐Ÿซถ an authentication entry is tagged with an Address Family Identifier of 0xFFFF, and a RIP-1 system is like "not meโ€ฆ that's not IP" and just ignores it ๐Ÿ’… since it belongs to an address family other than IP. ngl that's kinda iconic. BUT (and this part matters ๐Ÿ‘€) using authentication will not stop RIP-1 systems from seeing RIP-2 packets. heads up. if you want that, it can be done with multicasting, as described in sections 3.6 and 4.1 ๐Ÿฆ‹

4.3. Larger Infinity ๐ŸŒˆ

ok while we're on the compatibility vibes ๐ŸŽ€, people have literally asked for one thing: a bigger infinity โœจ. the main reason we can't do it is that it would break backwards compatibility ๐Ÿ’€. a larger infinity would totally confuse older versions of rip. at best they'd ignore the route, the same way they'd ignore a metric of 16 ๐Ÿ™ˆ

there was also a proposal to make the Metric a single byte and reuse the high three bytes, but that would break any implementations that treat the metric as a long ๐Ÿ˜ญ not a vibe.

just like RIP-1, addressless links are a no-go for RIP-2 ๐Ÿ™… no exceptions, bestie.

Appendix A ๐Ÿงš

this is a simple example of how the next hop field gets used in a rip entry ๐ŸŒธ

      -----   -----   -----           -----   -----   -----
      |IR1|   |IR2|   |IR3|           |XR1|   |XR2|   |XR3|
      --+--   --+--   --+--           --+--   --+--   --+--
        |       |       |               |       |       |
      --+-------+-------+---------------+-------+-------+--
        <-------------RIP-2------------->

okay picture this ๐Ÿ‘€ IR1, IR2, and IR3 are all "internal" routers under one administration (like a campus) that picked RIP-2 as its IGP ๐ŸŽ“. XR1, XR2, and XR3, on the other hand, belong to a separate administration (like a regional network that the campus is a member of) and use some other routing protocol (like OSPF) ๐ŸŒ. XR1, XR2, and XR3 trade routing info with each other, so they know the best routes to networks N1 and N2 go via XR1, to N3, N4, and N5 go via XR2, and to N6 and N7 go via XR3.

by setting the Next Hop field correctly (to XR2 for N3/N4/N5, to XR3 for N6/N7), only XR1 needs to swap RIP-2 routes with IR1/IR2/IR3 for routing to happen without extra hops through XR1 โœจ that's the slay. without the Next Hop (say, if RIP-1 were used), XR2 and XR3 would also have to join the RIP-2 protocol to get rid of those extra hops ๐Ÿ’€

References ๐Ÿ“š

[1] Hedrick, C., "Routing Information Protocol", RFC 1058, Rutgers University, June 1988.

[2] Malkin, G., and F. Baker, "RIP Version 2 MIB Extension", RFC 1389, Xylogics, Inc., Advanced Computer Communications, January 1993.

[3] Malkin, G., "RIP Version 2 Protocol Analysis", RFC 1387, Xylogics, Inc., January 1993.

Security Considerations ๐Ÿšจ

this section is serious, bestie ๐Ÿ˜ฑ the basic RIP protocol is not a secure protocol. to bring RIP-2 in line with more modern routing protocols, an extensible authentication mechanism has been incorporated into the protocol enhancements ๐Ÿ” this mechanism is described in sections 3.1 and 4.2.

Author's Address ๐Ÿ’Œ

Gary Scott Malkin
Xylogics, Inc.
53 Third Avenue
Burlington, MA 01803

Phone:  (617) 272-8140
EMail:  gmalkin@Xylogics.COM

and that's a wrap on RIP-2 ๐ŸŒˆ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from