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

📄 rfc1256.txt

📁 windows 网络编程。pdf文档
💻 TXT
📖 第 1 页 / 共 3 页
字号:
   management; default values are specified so as to make it unnecessary
   to configure any of these variables in many cases.

   For each multicast interface:

   AdvertisementAddress
                 The IP destination address to be used for multicast
                 Router Advertisements sent from the interface.  The
                 only permissible values are the all-systems multicast
                 address, 224.0.0.1, or the limited-broadcast address,
                 255.255.255.255.  (The all-systems address is preferred
                 wherever possible, i.e., on any link where all
                 listening hosts support IP multicast.)

                 Default: 224.0.0.1 if the router supports IP multicast
                 on the interface, else 255.255.255.255

   MaxAdvertisementInterval
                 The maximum time allowed between sending multicast
                 Router Advertisements from the interface, in seconds.
                 Must be no less than 4 seconds and no greater than 1800
                 seconds.

                 Default: 600 seconds

   MinAdvertisementInterval
                 The minimum time allowed between sending unsolicited
                 multicast Router Advertisements from the interface, in
                 seconds.  Must be no less than 3 seconds and no greater
                 than MaxAdvertisementInterval.

                 Default: 0.75 * MaxAdvertisementInterval





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


   AdvertisementLifetime
                 The value to be placed in the Lifetime field of Router
                 Advertisements sent from the interface, in seconds.
                 Must be no less than MaxAdvertisementInterval and no
                 greater than 9000 seconds.

                 Default: 3 * MaxAdvertisementInterval


   For each of the router's IP addresses on its multicast interfaces:

   Advertise
                 A flag indicating whether or not the address is to be
                 advertised.

                 Default: TRUE

   PreferenceLevel
                 The preferability of the address as a default router
                 address, relative to other router addresses on the same
                 subnet.  A 32-bit, signed, twos-complement integer,
                 with higher values meaning more preferable.  The
                 minimum value (hex 80000000) is used to indicate that
                 the address, even though it may be advertised, is not
                 to be used by neighboring hosts as a default router
                 address.

                 Default: 0

   The case in which it is useful to configure an address with a
   preference level of hex 80000000 (rather than simply setting its
   Advertise flag to FALSE) is when advertisements are being used for
   "black hole" detection, as mentioned in Section 2.  In particular, a
   router that is to be used to reach only specific IP destinations
   could advertise its address with a preference level of hex 80000000
   (so that neighboring hosts will not use it as a default router for
   reaching arbitrary IP destinations) and a non-zero lifetime (so that
   neighboring hosts that have been redirected or configured to use it
   can detect its failure by timing out the reception of its
   advertisements).

   It has been suggested that, when the preference level of an address
   has not been explicitly configured, a router could set it according
   to the metric of the router's "default route" (if it has one), rather
   than defaulting it to zero as suggested above.  Thus, a router with a
   better metric for its default route would advertise a higher
   preference level for its address.  (Note that routing metrics that
   are encoded such that "lower is better" would have to be inverted



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


   before being used as preference levels in Router Advertisement
   messages.)  Such a strategy might reduce the amount of ICMP Redirect
   traffic on some links by making it more likely that a host's first
   choice router for reaching an arbitrary destination is also the best
   choice.  On the other hand, Redirect traffic is rarely a significant
   load on a link, and there are some cases where such a strategy would
   result in more Redirect traffic, not less (for example, on links from
   which the most frequently chosen destinations are best reached via
   routers other than the one with the best default route).  This
   document makes no recommendation concerning this issue, and
   implementors are free to try such a strategy, as long as they also
   support static configuration of preference levels as specified above.

4.2. Message Validation by Routers

   A router must silently discard any received Router Solicitation
   messages that do not satisfy the following validity checks:

      - IP Source Address is either 0 or the address of a neighbor
        (i.e., an address that matches one of the router's own
        addresses on the arrival interface, under the subnet mask
        associated with that address.)

      - ICMP Checksum is valid.

      - ICMP Code is 0.

      - ICMP length (derived from the IP length) is 8 or more
        octets.

   The contents of the ICMP Reserved field, and of any octets beyond the
   first 8, are ignored.  Future, backward-compatible changes to the
   protocol may specify the contents of the Reserved field or of
   additional octets at the end of the message; backward-incompatible
   changes may use different Code values.

   A solicitation that passes the validity checks is called a "valid
   solicitation".

   A router may silently discard any received Router Advertisement
   messages.  Any other action on reception of such messages by a router
   (for example, as part of a "peer discovery" process) is beyond the
   scope of this document.

4.3. Router Behavior

   The router joins the all-routers IP multicast group (224.0.0.2) on
   all interfaces on which the router supports IP multicast.



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


   The term "advertising interface" refers to any functioning and
   enabled multicast interface that has at least one IP address whose
   configured Advertise flag is TRUE.  From each advertising interface,
   the router transmits periodic, multicast Router Advertisements,
   containing the following values:

      - In the destination address field of the IP header: the
        interface's configured AdvertisementAddress.

      - In the Lifetime field: the interface's configured
        AdvertisementLifetime.

      - In the Router Address[i] and Preference Level[i] fields:
        all of the interface's addresses whose Advertise flags are
        TRUE, along with their corresponding PreferenceLevel
        values.  (In the unlikely event that not all addresses fit
        in a single advertisement, as constrained by the MTU of the
        link, multiple advertisements are sent, with each except
        the last containing as many addresses as can fit.)

   The advertisements are not strictly periodic: the interval between
   subsequent transmissions is randomized to reduce the probability of
   synchronization with the advertisements from other routers on the
   same link. This is done by maintaining a separate transmission
   interval timer for each advertising interface.  Each time a multicast
   advertisement is sent from an interface, that interface's timer is
   reset to a uniformly-distributed random value between the interface's
   configured MinAdvertisementInterval and MaxAdvertisementInterval;
   expiration of the timer causes the next advertisement to be sent from
   the interface, and a new random value to be chosen.  (It is
   recommended that routers include some unique value, such as one of
   their IP or link-layer addresses, in the seed used to initialize
   their pseudo-random number generators.  Although the randomization
   range is configured in units of seconds, the actual randomly-chosen
   values should not be in units of whole seconds, but rather in units
   of the highest available timer resolution.)

   For the first few advertisements sent from an interface (up to
   MAX_INITIAL_ADVERTISEMENTS), if the randomly chosen interval is
   greater than MAX_INITIAL_ADVERT_INTERVAL, the timer should be set to
   MAX_INITIAL_ADVERT_INTERVAL instead.  Using this smaller interval for
   the initial advertisements increases the likelihood of a router being
   discovered quickly when it first becomes available, in the presence
   of possible packet loss.

   In addition to the periodic, unsolicited advertisements, a router
   sends advertisements in response to valid solicitations received on
   any of its advertising interfaces.  A router may choose to unicast



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


   the response directly to the soliciting host's address (if it is not
   zero), or multicast it to the interface's configured
   AdvertisementAddress; in the latter case, the interface's interval
   timer is reset to a new random value, as with unsolicited
   advertisements.  A unicast response may be delayed, and a multicast
   response must be delayed, for a small random interval not greater
   than MAX_RESPONSE_DELAY, in order to prevent synchronization with
   other responding routers, and to allow multiple, closely-spaced
   solicitations to be answered with a single multicast advertisement.

   If a router receives a solicitation sent to an IP broadcast address,
   on an interface whose configured AdvertisementAddress is an IP
   multicast address, the router may send its response to the IP
   broadcast address instead of the configured IP multicast address.
   Such an event indicates a configuration inconsistency, and should be
   logged for possible corrective action by the network administrator.

   It should be noted that an interface may become an advertising
   interface at times other than system startup, as a result of recovery
   from an interface failure or through actions of system management
   such as:

      - enabling the interface, if it had been administratively
        disabled and it has one or more addresses whose Advertise
        flag is TRUE, or

      - enabling IP forwarding capability (i.e., changing the
        system from being a host to being a router), when the
        interface has one or more addresses whose Advertise flag is
        TRUE, or

      - setting the Advertise flag of one or more of the
        interface's addresses to TRUE (or adding a new address with
        a TRUE Advertise flag), when previously the interface had
        no address whose Advertise flag was TRUE.

In such cases, the router must commence transmission of periodic
advertisements on the new advertising interface, limiting the first few
advertisements to intervals no greater than MAX_INITIAL_ADVERT_INTERVAL.
In the case of a host becoming a router, the system must also join the
all-routers IP multicast group on all interfaces on which the router
supports IP multicast (whether or not they are advertising interfaces).

An interface may also cease to be an advertising interface, through
actions of system management such as:

      - administratively disabling the interface,




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


      - shutting down the system, or disabling the IP forwarding
        capability (i.e., changing the system from being a router
        to being a host), or

      - setting the Advertise flags of all of the interface's
        addresses to FALSE.

   In such cases, it is recommended (but not required) that the router
   transmit a final multicast advertisement on the interface, identical
   to its previous transmission but with a Lifetime field of zero.  In
   the case of a router becoming a host, the system must also depart
   from the all-routers IP multicast group on all interfaces on which
   the router supports IP multicast (whether or not they had been
   advertising interfaces).

   When the Advertise flag of one or more of an interface's addresses
   are set to FALSE by system management, but there remain other
   addresses on that interface whose Advertise flags are TRUE, it is
   recommended that the router send a single multicast advertisement
   containing only those address whose Advertise flags were set to
   FALSE, with a Lifetime field of zero.

5. Host Specification

5.1. Host Configuration Variables

   A host that implements the ICMP router discovery messages must allow
   for the following variables to be configured by system management;
   default values are specified so as to make it unnecessary to
   configure any of these variables in many cases.

   For each multicast interface:

   PerformRouterDiscovery
                 A flag indicating whether or not the host is to perform
                 ICMP router discovery on the interface.

                 Default: TRUE

   SolicitationAddress
                 The IP destination address to be used for sending
                 Router Solicitations from the interface.  The only
                 permissible values are the all-routers multicast
                 address, 224.0.0.2, or the limited-broadcast address,
                 255.255.255.255.  (The all-routers address is preferred
                 wherever possible, i.e., on any link where all
                 advertising routers support IP multicast.)




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


                 Default: 224.0.0.2 if the host supports IP multicast on
                 the interface, else 255.255.255.255

   The Host Requirements -- Communication Layers RFC [1], Section
   3.3.1.6, specifies that each host implementation must support a
   configurable list of default router addresses.  The purpose of the
   ICMP router discovery messages is to eliminate the need to configure
   that list in hosts attached to multicast links.  On non-multicast
   links, and on multicast links for which ICMP router discovery is not
   (yet) supported by the routers or is administratively disabled, it
   will continue to be necessary to configure the default router list in
   each host.  Each entry in the list contains (at least) the following
   configurable variables:

   RouterAddress
                 An IP address of a default router.

                 Default: (none)

   PreferenceLevel
                 The preferability of the RouterAddress as a default
                 router address, relative to other router addresses on
                 the same subnet.  The Host Requirements RFC does not
                 specify how this value is to be encoded; to allow the
                 preference level to be conveyed in a Router
                 Advertisement or configured by system management, it is
                 here specified that it be encoded as a 32-bit, signed,
                 twos-complement integer, with higher values meaning
                 more preferable.  The minimum value (hex 80000000) is
                 reserved to mean that the address is not to be used as
                 a default router address, i.e., it is to be used only
                 for specific IP destinations, of which the host has
                 been informed by ICMP Redirect or configuration.

⌨️ 快捷键说明

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