home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 2000s / rfc2080.txt < prev    next >
Text File  |  1997-02-10  |  48KB  |  1,067 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          G. Malkin
  8. Request for Comments: 2080                                      Xylogics
  9. Category: Standards Track                                     R. Minnear
  10.                                                         Ipsilon Networks
  11.                                                             January 1997
  12.  
  13.                              RIPng for IPv6
  14.  
  15. Status of this Memo
  16.  
  17.    This document specifies an Internet standards track protocol for the
  18.    Internet community, and requests discussion and suggestions for
  19.    improvements.  Please refer to the current edition of the "Internet
  20.    Official Protocol Standards" (STD 1) for the standardization state
  21.    and status of this protocol.  Distribution of this memo is unlimited.
  22.  
  23. Abstract
  24.  
  25.    This document specifies a routing protocol for an IPv6 internet.  It
  26.    is based on protocols and algorithms currently in wide use in the
  27.    IPv4 Internet.
  28.  
  29.    This specification represents the minimum change to the Routing
  30.    Information Protocol (RIP), as specified in RFC 1058 [1] and RFC 1723
  31.    [2], necessary for operation over IPv6 [3].
  32.  
  33. Acknowledgements
  34.  
  35.    This document is a modified version of RFC 1058, written by Chuck
  36.    Hedrick [1].  The modifications reflect RIP-2 and IPv6 enhancements,
  37.    but the original wording is his.
  38.  
  39.    We'd like to thank Dennis Ferguson and Thomas Narten for their input.
  40.  
  41. Table of Contents
  42.  
  43.    1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
  44.    1.1   Theoretical Underpinnings  . . . . . . . . . . . . . . . . .  3
  45.    1.2   Limitations of the Protocol  . . . . . . . . . . . . . . . .  3
  46.    2.  Protocol Specification . . . . . . . . . . . . . . . . . . . .  4
  47.    2.1   Message Format . . . . . . . . . . . . . . . . . . . . . . .  5
  48.    2.1.1   Next Hop . . . . . . . . . . . . . . . . . . . . . . . . .  7
  49.    2.2   Addressing Considerations  . . . . . . . . . . . . . . . . .  8
  50.    2.3   Timers . . . . . . . . . . . . . . . . . . . . . . . . . . .  9
  51.    2.4   Input Processing . . . . . . . . . . . . . . . . . . . . . . 10
  52.    2.4.1   Request Messages . . . . . . . . . . . . . . . . . . . . . 10
  53.    2.4.2   Response Messages  . . . . . . . . . . . . . . . . . . . . 11
  54.  
  55.  
  56.  
  57. Malkin & Minnear            Standards Track                     [Page 1]
  58.  
  59. RFC 2080                     RIPng for IPv6                 January 1997
  60.  
  61.  
  62.    2.5   Output Processing  . . . . . . . . . . . . . . . . . . . . . 14
  63.    2.5.1   Triggered Updates  . . . . . . . . . . . . . . . . . . . . 14
  64.    2.5.2   Generating Response Messages . . . . . . . . . . . . . . . 15
  65.    2.6   Split Horizon  . . . . . . . . . . . . . . . . . . . . . . . 16
  66.    3.  Control Functions  . . . . . . . . . . . . . . . . . . . . . . 17
  67.    4.  Security Considerations. . . . . . . . . . . . . . . . . . . . 18
  68.    References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
  69.    Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19
  70.  
  71. 1. Introduction
  72.  
  73.    This memo describes one protocol in a series of routing protocols
  74.    based on the Bellman-Ford (or distance vector) algorithm.  This
  75.    algorithm has been used for routing computations in computer networks
  76.    since the early days of the ARPANET.  The particular packet formats
  77.    and protocol described here are based on the program "routed," which
  78.    is included with the Berkeley distribution of Unix.
  79.  
  80.    In an international network, such as the Internet, it is very
  81.    unlikely that a single routing protocol will used for the entire
  82.    network.  Rather, the network will be organized as a collection of
  83.    Autonomous Systems (AS), each of which will, in general, be
  84.    administered by a single entity.  Each AS will have its own routing
  85.    technology, which may differ among AS's.  The routing protocol used
  86.    within an AS is referred to as an Interior Gateway Protocol (IGP).  A
  87.    separate protocol, called an Exterior Gateway Protocol (EGP), is used
  88.    to transfer routing information among the AS's.  RIPng was designed
  89.    to work as an IGP in moderate-size AS's.  It is not intended for use
  90.    in more complex environments.  For information on the context into
  91.    which RIP version 1 (RIP-1) is expected to fit, see Braden and Postel
  92.    [6].
  93.  
  94.    RIPng is one of a class of algorithms known as Distance Vector
  95.    algorithms.  The earliest description of this class of algorithms
  96.    known to the author is in Ford and Fulkerson [8].  Because of this,
  97.    they are sometimes known as Ford-Fulkerson algorithms.  The term
  98.    Bellman-Ford is also used, and derives from the fact that the
  99.    formulation is based on Bellman's equation [4].  The presentation in
  100.    this document is closely based on [5].  This document contains a
  101.    protocol specification.  For an introduction to the mathematics of
  102.    routing algorithms, see [1].  The basic algorithms used by this
  103.    protocol were used in computer routing as early as 1969 in the
  104.    ARPANET.  However, the specific ancestry of this protocol is within
  105.    the Xerox network protocols.  The PUP protocols [7] used the Gateway
  106.    Information Protocol to exchange routing information.  A somewhat
  107.    updated version of this protocol was adopted for the Xerox Network
  108.    Systems (XNS) architecture, with the name Routing Information
  109.    Protocol [9].  Berkeley's routed is largely the same as the Routing
  110.  
  111.  
  112.  
  113. Malkin & Minnear            Standards Track                     [Page 2]
  114.  
  115. RFC 2080                     RIPng for IPv6                 January 1997
  116.  
  117.  
  118.    Information Protocol, with XNS addresses replaced by a more general
  119.    address format capable of handling IPv4 and other types of address,
  120.    and with routing updates limited to one every 30 seconds.  Because of
  121.    this similarity, the term Routing Information Protocol (or just RIP)
  122.    is used to refer to both the XNS protocol and the protocol used by
  123.    routed.
  124.  
  125. 1.1  Theoretical Underpinnings
  126.  
  127.    An introduction to the theory and math behind Distance Vector
  128.    protocols is provided in [1].  It has not been incorporated in this
  129.    document for the sake of brevity.
  130.  
  131. 1.2  Limitations of the Protocol
  132.  
  133.    This protocol does not solve every possible routing problem.  As
  134.    mentioned above, it is primarily intended for use as an IGP in
  135.    networks of moderate size.  In addition, the following specific
  136.    limitations are be mentioned:
  137.  
  138.    - The protocol is limited to networks whose longest path (the
  139.      network's diameter) is 15 hops.  The designers believe that the
  140.      basic protocol design is inappropriate for larger networks.  Note
  141.      that this statement of the limit assumes that a cost of 1 is used
  142.      for each network.  This is the way RIPng is normally configured.
  143.      If the system administrator chooses to use larger costs, the upper
  144.      bound of 15 can easily become a problem.
  145.  
  146.    - The protocol depends upon "counting to infinity" to resolve certain
  147.      unusual situations (see section 2.2 in [1]).  If the system of
  148.      networks has several hundred networks, and a routing loop was formed
  149.      involving all of them, the resolution of the loop would require
  150.      either much time (if the frequency of routing updates were limited)
  151.      or bandwidth (if updates were sent whenever changes were detected).
  152.      Such a loop would consume a large amount of network bandwidth
  153.      before the loop was corrected.  We believe that in realistic cases,
  154.      this will not be a problem except on slow lines.  Even then, the
  155.      problem will be fairly unusual, since various precautions are taken
  156.      that should prevent these problems in most cases.
  157.  
  158.    - This protocol uses fixed "metrics" to compare alternative routes.
  159.      It is not appropriate for situations where routes need to be chosen
  160.      based on real-time parameters such a measured delay, reliability,
  161.      or load.  The obvious extensions to allow metrics of this type are
  162.      likely to introduce instabilities of a sort that the protocol is
  163.      not designed to handle.
  164.  
  165.  
  166.  
  167.  
  168.  
  169. Malkin & Minnear            Standards Track                     [Page 3]
  170.  
  171. RFC 2080                     RIPng for IPv6                 January 1997
  172.  
  173.  
  174. 2. Protocol Specification
  175.  
  176.    RIPng is intended to allow routers to exchange information for
  177.    computing routes through an IPv6-based network.  RIPng is a distance
  178.    vector protocol, as described in [1].  RIPng should be implemented
  179.    only in routers; IPv6 provides other mechanisms for router discovery
  180.    [10].  Any router that uses RIPng is assumed to have interfaces to
  181.    one or more networks, otherwise it isn't really a router.  These are
  182.    referred to as its directly-connected networks.  The protocol relies
  183.    on access to certain information about each of these networks, the
  184.    most important of which is its metric.  The RIPng metric of a network
  185.    is an integer between 1 and 15, inclusive.  It is set in some manner
  186.    not specified in this protocol; however, given the maximum path limit
  187.    of 15, a value of 1 is usually used.  Implementations should allow
  188.    the system administrator to set the metric of each network.  In
  189.    addition to the metric, each network will have an IPv6 destination
  190.    address prefix and prefix length associated with it.  These are to be
  191.    set by the system administrator in a manner not specified in this
  192.    protocol.
  193.  
  194.    Each router that implements RIPng is assumed to have a routing table.
  195.    This table has one entry for every destination that is reachable
  196.    throughout the system operating RIPng.  Each entry contains at least
  197.    the following information:
  198.  
  199.    - The IPv6 prefix of the destination.
  200.  
  201.    - A metric, which represents the total cost of getting a datagram
  202.      from the router to that destination.  This metric is the sum of the
  203.      costs associated with the networks that would be traversed to get
  204.      to the destination.
  205.  
  206.    - The IPv6 address of the next router along the path to the
  207.      destination (i.e., the next hop).  If the destination is on one of
  208.      the directly-connected networks, this item is not needed.
  209.  
  210.    - A flag to indicate that information about the route has changed
  211.      recently.  This will be referred to as the "route change flag."
  212.  
  213.    - Various timers associated with the route.  See section 2.3 for more
  214.      details on timers.
  215.  
  216.    The entries for the directly-connected networks are set up by the
  217.    router using information gathered by means not specified in this
  218.    protocol.  The metric for a directly-connected network is set to the
  219.    cost of that network.  As mentioned, 1 is the usual cost.  In that
  220.    case, the RIPng metric reduces to a simple hop-count.  More complex
  221.    metrics may be used when it is desirable to show preference for some
  222.  
  223.  
  224.  
  225. Malkin & Minnear            Standards Track                     [Page 4]
  226.  
  227. RFC 2080                     RIPng for IPv6                 January 1997
  228.  
  229.  
  230.    networks over others (e.g., to indicate of differences in bandwidth
  231.    or reliability).
  232.  
  233.    Implementors may also choose to allow the system administrator to
  234.    enter additional routes.  These would most likely be routes to hosts
  235.    or networks outside the scope of the routing system.  They are
  236.    referred to as "static routes."  Entries for destinations other than
  237.    these initial ones are added and updated by the algorithms described
  238.    in the following sections.
  239.  
  240.    In order for the protocol to provide complete information on routing,
  241.    every router in the AS must participate in the protocol.  In cases
  242.    where multiple IGPs are in use, there must be at least one router
  243.    which can leak routing information between the protocols.
  244.  
  245. 2.1  Message Format
  246.  
  247.    RIPng is a UDP-based protocol.  Each router that uses RIPng has a
  248.    routing process that sends and receives datagrams on UDP port number
  249.    521, the RIPng port.  All communications intended for another
  250.    router's RIPng process are sent to the RIPng port.  All routing
  251.    update messages are sent from the RIPng port.  Unsolicited routing
  252.    update messages have both the source and destination port equal to
  253.    the RIPng port.  Those sent in response to a request are sent to the
  254.    port from which the request came.  Specific queries may be sent from
  255.    ports other than the RIPng port, but they must be directed to the
  256.    RIPng port on the target machine.
  257.  
  258.    The RIPng packet format is:
  259.  
  260.        0                   1                   2                   3
  261.        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
  262.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  263.       |  command (1)  |  version (1)  |       must be zero (2)        |
  264.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  265.       |                                                               |
  266.       ~                Route Table Entry 1 (20)                       ~
  267.       |                                                               |
  268.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  269.       |                                                               |
  270.       ~                         ...                                   ~
  271.       |                                                               |
  272.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  273.       |                                                               |
  274.       ~                Route Table Entry N (20)                       ~
  275.       |                                                               |
  276.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  277.  
  278.  
  279.  
  280.  
  281. Malkin & Minnear            Standards Track                     [Page 5]
  282.  
  283. RFC 2080                     RIPng for IPv6                 January 1997
  284.  
  285.  
  286.    where each Route Table Entry (RTE) has the following format:
  287.  
  288.        0                   1                   2                   3
  289.        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
  290.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  291.       |                                                               |
  292.       ~                        IPv6 prefix (16)                       ~
  293.       |                                                               |
  294.       +---------------------------------------------------------------+
  295.       |         route tag (2)         | prefix len (1)|  metric (1)   |
  296.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  297.  
  298.       The maximum number of RTEs is defined below.
  299.  
  300.    Field sizes are given in octets.  Unless otherwise specified, fields
  301.    contain binary integers, in network byte order, with the most-
  302.    significant octet first (big-endian).  Each tick mark represents one
  303.    bit.
  304.  
  305.    Every message contains a RIPng header which consists of a command and
  306.    a version number.  This document describes version 1 of the protocol
  307.    (see section 2.4).  The command field is used to specify the purpose
  308.    of this message.  The commands implemented in version 1 are:
  309.  
  310.    1 - request    A request for the responding system to send all or
  311.                   part of its routing table.
  312.  
  313.    2 - response   A message containing all or part of the sender's
  314.                   routing table.  This message may be sent in response
  315.                   to a request, or it may be an unsolicited routing
  316.                   update generated by the sender.
  317.  
  318.    For each of these message types, the remainder of the datagram
  319.    contains a list of RTEs.  Each RTE in this list contains a
  320.    destination prefix, the number of significant bits in the prefix, and
  321.    the cost to reach that destination (metric).
  322.  
  323.    The destination prefix is the usual 128-bit, IPv6 address prefix
  324.    stored as 16 octets in network byte order.
  325.  
  326.    The route tag field is an attribute assigned to a route which must be
  327.    preserved and readvertised with a route.  The intended use of the
  328.    route tag is to provide a method of separating "internal" RIPng
  329.    routes (routes for networks within the RIPng routing domain) from
  330.    "external" RIPng routes, which may have been imported from an EGP or
  331.    another IGP.
  332.  
  333.  
  334.  
  335.  
  336.  
  337. Malkin & Minnear            Standards Track                     [Page 6]
  338.  
  339. RFC 2080                     RIPng for IPv6                 January 1997
  340.  
  341.  
  342.    Routers supporting protocols other than RIPng should be configurable
  343.    to allow the route tag to be configured for routes imported from
  344.    different sources.  For example, routes imported from an EGP should
  345.    be able to have their route tag either set to an arbitrary value, or
  346.    at least to the number of the Autonomous System from which the routes
  347.    were learned.
  348.  
  349.    Other uses of the route tag are valid, as long as all routers in the
  350.    RIPng domain use it consistently.
  351.  
  352.    The prefix length field is the length in bits of the significant part
  353.    of the prefix (a value between 0 and 128 inclusive) starting from the
  354.    left of the prefix.
  355.  
  356.    The metric field contains a value between 1 and 15 inclusive,
  357.    specifying the current metric for the destination; or the value 16
  358.    (infinity), which indicates that the destination is not reachable.
  359.  
  360.    The maximum datagram size is limited by the MTU of the medium over
  361.    which the protocol is being used.  Since an unsolicited RIPng update
  362.    is never propagated across a router, there is no danger of an MTU
  363.    mismatch.  The determination of the number of RTEs which may be put
  364.    into a given message is a function of the medium's MTU, the number of
  365.    octets of header information preceeding the RIPng message, the size
  366.    of the RIPng header, and the size of an RTE.  The formula is:
  367.  
  368.                +-                                                   -+
  369.                | MTU - sizeof(IPv6_hdrs) - UDP_hdrlen - RIPng_hdrlen |
  370.    #RTEs = INT | --------------------------------------------------- |
  371.                |                      RTE_size                       |
  372.                +-                                                   -+
  373.  
  374. 2.1.1  Next Hop
  375.  
  376.    RIPng provides the ability to specify the immediate next hop IPv6
  377.    address to which packets to a destination specified by a route table
  378.    entry (RTE) should be forwarded in much the same way as RIP-2 [2].
  379.    In RIP-2, each route table entry has a next hop field.  Including a
  380.    next hop field for each RTE in RIPng would nearly double the size of
  381.    the RTE.  Therefore, in RIPng, the next hop is specified by a special
  382.    RTE and applies to all of the address RTEs following the next hop RTE
  383.    until the end of the message or until another next hop RTE is
  384.    encountered.
  385.  
  386.    A next hop RTE is identified by a value of 0xFF in the metric field
  387.    of an RTE.  The prefix field specifies the IPv6 address of the next
  388.    hop.  The route tag and prefix length in the next hop RTE must be set
  389.    to zero on sending and ignored on receiption.
  390.  
  391.  
  392.  
  393. Malkin & Minnear            Standards Track                     [Page 7]
  394.  
  395. RFC 2080                     RIPng for IPv6                 January 1997
  396.  
  397.  
  398.    The next hop Route Table Entry (RTE) has the following format:
  399.  
  400.     0                   1                   2                   3
  401.     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
  402.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  403.    |                                                               |
  404.    ~                    IPv6 next hop address (16)                 ~
  405.    |                                                               |
  406.    +---------------------------------------------------------------+
  407.    |        must be zero (2)       |must be zero(1)|     0xFF      |
  408.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  409.  
  410.    Specifying a value of 0:0:0:0:0:0:0:0 in the prefix field of a next
  411.    hop RTE indicates that the next hop address should be the originator
  412.    of the RIPng advertisement.  An address specified as a next hop must
  413.    be a link-local address.
  414.  
  415.    The purpose of the next hop RTE is to eliminate packets being routed
  416.    through extra hops in the system.  It is particularly useful when
  417.    RIPng is not being run on all of the routers on a network.  Note that
  418.    next hop RTE is "advisory".  That is, if the provided information is
  419.    ignored, a possibly sub-optimal, but absolutely valid, route may be
  420.    taken.  If the received next hop address is not a link-local address,
  421.    it should be treated as 0:0:0:0:0:0:0:0.
  422.  
  423. 2.2  Addressing Considerations
  424.  
  425.    The distinction between network, subnet and host routes does not need
  426.    to be made for RIPng because an IPv6 address prefix is unambiguous.
  427.  
  428.    Any prefix with a prefix length of zero is used to designate a
  429.    default route.  It is suggested that the prefix 0:0:0:0:0:0:0:0 be
  430.    used when specifying the default route, though the prefix is
  431.    essentially ignored.  A default route is used when it is not
  432.    convenient to list every possible network in the RIPng updates, and
  433.    when one or more routers in the system are prepared to handle traffic
  434.    to the networks that are not explicitly listed.  These "default
  435.    routers" use the default route as a path for all datagrams for which
  436.    they have no explicit route.  The decision as to how a router becomes
  437.    a default router (i.e., how a default route entry is created) is left
  438.    to the implementor.  In general, the system administrator will be
  439.    provided with a way to specify which routers should create and
  440.    advertise default route entries.  If this mechanism is used, the
  441.    implementation should allow the network administrator to choose the
  442.    metric associated with the default route advertisement.  This will
  443.    make it possible to establish a precedence amoung multiple default
  444.    routers.  The default route entries are handled by RIPng in exactly
  445.    the same manner as any other destination prefix.  System
  446.  
  447.  
  448.  
  449. Malkin & Minnear            Standards Track                     [Page 8]
  450.  
  451. RFC 2080                     RIPng for IPv6                 January 1997
  452.  
  453.  
  454.    administrators should take care to make sure that default routes do
  455.    not propagate further than is intended.  Generally, each AS has its
  456.    own preferred default router.  Therefore, default routes should
  457.    generally not leave the boundary of an AS.  The mechanisms for
  458.    enforcing this restriction are not specified in this document.
  459.  
  460. 2.3  Timers
  461.  
  462.    This section describes all events that are triggered by timers.
  463.  
  464.    Every 30 seconds, the RIPng process is awakened to send an
  465.    unsolicited Response message, containing the complete routing table
  466.    (see section 2.6 on Split Horizon), to every neighboring router.
  467.    When there are many routers on a single network, there is a tendency
  468.    for them to synchronize with each other such that they all issue
  469.    updates at the same time.  This can happen whenever the 30 second
  470.    timer is affected by the processing load on the system.  It is
  471.    undesirable for the update messages to become synchronized, since it
  472.    can lead to unnecessary collisions on broadcast networks (see [13]
  473.    for more details).  Therefore, implementations are required to take
  474.    one of two precautions:
  475.  
  476.    - The 30-second updates are triggered by a clock whose rate is not
  477.      affected by system load or the time required to service the
  478.      previous update timer.
  479.  
  480.    - The 30-second timer is offset by a small random time (+/- 0 to 15
  481.      seconds) each time it is set.  The offset is derived from: 0.5 *
  482.      the update period (i.e. 30).
  483.  
  484.    There are two timers associated with each route, a "timeout" and a
  485.    "garbage-collection time."  Upon expiration of the timeout, the route
  486.    is no longer valid; however, it is retained in the routing table for
  487.    a short time so that neighbors can be notified that the route has
  488.    been dropped.  Upon expiration of the garbage-collection timer, the
  489.    route is finally removed from the routing table.
  490.  
  491.    The timeout is initialized when a route is established, and any time
  492.    an update message is received for the route.  If 180 seconds elapse
  493.    from the last time the timeout was initialized, the route is
  494.    considered to have expired, and the deletion process described below
  495.    begins for that route.
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505. Malkin & Minnear            Standards Track                     [Page 9]
  506.  
  507. RFC 2080                     RIPng for IPv6                 January 1997
  508.  
  509.  
  510.    Deletions can occur for one of two reasons: the timeout expires, or
  511.    the metric is set to 16 because of an update received from the
  512.    current router (see section 2.4.2 for a discussion of processing
  513.    updates from other routers).  In either case, the following events
  514.    happen:
  515.  
  516.    - The garbage-collection timer is set for 120 seconds.
  517.  
  518.    - The metric for the route is set to 16 (infinity).  This causes the
  519.      route to be removed from service.
  520.  
  521.    - The route change flag is to indicate that this entry has been
  522.      changed.
  523.  
  524.    - The output process is signalled to trigger a response.
  525.  
  526.    Until the garbage-collection timer expires, the route is included in
  527.    all updates sent by this router.  When the garbage-collection timer
  528.    expires, the route is deleted from the routing table.
  529.  
  530.    Should a new route to this network be established while the garbage-
  531.    collection timer is running, the new route will replace the one that
  532.    is about to be deleted.  In this case the garbage-collection timer
  533.    must be cleared.
  534.  
  535.    Triggered updates also use a small timer; however, this is best
  536.    described in section 2.5.1.
  537.  
  538. 2.4  Input Processing
  539.  
  540.    This section will describe the handling of datagrams received on the
  541.    RIPng port.  Processing will depend upon the value in the command
  542.    field.  Version 1 supports only two commands: Request and Response.
  543.  
  544. 2.4.1  Request Messages
  545.  
  546.    A Request is used to ask for a response containing all or part of a
  547.    router's routing table.  Normally, Requests are sent as multicasts,
  548.    from the RIPng port, by routers which have just come up and are
  549.    seeking to fill in their routing tables as quickly as possible.
  550.    However, there may be situations (e.g., router monitoring) where the
  551.    routing table of only a single router is needed.  In this case, the
  552.    Request should be sent directly to that router from a UDP port other
  553.    than the RIPng port.  If such a Request is received, the router
  554.    responds directly to the requestor's address and port with a globally
  555.    valid source address since the requestor may not reside on the
  556.    directly attached network.
  557.  
  558.  
  559.  
  560.  
  561. Malkin & Minnear            Standards Track                    [Page 10]
  562.  
  563. RFC 2080                     RIPng for IPv6                 January 1997
  564.  
  565.  
  566.    The Request is processed entry by entry.  If there are no entries, no
  567.    response is given.  There is one special case.  If there is exactly
  568.    one entry in the request, and it has a destination prefix of zero, a
  569.    prefix length of zero, and a metric of infinity (i.e., 16), then this
  570.    is a request to send the entire routing table.  In that case, a call
  571.    is made to the output process to send the routing table to the
  572.    requesting address/port.  Except for this special case, processing is
  573.    quite simple.  Examine the list of RTEs in the Request one by one.
  574.    For each entry, look up the destination in the router's routing
  575.    database and, if there is a route, put that route's metric in the
  576.    metric field of the RTE.  If there is no explicit route to the
  577.    specified destination, put infinity in the metric field.  Once all
  578.    the entries have been filled in, change the command from Request to
  579.    Response and send the datagram back to the requestor.
  580.  
  581.    Note that there is a difference in metric handling for specific and
  582.    whole-table requests.  If the request is for a complete routing
  583.    table, normal output processing is done, including Split Horizon (see
  584.    section 2.6 on Split Horizon).  If the request is for specific
  585.    entries, they are looked up in the routing table and the information
  586.    is returned as is; no Split Horizon processing is done.  The reason
  587.    for this distinction is the expectation that these requests are
  588.    likely to be used for different purposes.  When a router first comes
  589.    up, it multicasts a Request on every connected network asking for a
  590.    complete routing table.  It is assumed that these complete routing
  591.    tables are to be used to update the requestor's routing table.  For
  592.    this reason, Split Horizon must be done.  It is further assumed that
  593.    a Request for specific networks is made only by diagnostic software,
  594.    and is not used for routing.  In this case, the requester would want
  595.    to know the exact contents of the routing table and would not want
  596.    any information hidden or modified.
  597.  
  598. 2.4.2  Response Messages
  599.  
  600.    A Response can be received for one of several different reasons:
  601.  
  602.    - response to a specific query
  603.    - regular update (unsolicited response)
  604.    - triggered update caused by a route change
  605.  
  606.    Processing is the same no matter why the Response was generated.
  607.  
  608.    Because processing of a Response may update the router's routing
  609.    table, the Response must be checked carefully for validity.  The
  610.    Response must be ignored if it is not from the RIPng port.  The
  611.    datagram's IPv6 source address should be checked to see whether the
  612.    datagram is from a valid neighbor; the source of the datagram must be
  613.    a link-local address.  It is also worth checking to see whether the
  614.  
  615.  
  616.  
  617. Malkin & Minnear            Standards Track                    [Page 11]
  618.  
  619. RFC 2080                     RIPng for IPv6                 January 1997
  620.  
  621.  
  622.    response is from one of the router's own addresses.  Interfaces on
  623.    broadcast networks may receive copies of their own multicasts
  624.    immediately.  If a router processes its own output as new input,
  625.    confusion is likely, and such datagrams must be ignored.  As an
  626.    additional check, periodic advertisements must have their hop counts
  627.    set to 255, and inbound, multicast packets sent from the RIPng port
  628.    (i.e. periodic advertisement or triggered update packets) must be
  629.    examined to ensure that the hop count is 255.  This absolutely
  630.    guarantees that a packet is from a neighbor, because any intermediate
  631.    node would have decremented the hop count.  Queries and their
  632.    responses may still cross intermediate nodes and therefore do not
  633.    require the hop count test to be done.
  634.  
  635.    Once the datagram as a whole has been validated, process the RTEs in
  636.    the Response one by one.  Again, start by doing validation.
  637.    Incorrect metrics and other format errors usually indicate
  638.    misbehaving neighbors and should probably be brought to the
  639.    administrator's attention.  For example, if the metric is greater
  640.    than infinity, ignore the entry but log the event.  The basic
  641.    validation tests are:
  642.  
  643.    - is the destination prefix valid (e.g., not a multicast prefix and
  644.      not a link-local address)  A link-local address should never be
  645.      present in an RTE.
  646.    - is the prefix length valid (i.e., between 0 and 128, inclusive)
  647.    - is the metric valid (i.e., between 1 and 16, inclusive)
  648.  
  649.    If any check fails, ignore that entry and proceed to the next.
  650.    Again, logging the error is probably a good idea.
  651.  
  652.    Once the entry has been validated, update the metric by adding the
  653.    cost of the network on which the message arrived.  If the result is
  654.    greater than infinity, use infinity.  That is,
  655.  
  656.                   metric = MIN (metric + cost, infinity)
  657.  
  658.    Now, check to see whether there is already an explicit route for the
  659.    destination prefix.  If there is no such route, add this route to the
  660.    routing table, unless the metric is infinity (there is no point in
  661.    adding a route which unusable).  Adding a route to the routing table
  662.    consists of:
  663.  
  664.    - Setting the destination prefix and length to those in the RTE.
  665.  
  666.    - Setting the metric to the newly calculated metric (as described
  667.      above).
  668.  
  669.  
  670.  
  671.  
  672.  
  673. Malkin & Minnear            Standards Track                    [Page 12]
  674.  
  675. RFC 2080                     RIPng for IPv6                 January 1997
  676.  
  677.  
  678.    - Set the next hop address to be the address of the router from which
  679.      the datagram came or the next hop address specified by a next hop
  680.      RTE.
  681.  
  682.    - Initialize the timeout for the route.  If the garbage-collection
  683.      timer is running for this route, stop it (see section 2.3 for a
  684.      discussion of the timers).
  685.  
  686.    - Set the route change flag.
  687.  
  688.    - Signal the output process to trigger an update (see section 2.5).
  689.  
  690.    If there is an existing route, compare the next hop address to the
  691.    address of the router from which the datagram came.  If this datagram
  692.    is from the same router as the existing route, reinitialize the
  693.    timeout.  Next, compare the metrics.  If the datagram is from the
  694.    same router as the existing route, and the new metric is different
  695.    than the old one; or, if the new metric is lower than the old one; do
  696.    the following actions:
  697.  
  698.    - Adopt the route from the datagram.  That is, put the new metric in,
  699.      and adjust the next hop address (if necessary).
  700.  
  701.    - Set the route change flag and signal the output process to trigger
  702.      an update.
  703.  
  704.    - If the new metric is infinity, start the deletion process
  705.      (described above); otherwise, re-initialize the timeout.
  706.  
  707.    If the new metric is infinity, the deletion process begins for the
  708.    route, which is no longer used for routing packets.  Note that the
  709.    deletion process is started only when the metric is first set to
  710.    infinity.  If the metric was already infinity, then a new deletion
  711.    process is not started.
  712.  
  713.    If the new metric is the same as the old one, it is simplest to do
  714.    nothing further (beyond reinitializing the timeout, as specified
  715.    above); but, there is a heuristic which could be applied.  Normally,
  716.    it is senseless to replace a route if the new route has the same
  717.    metric as the existing route; this would cause the route to bounce
  718.    back and forth, which would generate an intolerable number of
  719.    triggered updates.  However, if the existing route is showing signs
  720.    of timing out, it may be better to switch to an equally-good
  721.    alternative route immediately, rather than waiting for the timeout to
  722.    happen.  Therefore, if the new metric is the same as the old one,
  723.    examine the timeout for the existing route.  If it is at least
  724.    halfway to the expiration point, switch to the new route.  This
  725.    heuristic is optional, but highly recommended.
  726.  
  727.  
  728.  
  729. Malkin & Minnear            Standards Track                    [Page 13]
  730.  
  731. RFC 2080                     RIPng for IPv6                 January 1997
  732.  
  733.  
  734.    Any entry that fails these tests is ignored, as it is no better than
  735.    the current route.
  736.  
  737. 2.5  Output Processing
  738.  
  739.    This section describes the processing used to create response
  740.    messages that contain all or part of the routing table.  This
  741.    processing may be triggered in any of the following ways:
  742.  
  743.    - By input processing, when a Request is received.  In this case, the
  744.      Response is sent to only one destination (i.e. the unicast address
  745.      of the requestor).
  746.  
  747.    - By the regular routing update.  Every 30 seconds, a Response
  748.      containing the whole routing table is sent to every neighboring
  749.      router.
  750.  
  751.    - By triggered updates.  Whenever the metric for a route is changed,
  752.      an update is triggered.
  753.  
  754.    The special processing required for a Request is described in section
  755.    2.4.1.
  756.  
  757.    When a Response is to be sent to all neighbors (i.e., a regular or
  758.    triggered update), a Response message is multicast to the multicast
  759.    group FF02::9, the all-rip-routers multicast group, on all connected
  760.    networks that support broadcasting or are point-to-point links. RIPng
  761.    handles point-to-point links just like multicast links as
  762.    multicasting can be trivially provided on such links.  Thus, one
  763.    Response is prepared for each directly-connected network, and sent to
  764.    the all-rip-routers multicast group.  In most cases, this reaches all
  765.    neighboring routers.  However, there are some cases where this may
  766.    not be good enough. This may involve a network that is not a
  767.    broadcast network (e.g., the ARPANET), or a situation involving dumb
  768.    routers.  In such cases, it may be necessary to specify an actual
  769.    list of neighboring routers and send a datagram to each one
  770.    explicitly.  It is left to the implementor to determine whether such
  771.    a mechanism is needed, and to define how the list is specified.
  772.  
  773. 2.5.1  Triggered Updates
  774.  
  775.    Triggered updates require special handling for two reasons.  First,
  776.    experience shows that triggered updates can cause excessive loads on
  777.    networks with limited capacity or networks with many routers on them.
  778.    Therefore, the protocol requires that implementors include provisions
  779.    to limit the frequency of triggered updates.  After a triggered
  780.    update is sent, a timer should be set for a random interval between 1
  781.    and 5 seconds.  If other changes that would trigger updates occur
  782.  
  783.  
  784.  
  785. Malkin & Minnear            Standards Track                    [Page 14]
  786.  
  787. RFC 2080                     RIPng for IPv6                 January 1997
  788.  
  789.  
  790.    before the timer expires, a single update is triggered when the timer
  791.    expires.  The timer is then reset to another random value between 1
  792.    and 5 seconds.  Triggered updates may be suppressed if a regular
  793.    update is due by the time the triggered update would be sent.
  794.  
  795.    Second, triggered updates do not need to include the entire routing
  796.    table.  In principle, only those routes which have changed need to be
  797.    included.  Therefore messages generated as part of a triggered update
  798.    must include at least those routes that have their route change flag
  799.    set.  They may include additional routes, at the discretion of the
  800.    implementor; however, sending complete routing updates is strongly
  801.    discouraged.  When a triggered update is processed, messages should
  802.    be generated for every directly-connected network.  Split Horizon
  803.    processing is done when generating triggered updates as well as
  804.    normal updates (see section 2.6).  If, after Split Horizon processing
  805.    for a given network, a changed route will appear unchanged on that
  806.    network (e.g., it appears with an infinite metric), the route need
  807.    not be sent.  If no routes need be sent on that network, the update
  808.    may be omitted.  Once all of the triggered updates have been
  809.    generated, the route change flags should be cleared.
  810.  
  811.    If input processing is allowed while output is being generated,
  812.    appropriate interlocking must be done.  The route change flags should
  813.    not be changed as a result of processing input while a triggered
  814.    update message is being generated.
  815.  
  816.    The only difference between a triggered update and other update
  817.    messages is the possible omission of routes that have not changed.
  818.    The remaining mechanisms, described in the next section, must be
  819.    applied to all updates.
  820.  
  821. 2.5.2  Generating Response Messages
  822.  
  823.    This section describes how a Response message is generated for a
  824.    particular directly-connected network:
  825.  
  826.    The IPv6 source address must be a link-local address of the possible
  827.    addresses of the sending router's interface, except when replying to
  828.    a unicast Request Message from a port other than the RIPng port.  In
  829.    the latter case, the source address must be a globaly valid address.
  830.    In the former case, it is important to use a link-local address
  831.    because the source address is put into routing tables (as the next
  832.    hop) in the routers which receive this Response.  If an incorrect
  833.    source address is used, other routers may be unable to route
  834.    datagrams.  Sometimes routers are set up with multiple IPv6 addresses
  835.    on a single physical interface.  Normally, this means that several
  836.    logical IPv6 networks are being carried over one physical medium.  It
  837.    is possible that a router may have multiple link-local addresses for
  838.  
  839.  
  840.  
  841. Malkin & Minnear            Standards Track                    [Page 15]
  842.  
  843. RFC 2080                     RIPng for IPv6                 January 1997
  844.  
  845.  
  846.    a single interface. In this case, the router must only originate a
  847.    single Response message with a source address of the designated
  848.    link-local address for a given interface.  The choice of which link-
  849.    local address to use should only change when the current choice is no
  850.    longer valid.  This is necessary because nodes receiving Response
  851.    messages use the source address to identify the sender.  If multiple
  852.    packets from the same router contain different source addresses,
  853.    nodes will assume they come from different routers, leading to
  854.    undesirable behavior.
  855.  
  856.    Set the version number to the current version of RIPng.  The version
  857.    described in this document is version 1.  Set the command to
  858.    Response.  Set the bytes labeled "must be zero" to zero.  Start
  859.    filling in RTEs.  Recall that the maximum datagram size is limited by
  860.    the network's MTU.  When there is no more space in the datagram, send
  861.    the current Response and start a new one.
  862.  
  863.    To fill in the RTEs, examine each route in the routing table.  Routes
  864.    to link-local addresses must never be included in an RTE.  If a
  865.    triggered update is being generated, only entries whose route change
  866.    flags are set need be included.  If, after Split Horizon processing,
  867.    the route should not be included, skip it.  If the route is to be
  868.    included, then the destination prefix, prefix length, and metric are
  869.    put into the RTE.  The route tag is filled in as defined in section
  870.    2.1.  Routes must be included in the datagram even if their metrics
  871.    are infinite.
  872.  
  873. 2.6  Split Horizon
  874.  
  875.    Split Horizon is a algorithm for avoiding problems caused by
  876.    including routes in updates sent to the gateway from which they were
  877.    learned.  The basic split horizon algorithm omits routes learned from
  878.    one neighbor in updates sent to that neighbor.  In the case of a
  879.    broadcast network, all routes learned from any neighbor on that
  880.    network are omitted from updates sent on that network.
  881.  
  882.    Split Horizon with Poisoned Reverse (more simply, Poison Reverse)
  883.    does include such routes in updates, but sets their metrics to
  884.    infinity.  In effect, advertising the fact that there routes are not
  885.    reachable.  This is the preferred method of operation; however,
  886.    implementations should provide a per-interface control allowing no
  887.    horizoning, split horizoning, and poisoned reverse to be selected.
  888.  
  889.    For a theoretical discussion of Split Horizon and Poison Reverse, and
  890.    why they are needed, see section 2.1.1 of [1].
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897. Malkin & Minnear            Standards Track                    [Page 16]
  898.  
  899. RFC 2080                     RIPng for IPv6                 January 1997
  900.  
  901.  
  902. 3. Control Functions
  903.  
  904.    This section describes administrative controls.  These are not part
  905.    of the protocol per se; however, experience with existing networks
  906.    suggests that they are important.  Because they are not a necessary
  907.    part of the protocol, they are considered optional.  However, it is
  908.    strongly recommend that at least some of them be included in every
  909.    implementation.  These controls are intended primarily to allow RIPng
  910.    to be connected to networks whose routing may be unstable or subject
  911.    to errors.  Here are some examples:
  912.  
  913.    - It is sometimes desirable to restrict the routers from which
  914.      updates will be accepted, or to which updates will be sent.  This
  915.      is usually done for administrative, routing policy reasons.
  916.  
  917.    - A number of sites limit the set of networks that they allow in
  918.      Response messages.  Organization A may have a connection to
  919.      organization B that they use for direct communication.  For security
  920.      or performance reasons A may not be willing to give other
  921.      organizations access to that connection.  In such a case, A should
  922.      not include B's networks in updates that A sends to third parties.
  923.  
  924.    Here are some typical controls.  Note, however, that the RIPng
  925.    protocol does not require these or any other controls.
  926.  
  927.    - A neighbor list which allows the network administrator to be able
  928.      to define a list of neighbors for each router.  A router would
  929.      accept response messages only from routers on its list of
  930.      neighbors.  A similar list for target routers should also be
  931.      available to the administrator.  By default, no restrictions are
  932.      defined.
  933.  
  934.    - A filter for specific destinations would permit the network admin-
  935.      istrator to be able to specify a list of destination prefixes to
  936.      allow or disallow.  The list would be associated with a particular
  937.      interface in the incoming and/or outgoing directions.  Only allowed
  938.      networks would be mentioned in Response messages going out or
  939.      processed in Response messages coming in.  If a list of allowed
  940.      prefixes is specified, all other prefixes are disallowed.  If a list
  941.      of disallowed prefixes is specified, all other prefixes are
  942.      allowed.  By default, no filters are applied.
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953. Malkin & Minnear            Standards Track                    [Page 17]
  954.  
  955. RFC 2080                     RIPng for IPv6                 January 1997
  956.  
  957.  
  958. 4. Security Considerations
  959.  
  960.    Since RIPng runs over IPv6, RIPng relies on the IP Authentication
  961.    Header (see [11]) and the IP Encapsulating Security Payload (see
  962.    [12]) to ensure integrity and authentication/confidentiality of
  963.    routing exchanges.
  964.  
  965. References
  966.  
  967.    [1] Hedrick, C., "Routing Information Protocol", RFC 1058, Rutgers
  968.        University, June 1988.
  969.  
  970.    [2] Malkin, G., "RIP Version 2 - Carrying Additional Information",
  971.        RFC 1723, Xylogics, Inc., November, 1994.
  972.  
  973.    [3] Hinden, R., "IP Next Generation Overview",
  974.        Work in Progress.
  975.  
  976.    [4] Bellman, R., "Dynamic Programming", Princeton University
  977.        Press, Princeton, N.J., 1957.
  978.  
  979.    [5] Bertsekas, D. P., and Gallaher, R. G., "Data Networks", Prentice-
  980.        Hall, Englewood Cliffs, N.J., 1987.
  981.  
  982.    [6] Braden, R., and J. Postel, "Requirements for Internet Gateways",
  983.        USC/Information Sciences Institute, STD 4, RFC 1009, June 1987.
  984.  
  985.    [7] Boggs, D. R., Shoch, J. F., Taft, E. A., and Metcalfe, R. M.,
  986.        "Pup: An Internetwork Architecture", IEEE Transactions on Commu-
  987.        nications, April 1980.
  988.  
  989.    [8] Ford, L. R. Jr., and Fulkerson, D. R., "Flows in Networks",
  990.        Princeton University Press, Princeton, N.J., 1962.
  991.  
  992.    [9] Xerox Corp., "Internet Transport Protocols", Xerox System Inte-
  993.        gration Standard XSIS 028112, December 1981.
  994.  
  995.    [10] Narten, T., Nordmark, E., and W. Simpson, "Neighbor Discovery
  996.         for IP Version 6 (IPv6)", RFC 1970, August 1996.
  997.  
  998.    [11] Atkinson, R., "IP Authentication Header", RFC 1826
  999.         Naval Research Laboratory, August 1995.
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009. Malkin & Minnear            Standards Track                    [Page 18]
  1010.  
  1011. RFC 2080                     RIPng for IPv6                 January 1997
  1012.  
  1013.  
  1014.    [12] Atkinson, R., "IP Encapsulating Security Payload (ESP)",
  1015.         RFC 1827, Naval Research Laboratory, August 1995.
  1016.  
  1017.    [13] Floyd, S., and Jacobson, V., "The Synchronization of Periodic
  1018.         Routing Messages", Proceedings of ACM SIGCOMM '93, September
  1019.         1993.
  1020.  
  1021. Authors' Addresses
  1022.  
  1023.    Gary Scott Malkin
  1024.    Xylogics, Inc.
  1025.    53 Third Avenue
  1026.    Burlington, MA 01803
  1027.  
  1028.    Phone:  (617) 272-8140
  1029.    EMail:  gmalkin@Xylogics.COM
  1030.  
  1031.  
  1032.    Robert E. Minnear
  1033.    Ipsilon Networks, Inc.
  1034.    2191 E. Bayshore Road, Suite 100
  1035.    Palo Alto, CA 94303
  1036.  
  1037.    Phone:  (415) 846-4614
  1038.    EMail:  minnear@ipsilon.com
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065. Malkin & Minnear            Standards Track                    [Page 19]
  1066.  
  1067.