Table of Contents
1. INTRODUCTION............................................. 2
2. TERMINOLOGY.............................................. 4
2.1. Requirements........................................ 6
3. DESIGN GOALS............................................. 7
4. PROTOCOL OVERVIEW........................................ 8
4.1. Site Renumbering.................................... 10
5. PROTOCOL SPECIFICATION................................... 10
5.1. Node Configuration Variables........................ 11
5.2. Autoconfiguration-Related Variables................. 11
5.3. Creation of Link-Local Addresses.................... 12
Thomson & Narten Standards Track [Page 1]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
5.4. Duplicate Address Detection......................... 13
5.4.1. Message Validation............................. 14
5.4.2. Sending Neighbor Solicitation Messages......... 14
5.4.3. Receiving Neighbor Solicitation Messages....... 15
5.4.4. Receiving Neighbor Advertisement Messages...... 16
5.4.5. When Duplicate Address Detection Fails......... 16
5.5. Creation of Global and Site-Local Addresses......... 16
5.5.1. Soliciting Router Advertisements............... 16
5.5.2. Absence of Router Advertisements............... 17
5.5.3. Router Advertisement Processing................ 17
5.5.4. Address Lifetime Expiry........................ 19
5.6. Configuration Consistency........................... 19
6. SECURITY CONSIDERATIONS.................................. 20
7. References............................................... 20
8. Acknowledgements and Authors' Addresses.................. 21
9. APPENDIX A: LOOPBACK SUPPRESSION & DUPLICATE ADDRESS
DETECTION.............................................. 22
10. APPENDIX B: CHANGES SINCE RFC 1971....................... 24
11. Full Copyright Statement................................. 25
1. INTRODUCTION
This document specifies the steps a host takes in deciding how to
autoconfigure its interfaces in IP version 6. The autoconfiguration
process includes creating a link-local address and verifying its
uniqueness on a link, determining what information should be
autoconfigured (addresses, other information, or both), and in the
case of addresses, whether they should be obtained through the
stateless mechanism, the stateful mechanism, or both. This document
defines the process for generating a link-local address, the process
for generating site-local and global addresses via stateless address
autoconfiguration, and the Duplicate Address Detection procedure. The
details of autoconfiguration using the stateful protocol are
specified elsewhere.
这篇文档描述了主机如何按步骤决定自动配置接口的IP6地址。自动配置过程包括生成一个链路本地地址并
确认其在本链路上的唯一性;决定什么样的信息应该被自动配置(地址,其他信息,或两者都有);以及在
地址配置中,是应该通过无状态配置,有状态配置还是两者都有等内容。这篇文档叙述了通过无状态配置和
重复地址检测机制生成链路本地地址的过程和生成站点本地和全球地址的过程。对于有状态自动配置的详细
内容,将在其他文档中有详细描述。
IPv6 defines both a stateful and stateless address autoconfiguration
mechanism. Stateless autoconfiguration requires no manual
configuration of hosts, minimal (if any) configuration of routers,
and no additional servers. The stateless mechanism allows a host to
generate its own addresses using a combination of locally available
information and information advertised by routers. Routers advertise
prefixes that identify the subnet(s) associated with a link, while
hosts generate an "interface identifier" that uniquely identifies an
interface on a subnet. An address is formed by combining the two. In
the absence of routers, a host can only generate link-local
addresses. However, link-local addresses are sufficient for allowing
communication among nodes attached to the same link.
IPV6定义了有状态自动配置和无状态自动配置的两种机制。无状态自动配置不需要手动的配置主机,最大化的减少
路由器的配置,并且没有其他的服务器。无状态自动配置允许主机通过把由路由器宣告的信息和自己本身的信息连
接起来自动生成自己的地址。路由器宣告与某个链路关联的网络前缀,而主机生成某个接口的接口标识符。把这两者
接合就生成了一个地址。在没有路由器的环境中,主机只能生成链路本地地址。但是,链路本地地址已经足够用来在
链路上进行通信了。
Thomson & Narten Standards Track [Page 2]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
In the stateful autoconfiguration model, hosts obtain interface
addresses and/or configuration information and parameters from a
server. Servers maintain a database that keeps track of which
addresses have been assigned to which hosts. The stateful
autoconfiguration protocol allows hosts to obtain addresses, other
configuration information or both from a server. Stateless and
stateful autoconfiguration complement each other. For example, a host
can use stateless autoconfiguration to configure its own addresses,
but use stateful autoconfiguration to obtain other information.
Stateful autoconfiguration for IPv6 is the subject of future work
[DHCPv6].
在有状态自动配置的网络中,主机从某个服务器获得接口的地址(可能还有其他的配置信息)。服务器保持一个数据库来跟踪
地址的试用。有状态自动配置允许主机从服务器获得地址,其他的配置信息,或者两者都有。无状态自动配置和有状态自动配置
可以互为补充。例如,主机能够利用无状态自动配置方式来配置地址,但通过有状态自动配置方式来配置其他信息。IP6的有状态
自动配置是将来的一个工作课题。
The stateless approach is used when a site is not particularly
concerned with the exact addresses hosts use, so long as they are
unique and properly routable. The stateful approach is used when a
site requires tighter control over exact address assignments. Both
stateful and stateless address autoconfiguration may be used
simultaneously. The site administrator specifies which type of
autoconfiguration to use through the setting of appropriate fields in
Router Advertisement messages [DISCOVERY].
无状态配置方式可以用在不需要关注每个主机的确切地址的站点中,只要求这些地址是唯一的,并且可路由的。而有状态自动配置在
需要跟踪地址配置的站点中。这两种配置方式可能同时出现在某个网络中。站点管理者可以决定RA数据报的哪些字段可以用来自动配置。
IPv6 addresses are leased to an interface for a fixed (possibly
infinite) length of time. Each address has an associated lifetime
that indicates how long the address is bound to an interface. When a
lifetime expires, the binding (and address) become invalid and the
address may be reassigned to another interface elsewhere in the
Internet. To handle the expiration of address bindings gracefully, an
address goes through two distinct phases while assigned to an
interface. Initially, an address is "preferred", meaning that its use
in arbitrary communication is unrestricted. Later, an address becomes
"deprecated" in anticipation that its current interface binding will
become invalid. While in a deprecated state, the use of an address is
discouraged, but not strictly forbidden. New communication (e.g.,
the opening of a new TCP connection) should use a preferred address
when possible. A deprecated address should be used only by
applications that have been using it and would have difficulty
switching to another address without a service disruption.
IP6地址租借给主机的接口有一个确定时间期限(可能是无限长的)。每一个地址都有一个生存期来指示接口能拥有该地址的时间。当
生存期结束,则接口和地址之间的绑定关系结束,该地址可能被重新分配给网络中的其他接口。为了更有效的处理地址的过期,地址与某个
接口绑定后,需要经过两个阶段。初始阶段是"preferred",意味着接口可以没有任何限制的使用该地址;第二个阶段是"deprecated",表明
地址很快就要失效了。在"deprecated"阶段,不提倡使用该地址,但并不禁止。如果可能,新的通信(如打开一个新的TCP连接)应该使用一
个"preferred"地址。"deprecated"地址应该只被用于已经使用该地址,并且很难不中断通信的改变地址的应用。
To insure that all configured addresses are likely to be unique on a
given link, nodes run a "duplicate address detection" algorithm on
addresses before assigning them to an interface. The Duplicate
Address Detection algorithm is performed on all addresses,
independent of whether they are obtained via stateless or stateful
autoconfiguration. This document defines the Duplicate Address
Detection algorithm.
为了保证所有地址在链路上的唯一性,节点在把地址和接口绑定之前,必须使用重复地址检测来判断地址的唯一性。不管地址是通过有状态
配置方式来获得,还是通过无状态自动配置获得,每个地址都要进行重复地址检测。这篇文档叙述了重复地址检测的原理。
Thomson & Narten Standards Track [Page 3]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
The autoconfiguration process specified in this document applies only
to hosts and not routers. Since host autoconfiguration uses
information advertised by routers, routers will need to be configured
by some other means. However, it is expected that routers will
generate link-local addresses using the mechanism described in this
document. In addition, routers are expected to successfully pass the
Duplicate Address Detection procedure described in this document on
all addresses prior to assigning them to an interface.
这篇文档描述的自动配置过程仅仅适用于主机而非路由器。因为主机需要使用路由器宣告的信息来进行配置,
路由器将需要通过其他方式来进行配置。但是,当路由器生成链路本地地址的时候,它也可以使用本文档描述
的方式来进行配置。另外,路由器同样需要在把地址和它的接口绑定之前,使用本文档描述的重复地址检测进行检验。
Section 2 provides definitions for terminology used throughout this
document. Section 3 describes the design goals that lead to the
current autoconfiguration procedure. Section 4 provides an overview
of the protocol, while Section 5 describes the protocol in detail.
2. TERMINOLOGY
IP - Internet Protocol Version 6. The terms IPv4 and are used
only in contexts where necessary to avoid ambiguity.
node - a device that implements IP.
router - a node that forwards IP packets not explicitly addressed to
itself.
host - any node that is not a router.
upper layer - a protocol layer immediately above IP. Examples are
transport protocols such as TCP and UDP, control protocols such
as ICMP, routing protocols such as OSPF, and internet or lower-
layer protocols being "tunneled" over (i.e., encapsulated in) IP
such as IPX, AppleTalk, or IP itself.
link - a communication facility or medium over which nodes can
communicate at the link layer, i.e., the layer immediately below
IP. Examples are Ethernets (simple or bridged); PPP links;
X.25, Frame Relay, or ATM networks; and internet (or higher)
layer "tunnels", such as tunnels over IPv4 or IPv6 itself.
interface - a node's attachment to a link.
packet - an IP header plus payload.
address - an IP-layer identifier for an interface or a set of
interfaces.
unicast address - an identifier for a single interface. A packet sent
to a unicast address is delivered to the interface identified by
that address.
Thomson & Narten Standards Track [Page 4]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
multicast address - an identifier for a set of interfaces (typically
belonging to different nodes). A packet sent to a multicast
address is delivered to all interfaces identified by that
address.
anycast address - an identifier for a set of interfaces (typically
belonging to different nodes). A packet sent to an anycast
address is delivered to one of the interfaces identified by that
address (the "nearest" one, according to the routing protocol's
measure of distance). See [ADDR-ARCH].
solicited-node multicast address - a multicast address to which
Neighbor Solicitation messages are sent. The algorithm for
computing the address is given in [DISCOVERY].
link-layer address - a link-layer identifier for an interface.
Examples include IEEE 802 addresses for Ethernet links and E.164
addresses for ISDN links.
link-local address - an address having link-only scope that can be
used to reach neighboring nodes attached to the same link. All
interfaces have a link-local unicast address.
site-local address - an address having scope that is limited to the
local site.
global address - an address with unlimited scope.
communication - any packet exchange among nodes that requires that
the address of each node used in the exchange remain the same
for the duration of the packet exchange. Examples are a TCP
connection or a UDP request- response.
tentative address - an address whose uniqueness on a link is being
verified, prior to its assignment to an interface. A tentative
address is not considered assigned to an interface in the usual
sense. An interface discards received packets addressed to a
tentative address, but accepts Neighbor Discovery packets
related to Duplicate Address Detection for the tentative
address.
preferred address - an address assigned to an interface whose use by
upper layer protocols is unrestricted. Preferred addresses may
be used as the source (or destination) address of packets sent
from (or to) the interface.
Thomson & Narten Standards Track [Page 5]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
deprecated address - An address assigned to an interface whose use is
discouraged, but not forbidden. A deprecated address should no
longer be used as a source address in new communications, but
packets sent from or to deprecated addresses are delivered as
expected. A deprecated address may continue to be used as a
source address in communications where switching to a preferred
address causes hardship to a specific upper-layer activity
(e.g., an existing TCP connection).
valid address - a preferred or deprecated address. A valid address
may appear as the source or destination address of a packet, and
the internet routing system is expected to deliver packets sent
to a valid address to their intended recipients.
invalid address - an address that is not assigned to any interface. A
valid address becomes invalid when its valid lifetime expires.
Invalid addresses should not appear as the destination or source
address of a packet. In the former case, the internet routing
system will be unable to deliver the packet, in the later case
the recipient of the packet will be unable to respond to it.
preferred lifetime - the length of time that a valid address is
preferred (i.e., the time until deprecation). When the preferred
lifetime expires, the address becomes deprecated.
valid lifetime - the length of time an address remains in the valid
state (i.e., the time until invalidation). The valid lifetime
must be greater then or equal to the preferred lifetime. When
the valid lifetime expires, the address becomes invalid.
interface identifier - a link-dependent identifier for an interface
that is (at least) unique per link [ADDR-ARCH]. Stateless
address autoconfiguration combines an interface identifier with
a prefix to form an address. From address autoconfiguration's
perspective, an interface identifier is a bit string of known
length. The exact length of an interface identifier and the way
it is created is defined in a separate link-type specific
document that covers issues related to the transmission of IP
over a particular link type (e.g., [IPv6-ETHER]). In many
cases, the identifier will be the same as the interface's link-
layer address.
2.1. Requirements
The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
document, are to be interpreted as described in [KEYWORDS].
Thomson & Narten Standards Track [Page 6]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
3. DESIGN GOALS
Stateless autoconfiguration is designed with the following goals in
mind:
o Manual configuration of individual machines before connecting
them to the network should not be required. Consequently, a
mechanism is needed that allows a host to obtain or create
unique addresses for each of its interfaces. Address
autoconfiguration assumes that each interface can provide a
unique identifier for that interface (i.e., an "interface
identifier"). In the simplest case, an interface identifier
consists of the interface's link-layer address. An interface
identifier can be combined with a prefix to form an address.
o Small sites consisting of a set of machines attached to a single
link should not require the presence of a stateful server or
router as a prerequisite for communicating. Plug-and-play
communication is achieved through the use of link-local
addresses. Link-local addresses have a well-known prefix that
identifies the (single) shared link to which a set of nodes
attach. A host forms a link-local address by appending its
interface identifier to the link-local prefix.
o A large site with multiple networks and routers should not
require the presence of a stateful address configuration server.
In order to generate site-local or global addresses, hosts must
determine the prefixes that identify the subnets to which they
attach. Routers generate periodic Router Advertisements that
include options listing the set of active prefixes on a link.
o Address configuration should facilitate the graceful renumbering
of a site's machines. For example, a site may wish to renumber
all of its nodes when it switches to a new network service
provider. Renumbering is achieved through the leasing of
addresses to interfaces and the assignment of multiple addresses
to the same interface. Lease lifetimes provide the mechanism
through which a site phases out old prefixes. The assignment of
multiple addresses to an interface provides for a transition
period during which both a new address and the one being phased
out work simultaneously.
o System administrators need the ability to specify whether
stateless autoconfiguration, stateful autoconfiguration, or both
should be used. Router Advertisements include flags specifying
which mechanisms a host should use.
Thomson & Narten Standards Track [Page 7]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
4. PROTOCOL OVERVIEW
This section provides an overview of the typical steps that take
place when an interface autoconfigures itself. Autoconfiguration is
performed only on multicast-capable links and begins when a
multicast-capable interface is enabled, e.g., during system startup.
Nodes (both hosts and routers) begin the autoconfiguration process by
generating a link-local address for the interface. A link-local
address is formed by appending the interface's identifier to the
well-known link-local prefix.
这一部分对接口的地址配置的几个关键环节进行了简单描述。自动配置只在支持多播的链路上使用,并且要求
接口也支持多播。节点(包括路由器)开始的时候置链路本地地址。把接口标识符和已知的链路本地前缀连接
就生成了链路本地地址。
Before the link-local address can be assigned to an interface and
used, however, a node must attempt to verify that this "tentative"
address is not already in use by another node on the link.
Specifically, it sends a Neighbor Solicitation message containing the
tentative address as the target. If another node is already using
that address, it will return a Neighbor Advertisement saying so. If
another node is also attempting to use the same address, it will send
a Neighbor Solicitation for the target as well. The exact number of
times the Neighbor Solicitation is (re)transmitted and the delay time
between consecutive solicitations is link-specific and may be set by
system management.
在链路本地地址与接口绑定之前,节点首先必须确认该地址在链路中的唯一性。它首先要发送一个携带该临时地址的
NS报文。如果某个节点已经在使用该地址,它就会回复一个NA。如果某个节点也要使用同样的地址,它也会发送一个
携带该地址的NS。NS的重传次数,每个NS的延迟时间都是与链路相关的,可一由系统管理员来设置。
If a node determines that its tentative link-local address is not
unique, autoconfiguration stops and manual configuration of the
interface is required. To simplify recovery in this case, it should
be possible for an administrator to supply an alternate interface
identifier that overrides the default identifier in such a way that
the autoconfiguration mechanism can then be applied using the new
(presumably unique) interface identifier. Alternatively, link-local
and other addresses will need to be configured manually.
如果节点发现它要使用的临时地址不是唯一的,自动配置就会停止,然后需要手动配置了。为了简化这种情况,应该能让
管理员能提供一个替代的接口标识符来覆盖掉原来的接口标识符,原后自动配置就可以使用这个新的接口标识符了。否则,
链路地址和其他地址就需要手动配置了。
Once a node ascertains that its tentative link-local address is
unique, it assigns it to the interface. At this point, the node has
IP-level connectivity with neighboring nodes. The remaining
autoconfiguration steps are performed only by hosts; the
(auto)configuration of routers is beyond the scope of this document.
当节点发现它的临时地址是唯一的时候,它就会把地址和接口绑定起来。这个时候,节点与邻居之间在IP层有了通路。剩下的
自动配置就只与主机相关了,路由器的自动配置就不在讨论之列了。
The next phase of autoconfiguration involves obtaining a Router
Advertisement or determining that no routers are present. If routers
are present, they will send Router Advertisements that specify what
sort of autoconfiguration a host should do. If no routers are
present, stateful autoconfiguration should be invoked.
自动配置的下一步就是接收RA或者发现没有路由器。如果链路中有路由器,它们会发送RA来决定什么样的信息应该由主机自己
配置。如果链路中没有路由器,则应该使用有状态自动配置。
Routers send Router Advertisements periodically, but the delay
between successive advertisements will generally be longer than a
host performing autoconfiguration will want to wait [DISCOVERY]. To
obtain an advertisement quickly, a host sends one or more Router
Thomson & Narten Standards Track [Page 8]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
Solicitations to the all-routers multicast group. Router
Advertisements contain two flags indicating what type of stateful
autoconfiguration (if any) should be performed. A "managed address
configuration" flag indicates whether hosts should use stateful
autoconfiguration to obtain addresses. An "other stateful
configuration" flag indicates whether hosts should use stateful
autoconfiguration to obtain additional information (excluding
addresses).
路由器周期性的发送RA,但是这个周期可能与主机自动配置有些长了。为了很快的获得RA,主机会向all-routers多播组发送一个
或多个RS。RA中包含的两个标志决定什么的有状态自动配置应该被使用。"M"标志指示主机应该使用有状态自动配置来获得地址。
"O"标志指示主机应该使用有状态自动配置来获得其他信息。
Router Advertisements also contain zero or more Prefix Information
options that contain information used by stateless address
autoconfiguration to generate site-local and global addresses. It
should be noted that the stateless and stateful address
autoconfiguration fields in Router Advertisements are processed
independently of one another, and a host may use both stateful and
stateless address autoconfiguration simultaneously. One Prefix
Information option field, the "autonomous address-configuration
flag", indicates whether or not the option even applies to stateless
autoconfiguration. If it does, additional option fields contain a
subnet prefix together with lifetime values indicating how long
addresses created from the prefix remain preferred and valid.
RA同样包含了0个或多个前缀信息选项,可以被无状态自动配置用来配置站点本地地址和全球本地地址。应该注意的是,RA中用于
有状态自动配置和用于无状态自动配置的字段应该被独立的处理,主机可能同时使用两种信息。
Because routers generate Router Advertisements periodically, hosts
will continually receive new advertisements. Hosts process the
information contained in each advertisement as described above,
adding to and refreshing information received in previous
advertisements.
For safety, all addresses must be tested for uniqueness prior to
their assignment to an interface. In the case of addresses created
through stateless autoconfig, however, the uniqueness of an address
is determined primarily by the portion of the address formed from an
interface identifier. Thus, if a node has already verified the
uniqueness of a link-local address, additional addresses created from
the same interface identifier need not be tested individually. In
contrast, all addresses obtained manually or via stateful address
autoconfiguration should be tested for uniqueness individually. To
accommodate sites that believe the overhead of performing Duplicate
Address Detection outweighs its benefits, the use of Duplicate
Address Detection can be disabled through the administrative setting
of a per-interface configuration flag.
为了安全起见,所有的地址在使用之前都必须进行唯一性的测试。但是,在无状态自动配置下,如果已经证实本地链路地址的
唯一性。则其他的使用同一个接口标识符形成的地址不需要再进行唯一性测试了。相比之下,如果所有地址都是通过手动或者
有状态自动配置获得的,则它们应该进行唯一性测试。假如管理员认为重复地址检测的耗费太大,也可以禁止它。
To speed the autoconfiguration process, a host may generate its
link-local address (and verify its uniqueness) in parallel with
waiting for a Router Advertisement. Because a router may delay
responding to a Router Solicitation for a few seconds, the total time
needed to complete autoconfiguration can be significantly longer if
the two steps are done serially.
为了加快自动配置的进程,主机可能在生成链路本地地址(并确认其唯一性)的同时,等待接收RA。因为路由器可能会在接收到
RS后延迟几秒发送RA。如果将以上两个步骤线性进行,可能消耗的时间比较长了。
Thomson & Narten Standards Track [Page 9]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
4.1. Site Renumbering
Address leasing facilitates site renumbering by providing a mechanism
to time-out addresses assigned to interfaces in hosts. At present,
upper layer protocols such as TCP provide no support for changing
end-point addresses while a connection is open. If an end-point
address becomes invalid, existing connections break and all
communication to the invalid address fails. Even when applications
use UDP as a transport protocol, addresses must generally remain the
same during a packet exchange.
地址租约通过使与接口绑定的地址失效来进行site renumbering。目前,上层协议,比如TCP,没有提供在连接打开的时候,
改变终端的地址的支持。如果某个终端的地址失效了,已存在的连接被中断,并且所有与该失效地址有关的通信都被中断。
即使应用程序使用UDP作为传输协议,在某个数据报的传输过程中,也必须保证地址不变。
Dividing valid addresses into preferred and deprecated categories
provides a way of indicating to upper layers that a valid address may
become invalid shortly and that future communication using the
address will fail, should the address's valid lifetime expire before
communication ends. To avoid this scenario, higher layers should use
a preferred address (assuming one of sufficient scope exists) to
increase the likelihood that an address will remain valid for the
duration of the communication. It is up to system administrators to
set appropriate prefix lifetimes in order to minimize the impact of
failed communication when renumbering takes place. The deprecation
period should be long enough that most, if not all, communications
are using the new address at the time an address becomes invalid.
将有效地址划分成"preferred"和"deprecated"两个阶段,提供了向上层协议指示地址马上要失效的机制。
为了防止在通信结束之前地址失效,上层应该使用"preferred"地址。网络管理员有责任设置一个合适的
前缀生存期来最小化因为renumbering带来的通信失败。地址处于"deprecated"的时间应该足够长,这样
对于大多数连接,都能够及时的使用新的地址。
The IP layer is expected to provide a means for upper layers
(including applications) to select the most appropriate source
address given a particular destination and possibly other
constraints. An application may choose to select the source address
itself before starting a new communication or may leave the address
unspecified, in which case the upper networking layers will use the
mechanism provided by the IP layer to choose a suitable address on
the application's behalf.
Detailed address selection rules are beyond the scope of this
document.
5. PROTOCOL SPECIFICATION
Autoconfiguration is performed on a per-interface basis on
multicast-capable interfaces. For multihomed hosts,
autoconfiguration is performed independently on each interface.
Autoconfiguration applies primarily to hosts, with two exceptions.
Routers are expected to generate a link-local address using the
procedure outlined below. In addition, routers perform Duplicate
Address Detection on all addresses prior to assigning them to an
interface.
只有在支持多播的接口上,才能进行自动地址配置。对于多接口的主机,每个接口都独立地进行自动配置。
自动配置主要用于主机,除了两个例外:一是路由器生成链路本地地址。而是路由器在绑定地址之前进行
重复地址检测。
Thomson & Narten Standards Track [Page 10]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
5.1. Node Configuration Variables
A node MUST allow the following autoconfiguration-related variable to
be configured by system management for each multicast interface:
DupAddrDetectTransmits
The number of consecutive Neighbor Solicitation
messages sent while performing Duplicate Address
Detection on a tentative address. A value of zero
indicates that Duplicate Address Detection is not
performed on tentative addresses. A value of one
indicates a single transmission with no follow up
retransmissions.
Default: 1, but may be overridden by a link-type
specific value in the document that covers issues
related to the transmission of IP over a particular
link type (e.g., [IPv6-ETHER]).
Autoconfiguration also assumes the presence of the
variable RetransTimer as defined in [DISCOVERY].
For autoconfiguration purposes, RetransTimer
specifies the delay between consecutive Neighbor
Solicitation transmissions performed during
Duplicate Address Detection (if
DupAddrDetectTransmits is greater than 1), as well
as the time a node waits after sending the last
Neighbor Solicitation before ending the Duplicate
Address Detection process.
5.2. Autoconfiguration-Related Variables
A host maintains a number of data structures and flags related to
autoconfiguration. In the following, we present conceptual variables
and show how they are used to perform autoconfiguration. The specific
variables are used for demonstration purposes only, and an
implementation is not required to have them, so long as its external
behavior is consistent with that described in this document.
Beyond the formation of a link-local address and using Duplicate
Address Detection, how routers (auto)configure their interfaces is
beyond the scope of this document.
Hosts maintain the following variables on a per-interface basis:
Thomson & Narten Standards Track [Page 11]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
ManagedFlag Copied from the M flag field (i.e., the
"managed address configuration" flag) of the most
recently received Router Advertisement message.
The flag indicates whether or not addresses are
to be configured using the stateful
autoconfiguration mechanism. It starts out in a
FALSE state.
OtherConfigFlag Copied from the O flag field (i.e., the "other
stateful configuration" flag) of the most
recently received Router Advertisement message.
The flag indicates whether or not information
other than addresses is to be obtained using the
stateful autoconfiguration mechanism. It starts
out in a FALSE state.
In addition, when the value of the ManagedFlag is
TRUE, the value of OtherConfigFlag is implicitely
TRUE as well. It is not a valid configuration for
a host to use stateful address autoconfiguration
to request addresses only, without also accepting
other configuration
information.
A host also maintains a list of addresses together with their
corresponding lifetimes. The address list contains both
autoconfigured addresses and those configured manually.
5.3. Creation of Link-Local Addresses
A node forms a link-local address whenever an interface becomes
enabled. An interface may become enabled after any of the
following events:
- The interface is initialized at system startup time.
- The interface is reinitialized after a temporary interface
failure or after being temporarily disabled by system
management.
- The interface attaches to a link for the first time.
- The interface becomes enabled by system management after
having been administratively
disabled.
Thomson & Narten Standards Track [Page 12]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
A link-local address is formed by prepending the well-known link-
local prefix FE80::0 [ADDR-ARCH] (of appropriate length) to the
interface identifier. If the interface identifier has a length of N
bits, the interface identifier replaces the right-most N zero bits of
the link-local prefix. If the interface identifier is more than 118
bits in length, autoconfiguration fails and manual configuration is
required. Note that interface identifiers will typically be 64-bits
long and based on EUI-64 identifiers as described in [ADDR-ARCH].
本地地址通过把已知的本地链路前缀(FE80::0)连接在接口标识符之前生成。如果接口标识符的长度为N,
则接口标识符替换前缀最右边的N个0。如果接口标识符的长度大于118bits,则自动配置失败,要求进行
手动地址配置。注意:接口标识符一般为64bits,基于EUI-64的标识符。
A link-local address has an infinite preferred and valid lifetime; it
is never timed out.
链路本地地址的preferred和valid lifetime是无限长的。它永远不会超时。
5.4. Duplicate Address Detection
Duplicate Address Detection is performed on unicast addresses prior
to assigning them to an interface whose DupAddrDetectTransmits
variable is greater than zero. Duplicate Address Detection MUST take
place on all unicast addresses, regardless of whether they are
obtained through stateful, stateless or manual configuration, with
the exception of the following cases:
重复地址检测是针对单播地址的,它总是在把地址绑定之前,而且对应接口的DupAddrDetectTransmits大于0之前进行。
所有单播地址必须进行重复地址检测,不管它们是通过有状态地址配置,还是通过无状态地址配置获得的。以下是几个
例外:
- Duplicate Address Detection MUST NOT be performed on anycast
addresses.
任意播地址一定不能进行重复地址检测。
- Each individual unicast address SHOULD be tested for uniqueness.
However, when stateless address autoconfiguration is used,
address uniqueness is determined solely by the interface
identifier, assuming that subnet prefixes are assigned correctly
(i.e., if all of an interface's addresses are generated from the
same identifier, either all addresses or none of them will be
duplicates). Thus, for a set of addresses formed from the same
interface identifier, it is sufficient to check that the link-
local address generated from the identifier is unique on the
link. In such cases, the link-local address MUST be tested for
uniqueness, and if no duplicate address is detected, an
implementation MAY choose to skip Duplicate Address Detection
for additional addresses derived from the same interface
identifier.
每一个单播地址都应该进行唯一性的测试。但是,当采用无状态地址配置的时候,地址的唯一性是通过测试
接口标识符进行的。因此,如果某个接口的所有地址都连接了相同的接口标识符,就能够证明所有这些地址
在链路上的唯一性。在这种情况下,链路本地地址必须进行重复地址检测,如果证明其唯一性,则接下来的
通过相同的接口标识符生成的地址可能被设置为不进行重复地址检测。
The procedure for detecting duplicate addresses uses Neighbor
Solicitation and Advertisement messages as described below. If a
duplicate address is discovered during the procedure, the address
cannot be assigned to the interface. If the address is derived from
an interface identifier, a new identifier will need to be assigned to
the interface, or all IP addresses for the interface will need to be
manually configured. Note that the method for detecting duplicates
is not completely reliable, and it is possible that duplicate
Thomson & Narten Standards Track [Page 13]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
addresses will still exist (e.g., if the link was partitioned while
Duplicate Address Detection was performed).
如果在重复地址检测中发现地址重复,则不能把该地址与接口绑定。如果该地址通过一个接口标识符生成,则
需要为该接口生成一个新的接口标识符,或者这个接口的IP地址都需要手动配置。注意:重复地址检测并不是
完全可靠,有些重复地址可能依然存在(如在进行重复地址检测的时候链路被分割)。
An address on which the duplicate Address Detection Procedure is
applied is said to be tentative until the procedure has completed
successfully. A tentative address is not considered "assigned to an
interface" in the traditional sense. That is, the interface must
accept Neighbor Solicitation and Advertisement messages containing
the tentative address in the Target Address field, but processes such
packets differently from those whose Target Address matches an
address assigned to the interface. Other packets addressed to the
tentative address should be silently discarded.
在对某个地址进行重复地址检测的时候,该地址称为临时地址,直到检测成功结束。接口一定要能接收包含临时
地址作为目标地址的NS和NA,但处理这样的报文不同于其他目标地址已经绑定到接口的报文。其他发送往该临时
地址的报文应该被丢弃。
It should also be noted that Duplicate Address Detection must be
performed prior to assigning an address to an interface in order to
prevent multiple nodes from using the same address simultaneously.
If a node begins using an address in parallel with Duplicate Address
Detection, and another node is already using the address, the node
performing Duplicate Address Detection will erroneously process
traffic intended for the other node, resulting in such possible
negative consequences as the resetting of open TCP connections.
需要注意的是,必须在把地址绑定到接口之前进行重复地址检测。如果某个节点在进行重复地址检测的同时,使用
该地址,并且其他某个节点正在使用该地址,则进行重复地址检测的节点将会错误的向该节点发送数据。
The following subsections describe specific tests a node performs to
verify an address's uniqueness. An address is considered unique if
none of the tests indicate the presence of a duplicate address within
RetransTimer milliseconds after having sent DupAddrDetectTransmits
Neighbor Solicitations. Once an address is determined to be unique,
it may be assigned to an interface.
5.4.1. Message Validation
A node MUST silently discard any Neighbor Solicitation or
Advertisement message that does not pass the validity checks
specified in [DISCOVERY]. A solicitation that passes these validity
checks is called a valid solicitation or valid advertisement.
5.4.2. Sending Neighbor Solicitation Messages
Before sending a Neighbor Solicitation, an interface MUST join the
all-nodes multicast address and the solicited-node multicast address
of the tentative address. The former insures that the node receives
Neighbor Advertisements from other nodes already using the address;
the latter insures that two nodes attempting to use the same address
simultaneously detect each other's presence.
在节点发送NS之前,接口必须加入all-nodes多播组地址和solicited-node多播组。前一个保证节点能接收到已经使用某个
地址的节点发送来的NA,后一个保证两个都试图使用某个地址的节点都能检测到对方的存在。
To check an address, a node sends DupAddrDetectTransmits Neighbor
Solicitations, each separated by RetransTimer milliseconds. The
solicitation's Target Address is set to the address being checked,
Thomson & Narten Standards Track [Page 14]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
the IP source is set to the unspecified address and the IP
destination is set to the solicited-node multicast address of the
target address.
为了检测地址,节点发送DupAddrDetectTransmits个NS,每个NS的间隔时间为RetransTimer。NS的目标地址值为要检测的地址。
数据报的源IP地址设置为不确定地址(全0地址),目的IP地址设置为与被检测地址对应的请求组播地址。
If the Neighbor Solicitation is the first message to be sent from an
interface after interface (re)initialization, the node should delay
sending the message by a random delay between 0 and
MAX_RTR_SOLICITATION_DELAY as specified in [DISCOVERY]. This serves
to alleviate congestion when many nodes start up on the link at the
same time, such as after a power failure, and may help to avoid race
conditions when more than one node is trying to solicit for the same
address at the same time. In order to improve the robustness of the
Duplicate Address Detection algorithm, an interface MUST receive and
process datagrams sent to the all-nodes multicast address or
solicited-node multicast address of the tentative address while
delaying transmission of the initial Neighbor Solicitation.
如果NS是接口初始化后第一个要发送的信息,节点应该延迟一段随机时间发送该NS。延迟时间为0到MAX_RTR_SOLICITATION_DELAY
之间的随机值。这能减少链路上的冲突,比如在突然掉电后机器重启等。为了加强重复地址检测机制的健壮性,在发送初始化的NS
之前的延迟时间内,接口一定要配置成接收all-nodes多播数据报,或者与临时地址对应的请求多播数据报。
5.4.3. Receiving Neighbor Solicitation Messages
On receipt of a valid Neighbor Solicitation message on an interface,
node behavior depends on whether the target address is tentative or
not. If the target address is not tentative (i.e., it is assigned to
the receiving interface), the solicitation is processed as described
in [DISCOVERY]. If the target address is tentative, and the source
address is a unicast address, the solicitation's sender is performing
address resolution on the target; the solicitation should be silently
ignored. Otherwise, processing takes place as described below. In
all cases, a node MUST NOT respond to a Neighbor Solicitation for a
tentative address.
接口接收到一个有效的NS后,节点的处理取决于目标地址是否为临时地址。如果NS中的目标地址是临时地址,并且源IP地址是一个
单播地址,则NS的发送者在对目标地址进行地址解析,这个NS应该被丢弃。否则,将按以下规则处理(在所有情况下,节点都一定
不能回复一个携带临时地址的NS):
If the source address of the Neighbor Solicitation is the unspecified
address, the solicitation is from a node performing Duplicate Address
Detection. If the solicitation is from another node, the tentative
address is a duplicate and should not be used (by either node). If
the solicitation is from the node itself (because the node loops back
multicast packets), the solicitation does not indicate the presence
of a duplicate address.
如果NS的源IP地址是不确定地址(全0地址),这个NS是在进行重复地址检测。如果NS从另外一个节点发送,则这个临时地址重复,
不能被任何一个节点使用。如果NS是该节点本身发送(因为该节点允许loop-back),则该NS不能表明临时地址是否重复。
Implementor's Note: many interfaces provide a way for upper layers to
selectively enable and disable the looping back of multicast packets.
The details of how such a facility is implemented may prevent
Duplicate Address Detection from working correctly. See the Appendix
for further discussion.
实现者的话:许多接口提供了一种让上层协议来选择是允许还是禁止loop back多播数据报的机制。如何来配置该机制可能会影响
重复地址检测的正常工作,附录中有更深入的讨论。
The following tests identify conditions under which a tentative
address is not unique:
以下的测试确认了临时地址重复的几种情况:
Thomson & Narten Standards Track [Page 15]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
- If a Neighbor Solicitation for a tentative address is
received prior to having sent one, the tentative address is a
duplicate. This condition occurs when two nodes run Duplicate
Address Detection simultaneously, but transmit initial
solicitations at different times (e.g., by selecting different
random delay values before transmitting an initial
solicitation).
如果在发送NS之前,接收到了一个临时地址的NS,则该临时地址重复。这种情况发生在两个节点同时进行
重复地址检测的时候,但它们在不同的时间发送NS(延迟时间不同)。
- If the actual number of Neighbor Solicitations received exceeds
the number expected based on the loopback semantics (e.g., the
interface does not loopback packet, yet one or more
solicitations was received), the tentative address is a
duplicate. This condition occurs when two nodes run Duplicate
Address Detection simultaneously and transmit solicitations at
roughly the same time.
如果接收到的NS超过了基于是否允许loop back多播数据报机制的期望值的时候,临时地址重复。这种情况
发生在两个节点同时进行重复地址检测,并几乎同时发送NS。
5.4.4. Receiving Neighbor Advertisement Messages
On receipt of a valid Neighbor Advertisement message on an interface,
node behavior depends on whether the target address is tentative or
matches a unicast or anycast address assigned to the interface. If
the target address is assigned to the receiving interface, the
solicitation is processed as described in [DISCOVERY]. If the target
address is tentative, the tentative address is not unique.
在接口接收到一个有效的NA之后,节点的处理取决于NA中的目标地址是临时地址,或者是与该接口对应的单播或任意
播地址。如果目标地址是临时地址,则这个地址重复。
5.4.5. When Duplicate Address Detection Fails
A tentative address that is determined to be a duplicate as described
above, MUST NOT be assigned to an interface and the node SHOULD log a
system management error. If the address is a link-local address
formed from an interface identifier, the interface SHOULD be
disabled.
如果重复地址检测失败,而且该临时链路地址从接口标识符生成,则该接口应该被禁止。
5.5. Creation of Global and Site-Local Addresses
Global and site-local addresses are formed by appending an interface
identifier to a prefix of appropriate length. Prefixes are obtained
from Prefix Information options contained in Router Advertisements.
Creation of global and site-local addresses and configuration of
other parameters as described in this section SHOULD be locally
configurable. However, the processing described below MUST be enabled
by default.
以下所描述的一定要作为默认值。
5.5.1. Soliciting Router Advertisements
Router Advertisements are sent periodically to the all-nodes
multicast address. To obtain an advertisement quickly, a host sends
out Router Solicitations as described in [DISCOVERY].
Thomson & Narten Standards Track [Page 16]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
5.5.2. Absence of Router Advertisements
If a link has no routers, a host MUST attempt to use stateful
autoconfiguration to obtain addresses and other configuration
information. An implementation MAY provide a way to disable the
invocation of stateful autoconfiguration in this case, but the
default SHOULD be enabled. From the perspective of
autoconfiguration, a link has no routers if no Router Advertisements
are received after having sent a small number of Router Solicitations
as described in [DISCOVERY].
如果在链路中没有路由器,则主机一定要尝试使用有状态自动配置来获得地址和其他配置信息。
某种配置可能提供一种禁止调用有状态配置的功能,但是默认值应该被激活。在自动配置的观点看来,
如果在发送了多个RS后没有收到RA,就认为链路上没有路由器。
5.5.3. Router Advertisement Processing
On receipt of a valid Router Advertisement (as defined in
[DISCOVERY]), a host copies the value of the advertisement's M bit
into ManagedFlag. If the value of ManagedFlag changes from FALSE to
TRUE, and the host is not already running the stateful address
autoconfiguration protocol, the host should invoke the stateful
address autoconfiguration protocol, requesting both address
information and other information. If the value of the ManagedFlag
changes from TRUE to FALSE, the host should continue running the
stateful address autoconfiguration, i.e., the change in the value of
the ManagedFlag has no effect. If the value of the flag stays
unchanged, no special action takes place. In particular, a host MUST
NOT reinvoke stateful address configuration if it is already
participating in the stateful protocol as a result of an earlier
advertisement.
在接收到一个有效的RA后,主机把RA中的M标志复制到变量ManageFlag中。如果ManagedFlag从FALSE变为TRUE,
并且主机并没有开始进行有状态地址自动配置,则主机应该调用有状态自动配置,请求地址信息和其他信息(这
句话是不是表示如果RA的M标志为1,则其O标志默认也为1??)。
如果ManagedFlag由TRUE变为FALSE,则主机应该继续运行有状态自动配置,这种改变没有作用。
如果ManagedFlag的值不变,则没有什么特别的处理。特别地,主机一定不能在进行有状态自动配置的时候
重新调用有状态自动配置。
An advertisement's O flag field is processed in an analogous manner.
A host copies the value of the O flag into OtherConfigFlag. If the
value of OtherConfigFlag changes from FALSE to TRUE, the host should
invoke the stateful autoconfiguration protocol, requesting
information (excluding addresses if ManagedFlag is set to FALSE). If
the value of the OtherConfigFlag changes from TRUE to FALSE, the host
should continue running the stateful address autoconfiguration
protocol, i.e., the change in the value of OtherConfigFlag has no
effect. If the value of the flag stays unchanged, no special action
takes place. In particular, a host MUST NOT reinvoke stateful
configuration if it is already participating in the stateful protocol
as a result of an earlier advertisement.
主机把接收到的RA中的O标志的值复制到变量OtherConfigFlag中。如果该值由FALSE变为TRUE,则主机应该调用
有状态自动配置,请求除了地址之外的其他信息。如果值由TRUE变为FALSE,则主机应该继续运行有状态自动配置,
这种改变没有作用。如果该值没有变化,没有什么特别地处理。特别地,主机一定不能在进行有状态自动配置的时候
重新调用有状态自动配置。
For each Prefix-Information option in the Router Advertisement:
对于RA中的每一个前缀信息选项,处理规则如下:
a) If the Autonomous flag is not set, silently ignore the
Prefix Information option.
如果A标志没有设置,直接忽略这个选项。
Thomson & Narten Standards Track [Page 17]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
b) If the prefix is the link-local prefix, silently ignore the
Prefix Information option.
如果前缀为链路本地前缀,直接忽略选项。
c) If the preferred lifetime is greater than the valid lifetime,
silently ignore the Prefix Information option. A node MAY wish to
log a system management error in this case.
如果选项中的preferred lifetime 比valid lifetime大,忽略掉这个选项。节点可能希望
记录一个系统管理的错误。
d) If the prefix advertised does not match the prefix of an address
already in the list, and the Valid Lifetime is not 0, form an
address (and add it to the list) by combining the advertised
prefix with the link's interface identifier as follows:
如果RA中的前缀不与地址列表中前缀对应,并且选项中的valid lifetime不为0,则通过连接
宣告中的前缀和链路接口标识符来创建一个新的地址(并把它添加到列表中)。如下图所示:
| 128 - N bits | N bits |
+---------------------------------------+------------------------+
| link prefix | interface identifier |
+----------------------------------------------------------------+
If the sum of the prefix length and interface identifier length
does not equal 128 bits, the Prefix Information option MUST be
ignored. An implementation MAY wish to log a system management
error in this case. It is the responsibility of the system
administrator to insure that the lengths of prefixes contained in
Router Advertisements are consistent with the length of interface
identifiers for that link type. Note that interface identifiers
will typically be 64-bits long and based on EUI-64 identifiers as
described in [ADDR-ARCH].
如果前缀和接口标识符的长度和不等于128,则前缀信息选项一定要被忽略掉。某种配置可能
希望记录一个系统管理错误。系统管理员有责任保证RA中的前缀长度与该链路的接口标识符
保持一致性。注意:接口标识符一般都是64bits,基于EUI-64标识符。
If an address is formed successfully, the host adds it to the
list of addresses assigned to the interface, initializing its
preferred and valid lifetime values from the Prefix Information
option.
如果创建一个地址成功后,主机把它添加到与接口关联的地址列表中,按照RA的前缀选项中的
信息初始化它的preferred和valid lifetime。
e) If the advertised prefix matches the prefix of an autoconfigured
address (i.e., one obtained via stateless or stateful address
autoconfiguration) in the list of addresses associated with the
interface, the specific action to perform depends on the Valid
Lifetime in the received advertisement and the Lifetime
associated with the previously autoconfigured address (which we
call StoredLifetime in the discussion that follows):
如果宣告中的前缀能够与接口地址列表中的某一个自动配置的前缀对应,节点的处理取决于宣告
中的valid lifetime和之前已经配置的地址的lifetime(下面称为StoreLifetime):
1) If the received Lifetime is greater than 2 hours or greater
than StoredLifetime, update the stored Lifetime of the
corresponding address.
如果接收到的Lifetime大于2小时,或比StoreLifetime大,则更新StoreLifetime的值。
2) If the StoredLifetime is less than or equal to 2 hours and the
received Lifetime is less than or equal to StoredLifetime,
ignore the prefix, unless the Router Advertisement from which
Thomson & Narten Standards Track [Page 18]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
this Prefix Information option was obtained has been
authenticated (e.g., via IPSec [RFC2402]). If the Router
Advertisment was authenticated, the StoredLifetime should be
set to the Lifetime in the received option.
如果StoreLifetime不大于2小时,而且接收到的Lifetime不大于StoreLifetime,则忽略这个
前缀选项,除非该RA数据报有Authentication扩展头。
3) Otherwise, reset the stored Lifetime in the corresponding
address to two hours.
在其他情况下,将StoreLifetime修改为2小时。
The above rules address a specific denial of service attack in
which a bogus advertisement could contain prefixes with very
small Valid Lifetimes. Without the above rules, a single
unauthenticated advertisement containing bogus Prefix Information
options with short Lifetimes could cause all of a node's
addresses to expire prematurely. The above rules insure that
legitimate advertisements (which are sent periodically) will
"cancel" the short lifetimes before they actually take effect.
以上规则针对某种非法的携带非常小的Valid Lifetime前缀选项的RA所引起的拒绝服务攻击。没有以上规则,
一个没有认证头的包含非法前缀选项信息的RA可以导致所有节点地址都过早的失效。
5.5.4. Address Lifetime Expiry
A preferred address becomes deprecated when its preferred lifetime
expires. A deprecated address SHOULD continue to be used as a source
address in existing communications, but SHOULD NOT be used in new
communications if an alternate (non-deprecated) address is available
and has sufficient scope. IP and higher layers (e.g., TCP, UDP) MUST
continue to accept datagrams destined to a deprecated address since a
deprecated address is still a valid address for the interface. An
implementation MAY prevent any new communication from using a
deprecated address, but system management MUST have the ability to
disable such a facility, and the facility MUST be disabled by
default.
处于"preferred"的地址经过preferred lifetime 后,其状态变为"deprecated"。处于
"deprecated"的地址应该继续作为已有的通信的源地址,但如果已经有了一个替代的处于"preferred"的地址的时候,
应该在新的通信中使用这个新的的地址。IP层以及更高层(TCP或UDP)必须继续接收目的为"deprecated"地址的数据报,
只要这个"deprecated"地址还是一个有效地址。某种配置可能阻止所有新的通信使用"deprecated"地址,但是系统必须
有能力禁止这个功能,而且默认情况下,这个功能必须被禁止。
An address (and its association with an interface) becomes invalid
when its valid lifetime expires. An invalid address MUST NOT be used
as a source address in outgoing communications and MUST NOT be
recognized as a destination on a receiving interface.
当某个地址的valid lifetime失效的时候,这个地址也失效了。一个失效地址一定不能被任何通信作为源地址使用,也
一定不能作为任何一个数据报的目的地址。
5.6. Configuration Consistency
It is possible for hosts to obtain address information using both
stateless and stateful protocols since both may be enabled at the
same time. It is also possible that the values of other
configuration parameters such as MTU size and hop limit will be
learned from both Router Advertisements and the stateful
autoconfiguration protocol. If the same configuration information is
provided by multiple sources, the value of this information should be
consistent. However, it is not considered a fatal error if
information received from multiple sources is inconsistent. Hosts
accept the union of all information received via the stateless and
Thomson & Narten Standards Track [Page 19]
RFC 2462 IPv6 Stateless Address Autoconfiguration December 1998
stateful protocols. If inconsistent information is learned different
sources, the most recently obtained values always have precedence
over information learned earlier.
主机可以同时使用无状态和有状态地址配置来获得地址信息,也有可能同时通过这两种方式配置其他参数,比如MTU,hop limit等。
一般情况下,多种信息源提供的信息应该一致。但即便不一致,也不是致命的错误,主机按照最近接收到的信息来进行配置,也就是
最近收到的信息有更高的优先级。