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

📄 rfc3041.txt

📁 最新的RFC
💻 TXT
📖 第 1 页 / 共 3 页
字号:
   portion of an address over time and generate new addresses from the   interface identifier for some address scopes.  Changing the interface   identifier can make it more difficult to look at the IP addresses in   independent transactions and identify which ones actually correspond   to the same node, both in the case where the routing prefix portion   of an address changes and when it does not.   Many machines function as both clients and servers.  In such cases,   the machine would need a DNS name for its use as a server.  Whether   the address stays fixed or changes has little privacy implication   since the DNS name remains constant and serves as a constant   identifier.  When acting as a client (e.g., initiating   communication), however, such a machine may want to vary the   addresses it uses.  In such environments, one may need multiple   addresses: a "public" (i.e., non-secret) server address, registeredNarten & Draves             Standards Track                     [Page 6]RFC 3041      Extensions to IPv6 Address Autoconfiguration  January 2001   in the DNS, that is used to accept incoming connection requests from   other machines, and a "temporary" address used to shield the identity   of the client when it initiates communication.  These two cases are   roughly analogous to telephone numbers and caller ID, where a user   may list their telephone number in the public phone book, but disable   the display of its number via caller ID when initiating calls.   To make it difficult to make educated guesses as to whether two   different interface identifiers belong to the same node, the   algorithm for generating alternate identifiers must include input   that has an unpredictable component from the perspective of the   outside entities that are collecting information.  Picking   identifiers from a pseudo-random sequence suffices, so long as the   specific sequence cannot be determined by an outsider examining   information that is readily available or easily determinable (e.g.,   by examining packet contents).  This document proposes the generation   of a pseudo-random sequence of interface identifiers via an MD5 hash.   Periodically, the next interface identifier in the sequence is   generated, a new set of temporary addresses is created, and the   previous temporary addresses are deprecated to discourage their   further use.  The precise pseudo-random sequence depends on both a   random component and the globally unique interface identifier (when   available), to increase the likelihood that different nodes generate   different sequences.3.  Protocol Description   The goal of this section is to define procedures that:   1) Do not result in any changes to the basic behavior of addresses      generated via stateless address autoconfiguration [ADDRCONF].   2) Create additional global-scope addresses based on a random      interface identifier for use with global scope addresses.  Such      addresses would be used to initiate outgoing sessions.  These      "random" or temporary addresses would be used for a short period      of time (hours to days) and would then be deprecated.  Deprecated      address can continue to be used for already established      connections, but are not used to initiate new connections.  New      temporary addresses are generated periodically to replace      temporary addresses that expire, with the exact time between      address generation a matter of local policy.   3) Produce a sequence of temporary global-scope addresses from a      sequence of interface identifiers that appear to be random in the      sense that it is difficult for an outside observer to predict aNarten & Draves             Standards Track                     [Page 7]RFC 3041      Extensions to IPv6 Address Autoconfiguration  January 2001      future address (or identifier) based on a current one and it is      difficult to determine previous addresses (or identifiers) knowing      only the present one.   4) Generate a set of addresses from the same (randomized) interface      identifier, one address for each prefix for which a global address      has been generated via stateless address autoconfiguration.  Using      the same interface identifier to generate a set of temporary      addresses reduces the number of IP multicast groups a host must      join.  Nodes join the solicited-node multicast address for each      unicast address they support, and solicited-node addresses are      dependent only on the low-order bits of the corresponding address.      This decision was made to address the concern that a node that      joins a large number of multicast groups may be required to put      its interface into promiscuous mode, resulting in possible reduced      performance.3.1.  Assumptions   The following algorithm assumes that each interface maintains an   associated randomized interface identifier.  When temporary addresses   are generated, the current value of the associated randomized   interface identifier is used.  The actual value of the identifier   changes over time as described below, but the same identifier can be   used to generate more than one temporary address.   The algorithm also assumes that for a given temporary address, an   implementation can determine the corresponding public address from   which it was generated.  When a temporary address is deprecated, a   new temporary address is generated.  The specific valid and preferred   lifetimes for the new address are dependent on the corresponding   lifetime values in the public address.   Finally, this document assumes that when a node initiates outgoing   communication, temporary addresses can be given preference over   public addresses.  This can mean that all connections initiated by   the node use temporary addresses by default, or that applications   individually indicate whether they prefer to use temporary or public   addresses.  Giving preference to temporary address is consistent with   on-going work that addresses the topic of source-address selection in   the more general case [ADDR_SELECT].  An implementation may make it a   policy that it does not select a public address in the event that no   temporary address is available (e.g., if generation of a useable   temporary address fails).Narten & Draves             Standards Track                     [Page 8]RFC 3041      Extensions to IPv6 Address Autoconfiguration  January 20013.2.  Generation Of Randomized Interface Identifiers.   We describe two approaches for the maintenance of the randomized   interface identifier.  The first assumes the presence of stable   storage that can be used to record state history for use as input   into the next iteration of the algorithm across system restarts.  A   second approach addresses the case where stable storage is   unavailable and there is a need to generate randomized interface   identifiers without previous state.3.2.1.  When Stable Storage Is Present   The following algorithm assumes the presence of a 64-bit "history   value" that is used as input in generating a randomized interface   identifier.  The very first time the system boots (i.e., out-of-the-   box), a random value should be generated using techniques that help   ensure the initial value is hard to guess [RANDOM].  Whenever a new   interface identifier is generated, a value generated by the   computation is saved in the history value for the next iteration of   the algorithm.   A randomized interface identifier is created as follows:   1) Take the history value from the previous iteration of this      algorithm (or a random value if there is no previous value) and      append to it the interface identifier generated as described in      [ADDRARCH].   2) Compute the MD5 message digest [MD5] over the quantity created in      the previous step.   3) Take the left-most 64-bits of the MD5 digest and set bit 6 (the      left-most bit is numbered 0) to zero.  This creates an interface      identifier with the universal/local bit indicating local      significance only.  Save the generated identifier as the      associated randomized interface identifier.   4) Take the rightmost 64-bits of the MD5 digest computed in step 2)      and save them in stable storage as the history value to be used in      the next iteration of the algorithm.   MD5 was chosen for convenience, and because its particular properties   were adequate to produce the desired level of randomization.  IPv6   nodes are already required to implement MD5 as part of IPsec [IPSEC],   thus the code will already be present on IPv6 machines.   In theory, generating successive randomized interface identifiers   using a history scheme as above has no advantages over generating   them at random.  In practice, however, generating truly random   numbers can be tricky.  Use of a history value is intended to avoid   the particular scenario where two nodes generate the same randomizedNarten & Draves             Standards Track                     [Page 9]RFC 3041      Extensions to IPv6 Address Autoconfiguration  January 2001   interface identifier, both detect the situation via DAD, but then   proceed to generate identical randomized interface identifiers via   the same (flawed) random number generation algorithm.  The above   algorithm avoids this problem by having the interface identifier   (which will often be globally unique) used in the calculation that   generates subsequent randomized interface identifiers.  Thus, if two   nodes happen to generate the same randomized interface identifier,   they should generate different ones on the followup attempt.3.2.2.  In The Absence of Stable Storage   In the absence of stable storage, no history value will be available   across system restarts to generate a pseudo-random sequence of   interface identifiers.  Consequently, the initial history value used   above will need to be generated at random.  A number of techniques   might be appropriate.  Consult [RANDOM] for suggestions on good   sources for obtaining random numbers.  Note that even though machines   may not have stable storage for storing a history value, they will in   many cases have configuration information that differs from one   machine to another (e.g., user identity, security keys, serial   numbers, etc.).  One approach to generating a random initial history   value in such cases is to use the configuration information to   generate some data bits (which may remain constant for the life of   the machine, but will vary from one machine to another), append some   random data and compute the MD5 digest as before.3.3.  Generating Temporary Addresses   [ADDRCONF] describes the steps for generating a link-local address   when an interface becomes enabled as well as the steps for generating   addresses for other scopes.  This document extends [ADDRCONF] as   follows.  When processing a Router Advertisement with a Prefix   Information option carrying a global-scope prefix for the purposes of   address autoconfiguration (i.e., the A bit is set), perform the   following steps:   1) Process the Prefix Information Option as defined in [ADDRCONF],      either creating a public address or adjusting the lifetimes of      existing addresses, both public and temporary.  When adjusting the      lifetimes of an existing temporary address, only lower the      lifetimes.  Implementations must not increase the lifetimes of an      existing temporary address when processing a Prefix Information      Option.   2) When a new public address is created as described in [ADDRCONF]      (because the prefix advertised does not match the prefix of any      address already assigned to the interface, and the Valid Lifetime      in the option is not zero), also create a new temporary address.Narten & Draves             Standards Track                    [Page 10]RFC 3041      Extensions to IPv6 Address Autoconfiguration  January 2001   3) When creating a temporary address, the lifetime values are derived      from the corresponding public address as follows:      -  Its Valid Lifetime is the lower of the Valid Lifetime of the         public address or TEMP_VALID_LIFETIME.      -  Its Preferred Lifetime is the lower of the Preferred Lifetime         of the public address or TEMP_PREFERRED_LIFETIME -         DESYNC_FACTOR.      A temporary address is created only if this calculated Preferred      Lifetime is greater than REGEN_ADVANCE time units.  In particular,      an implementation must not create a temporary address with a zero      Preferred Lifetime.   4) New temporary addresses are created by appending the interface's      current randomized interface identifier to the prefix that was      used to generate the corresponding public address.  If by chance      the new temporary address is the same as an address already      assigned to the interface, generate a new randomized interface      identifier and repeat this step.   5) Perform duplicate address detection (DAD) on the generated      temporary address.  If DAD indicates the address is already in      use, generate a new randomized interface identifier as described      in Section 3.2 above, and repeat the previous steps as appropriate      up to 5 times.  If after 5 consecutive attempts no non-unique      address was generated, log a system error and give up attempting      to generate temporary addresses for that interface.      Note: because multiple temporary addresses are generated from the      same associated randomized interface identifier, there is little      benefit in running DAD on every temporary address.  This document      recommends that DAD be run on the first address generated from a      given randomized identifier, but that DAD be skipped on all      subsequent addresses generated from the same randomized interface      identifier.3.4.  Expiration of Temporary Addresses   When a temporary address becomes deprecated, a new one should be   generated.  This is done by repeating the actions described in   Section 3.3, starting at step 3).  Note that, except for the   transient period when a temporary address is being regenerated, in   normal operation at most one temporary address corresponding to a   public address should be in a non-deprecated state at any given time.   Note that if a temporary address becomes deprecated as result of   processing a Prefix Information Option with a zero Preferred   Lifetime, then a new temporary address must not be generated.  The   Prefix Information Option will also deprecate the corresponding   public address.Narten & Draves             Standards Track                    [Page 11]RFC 3041      Extensions to IPv6 Address Autoconfiguration  January 2001   To insure that a preferred temporary address is always available, a   new temporary address should be regenerated slightly before its   predecessor is deprecated.  This is to allow sufficient time to avoid   race conditions in the case where generating a new temporary address   is not instantaneous, such as when duplicate address detection must   be run.  It is recommended that an implementation start the address   regeneration process REGEN_ADVANCE time units before a temporary   address would actually be deprecated.   As an optional optimization, an implementation may wish to remove a   deprecated temporary address that is not in use by applications or   upper-layers.  For TCP connections, such information is available in   control blocks.  For UDP-based applications, it may be the case that   only the applications have knowledge about what addresses are   actually in use.  Consequently, one may need to use heuristics in   deciding when an address is no longer in use (e.g., the default

⌨️ 快捷键说明

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