⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc1256.txt

📁 windows 网络编程。pdf文档
💻 TXT
📖 第 1 页 / 共 3 页
字号:






Network Working Group                                 S. Deering, Editor
Request for Comments: 1256                                    Xerox PARC
                                                          September 1991


                     ICMP Router Discovery Messages

Status of this Memo

   This RFC specifies an IAB standards track protocol for the Internet
   community, and requests discussion and suggestions for improvements.
   Please refer to the current edition of the "IAB Official Protocol
   Standards" for the standardization state and status of this protocol.
   This document is a product of the IETF Router Discovery Working
   Group.  Distribution of this memo is unlimited.

Abstract

   This document specifies an extension of the Internet Control Message
   Protocol (ICMP) to enable hosts attached to multicast or broadcast
   networks to discover the IP addresses of their neighboring routers.

Table of Contents

   1. Terminology                                                      1
   2. Protocol Overview                                                3
   3. Message Formats                                                  5
   4. Router Specification                                             7
        4.1. Router Configuration Variables                            7
        4.2. Message Validation by Routers                             9
        4.3. Router Behavior                                           9
   5. Host Specification                                              12
        5.1. Host Configuration Variables                             12
        5.2. Message Validation by Hosts                              13
        5.3. Host Behavior                                            14
   6. Protocol Constants                                              17
   7. Security Considerations                                         17
   References                                                         18
   Author's Address                                                   19

1. Terminology

   The following terms have a precise meaning when used in this
   document:

   system        a device that implements the Internet Protocol, IP [9].

   router        a system that forwards IP datagrams, as specified



Router Discovery Working Group                                  [Page 1]

RFC 1256             ICMP Router Discovery Messages       September 1991


                 in [2].  This does not include systems that, though
                 capable of IP forwarding, have that capability turned
                 off.  Nor does it include systems that do IP forwarding
                 only insofar as required to obey IP Source Route
                 options.

   host          any system that is not a router.

   multicast     unless otherwise qualified, means the use of either IP
                 multicast [4] or IP broadcast [6] service.

   link          a communication facility or medium over which systems
                 can communicate at the link layer, i.e., the protocol
                 layer immediately below IP.  The term "physical
                 network" has sometimes been used (imprecisely) for
                 this. Examples of links are LANs (possibly bridged to
                 other LANs), wide-area store-and-forward networks,
                 satellite channels, and point-to-point links.

   multicast link
                 a link over which IP multicast or IP broadcast service
                 is supported.  This includes broadcast media such as
                 LANs and satellite channels, single point-to-point
                 links, and some store-and-forward networks such as SMDS
                 networks [8].

   interface     a system's attachment point to a link.  It is possible
                 (though unusual) for a system to have more than one
                 interface to the same link.  Interfaces are uniquely
                 identified by IP unicast addresses; a single interface
                 may have more than one such address.

   multicast interface
                 an interface to a multicast link, that is, an interface
                 to a link over which IP multicast or IP broadcast
                 service is supported.

   subnet        either a single subnet of a subnetted IP network [7] or
                 a single non-subnetted IP network, i.e., the entity
                 identified by an IP address logically ANDed with its
                 assigned subnet mask.  More than one subnet may exist
                 on the same link.

   neighboring   having an IP address belonging to the same subnet.







Router Discovery Working Group                                  [Page 2]

RFC 1256             ICMP Router Discovery Messages       September 1991


2. Protocol Overview

   Before a host can send IP datagrams beyond its directly-attached
   subnet, it must discover the address of at least one operational
   router on that subnet. Typically, this is accomplished by reading a
   list of one or more router addresses from a (possibly remote)
   configuration file at startup time.  On multicast links, some hosts
   also discover router addresses by listening to routing protocol
   traffic.  Both of these methods have serious drawbacks: configuration
   files must be maintained manually -- a significant administrative
   burden -- and are unable to track dynamic changes in router
   availability; eavesdropping on routing traffic requires that hosts
   recognize the particular routing protocols in use, which vary from
   subnet to subnet and which are subject to change at any time.  This
   document specifies an alternative router discovery method using a
   pair of ICMP [10] messages, for use on multicast links.  It
   eliminates the need for manual configuration of router addresses and
   is independent of any specific routing protocol.

   The ICMP router discovery messages are called "Router Advertisements"
   and "Router Solicitations".  Each router periodically multicasts a
   Router Advertisement from each of its multicast interfaces,
   announcing the IP address(es) of that interface.  Hosts discover the
   addresses of their neighboring routers simply by listening for
   advertisements.  When a host attached to a multicast link starts up,
   it may multicast a Router Solicitation to ask for immediate
   advertisements, rather than waiting for the next periodic ones to
   arrive; if (and only if) no advertisements are forthcoming, the host
   may retransmit the solicitation a small number of times, but then
   must desist from sending any more solicitations.  Any routers that
   subsequently start up, or that were not discovered because of packet
   loss or temporary link partitioning, are eventually discovered by
   reception of their periodic (unsolicited) advertisements.  (Links
   that suffer high packet loss rates or frequent partitioning are
   accommodated by increasing the rate of advertisements, rather than
   increasing the number of solicitations that hosts are permitted to
   send.)

   The router discovery messages do not constitute a routing protocol:
   they enable hosts to discover the existence of neighboring routers,
   but not which router is best to reach a particular destination.  If a
   host chooses a poor first-hop router for a particular destination, it
   should receive an ICMP Redirect from that router, identifying a
   better one.

   A Router Advertisement includes a "preference level" for each
   advertised router address.  When a host must choose a default router
   address (i.e., when, for a particular destination, the host has not



Router Discovery Working Group                                  [Page 3]

RFC 1256             ICMP Router Discovery Messages       September 1991


   been redirected or configured to use a specific router address), it
   is expected to choose from those router addresses that have the
   highest preference level (see Section 3.3.1 in the Host Requirements
   -- Communication Layers RFC [1]).  A network administrator can
   configure router address preference levels to encourage or discourage
   the use of particular routers as default routers.

   A Router Advertisement also includes a "lifetime" field, specifying
   the maximum length of time that the advertised addresses are to be
   considered as valid router addresses by hosts, in the absence of
   further advertisements.  This is used to ensure that hosts eventually
   forget about routers that fail, become unreachable, or stop acting as
   routers.

   The default advertising rate is once every 7 to 10 minutes, and the
   default lifetime is 30 minutes.  This means that, using the default
   values, the advertisements are not sufficient as a mechanism for
   "black hole" detection, i.e., detection of failure of the first hop
   of an active path -- ideally, black holes should be detected quickly
   enough to switch to another router before any transport connections
   or higher-layer sessions time out.  It is assumed that hosts already
   have mechanisms for black hole detection, as required by [1].  Hosts
   cannot depend on Router Advertisements for this purpose, since they
   may be unavailable or administratively disabled on any particular
   link or from any particular router.  Therefore, the default
   advertising rate and lifetime values were chosen simply to make the
   load imposed on links and hosts by the periodic multicast
   advertisements negligible, even when there are many routers present.
   However, a network administrator who wishes to employ advertisements
   as a supplemental black hole detection mechanism is free to configure
   smaller values.




















Router Discovery Working Group                                  [Page 4]

RFC 1256             ICMP Router Discovery Messages       September 1991


3. Message Formats


   ICMP Router Advertisement Message

       0                   1                   2                   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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |     Code      |           Checksum            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Num Addrs   |Addr Entry Size|           Lifetime            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                       Router Address[1]                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Preference Level[1]                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                       Router Address[2]                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Preference Level[2]                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                               .                               |
      |                               .                               |
      |                               .                               |


   IP Fields:

      Source Address        An IP address belonging to the interface
                            from which this message is sent.

      Destination Address   The configured AdvertisementAddress or the
                            IP address of a neighboring host.

      Time-to-Live          1 if the Destination Address is an IP
                            multicast address; at least 1 otherwise.


   ICMP Fields:

      Type                  9

      Code                  0

      Checksum              The  16-bit one's complement of the one's
                            complement sum of the ICMP message, start-
                            ing with the ICMP Type.  For computing the
                            checksum, the Checksum field is set to 0.




Router Discovery Working Group                                  [Page 5]

RFC 1256             ICMP Router Discovery Messages       September 1991


      Num Addrs             The number of router addresses advertised
                            in this message.

      Addr Entry Size       The number of 32-bit words of information
                            per each router address (2, in the version
                            of the protocol described here).

      Lifetime              The maximum number of seconds that the
                            router addresses may be considered valid.

      Router Address[i],    The sending router's IP address(es) on the
       i = 1..Num Addrs     interface from which this message is sent.

      Preference Level[i],  The preferability of each Router Address[i]
       i = 1..Num Addrs     as a default router address, relative to
                            other router addresses on the same subnet.
                            A signed, twos-complement value; higher
                            values mean more preferable.


   ICMP Router Solicitation Message

       0                   1                   2                   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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |     Code      |           Checksum            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Reserved                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   IP Fields:

      Source Address        An IP address belonging to the interface
                            from which this message is sent, or 0.

      Destination Address   The configured SolicitationAddress.

      Time-to-Live          1 if the Destination Address is an IP
                            multicast address; at least 1 otherwise.


   ICMP Fields:

      Type                  10

      Code                  0




Router Discovery Working Group                                  [Page 6]

RFC 1256             ICMP Router Discovery Messages       September 1991


      Checksum              The  16-bit one's complement of the one's
                            complement sum of the ICMP message, start-
                            ing with the ICMP Type.  For computing the
                            checksum, the Checksum field is set to 0.

      Reserved              Sent as 0; ignored on reception.


4. Router Specification

4.1. Router Configuration Variables

   A router that implements the ICMP router discovery messages must
   allow for the following variables to be configured by system

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -