引言 本规范定义了IP版本6协议的寻址架构。它包括各种类型的IPv6地址(单播、任播和多播)的基本格式。

RFC 4291: IP Version 6 Addressing Architecture (rfc-editor.org)

RFC4291 中文翻译 中文RFC RFC文档 RFC翻译 RFC中文版 (rfc2cn.com)

IPv6 地址架构

本备忘录的状态

本文档为互联网社区指定了一个互联网标准路径协议,并请求对该协议的讨论和改进建议。请参阅“互联网官方协议标准”(STD 1)的当前版本,以了解该协议的标准状态和状况。本备忘录的分发不受限制。

版权声明

版权 © 互联网协会 (2006)。

摘要

本规范定义了 IP 版本 6 (IPv6) 协议的地址架构。文档包括 IPv6 地址模型、IPv6 地址的文本表示、IPv6 单播地址、任播地址以及多播地址的定义,还有 IPv6 节点所需地址。

本文档取代了 RFC 3513,“IP 版本 6 地址架构”。

 

  IP Version 6 Addressing Architecture

Status of This Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2006).

Abstract

   This specification defines the addressing architecture of the IP
   Version 6 (IPv6) protocol.  The document includes the IPv6 addressing
   model, text representations of IPv6 addresses, definition of IPv6
   unicast addresses, anycast addresses, and multicast addresses, and an
   IPv6 node's required addresses.

   This document obsoletes RFC 3513, "IP Version 6 Addressing
   Architecture".


 

目录

引言 ....................................................2
IPv6 寻址 .................................................2
2.1. 地址模型 ...........................................3
2.2. 地址的文本表示 ...............................4
2.3. 地址前缀的文本表示 ....................5
2.4. 地址类型识别 ................................6
2.5. 单播地址 ..........................................6
2.5.1. 接口标识符 ...............................7
2.5.2. 未指定地址 .............................9
2.5.3. 回环地址 ................................9
2.5.4. 全球单播地址 ............................9
2.5.5. 嵌入IPv4地址的IPv6地址 ........10
2.5.6. 链路本地IPv6单播地址 ..................11
2.5.7. 站点本地IPv6单播地址 ..................11
2.6. 任播地址 .........................................12
2.6.1. 必需的任播地址 ...........................12
2.7. 多播地址 .......................................13
2.7.1. 预定义的多播地址 ....................15
2.8. 节点所需地址 ...............................17
安全考虑 ........................................18
IANA 考虑事项 ............................................18
致谢 ...............................................18
参考资料 .....................................................18
6.1. 规范性引用文件 ......................................18
6.2. 资料性引用文件 ....................................18
附录 A: 创建修改后的EUI-64格式接口标识符 .20
附录 B: 与RFC 3513的不同之处 .................................22
引言 本规范定义了IP版本6协议的寻址架构。它包括各种类型的IPv6地址(单播、任播和多播)的基本格式。
IPv6 寻址 IPv6 地址是用于标识接口或一组接口的128位标识符(这里的“接口”如[IPV6]第2节中所定义)。地址有三种类型: 单播:单一接口的标识符。发送到单播地址的数据包会被递送到该地址标识的接口。

Table of Contents

   1. Introduction ....................................................2
   2. IPv6 Addressing .................................................2
      2.1. Addressing Model ...........................................3
      2.2. Text Representation of Addresses ...........................4
      2.3. Text Representation of Address Prefixes ....................5
      2.4. Address Type Identification ................................6
      2.5. Unicast Addresses ..........................................6
           2.5.1. Interface Identifiers ...............................7
           2.5.2. The Unspecified Address .............................9
           2.5.3. The Loopback Address ................................9
           2.5.4. Global Unicast Addresses ............................9
           2.5.5. IPv6 Addresses with Embedded IPv4 Addresses ........10
           2.5.6. Link-Local IPv6 Unicast Addresses ..................11
           2.5.7. Site-Local IPv6 Unicast Addresses ..................11
      2.6. Anycast Addresses .........................................12
           2.6.1. Required Anycast Address ...........................12
      2.7. Multicast Addresses .......................................13
           2.7.1. Pre-Defined Multicast Addresses ....................15
      2.8. A Node's Required Addresses ...............................17
   3. Security Considerations ........................................18
   4. IANA Considerations ............................................18
   5. Acknowledgements ...............................................18
   6. References .....................................................18
      6.1. Normative References ......................................18
      6.2. Informative References ....................................18
   Appendix A: Creating Modified EUI-64 Format Interface Identifiers .20
   Appendix B: Changes from RFC 3513 .................................22

1.  Introduction

   This specification defines the addressing architecture of the IP
   Version 6 protocol.  It includes the basic formats for the various
   types of IPv6 addresses (unicast, anycast, and multicast).

2.  IPv6 Addressing

   IPv6 addresses are 128-bit identifiers for interfaces and sets of
   interfaces (where "interface" is as defined in Section 2 of [IPV6]).
   There are three types of addresses:

    Unicast:   An identifier for a single interface.  A packet sent to a
               unicast address is delivered to the interface identified
               by that address.


 

任播:一组接口的标识符(通常属于不同的节点)。发送到任播地址的数据包会被递送到由该地址标识的一个接口(根据路由协议的距离度量标准,通常是“最近”的一个)。

多播:一组接口的标识符(通常属于不同的节点)。发送到多播地址的数据包会被递送到所有由该地址标识的接口。

IPv6 中没有广播地址,其功能已被多播地址所取代。

在本文档中,地址中的字段被赋予了特定名称,例如,“子网”。当这个名称与“ID”(标识符)一起使用时(如“子网ID”),指的是命名字段的内容。当它与“前缀”一词一起使用时(如“子网前缀”),指的是从左边开始直到并包括该字段的所有地址部分。

在 IPv6 中,除非特别排除,否则所有零和全一都是任何字段的合法值。特别是,前缀可以包含或以零值字段结尾。

2.1 地址模型

所有类型的 IPv6 地址都被分配给接口而不是节点。IPv6 单播地址指向单个接口。由于每个接口都属于单一节点,因此该节点的任意一个接口的单播地址都可以用作该节点的标识符。

所有接口都需要至少有一个链路本地单播地址(参见第 2.8 节了解其他必需的地址)。单个接口也可以有多个类型(单播、任播和多播)或范围的 IPv6 地址。对于不作为非邻居之间的任何 IPv6 数据包的源或目的地的接口来说,不需要具有大于链路范围的单播地址。这对于点对点接口有时是方便的。此寻址模型有一个例外:

  • 如果实现将多个物理接口呈现给网络层时视为一个接口,则可以为这些物理接口分配一个单播地址或一组单播地址。这有助于在多个物理接口之间进行负载均衡。
   Anycast:   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 protocols' measure of distance).

    Multicast: 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.

   There are no broadcast addresses in IPv6, their function being
   superseded by multicast addresses.

   In this document, fields in addresses are given a specific name, for
   example, "subnet".  When this name is used with the term "ID" for
   identifier after the name (e.g., "subnet ID"), it refers to the
   contents of the named field.  When it is used with the term "prefix"
   (e.g., "subnet prefix"), it refers to all of the address from the
   left up to and including this field.

   In IPv6, all zeros and all ones are legal values for any field,
   unless specifically excluded.  Specifically, prefixes may contain, or
   end with, zero-valued fields.

2.1.  Addressing Model

   IPv6 addresses of all types are assigned to interfaces, not nodes.
   An IPv6 unicast address refers to a single interface.  Since each
   interface belongs to a single node, any of that node's interfaces'
   unicast addresses may be used as an identifier for the node.

   All interfaces are required to have at least one Link-Local unicast
   address (see Section 2.8 for additional required addresses).  A
   single interface may also have multiple IPv6 addresses of any type
   (unicast, anycast, and multicast) or scope.  Unicast addresses with a
   scope greater than link-scope are not needed for interfaces that are
   not used as the origin or destination of any IPv6 packets to or from
   non-neighbors.  This is sometimes convenient for point-to-point
   interfaces.  There is one exception to this addressing model:

      A unicast address or a set of unicast addresses may be assigned to
      multiple physical interfaces if the implementation treats the
      multiple physical interfaces as one interface when presenting it
      to the internet layer.  This is useful for load-sharing over
      multiple physical interfaces.

目前,IPv6 继续沿用了 IPv4 的模型,即一个子网前缀与一条链路相关联。可以将多个子网前缀分配给同一条链路。

2.2 地址的文本表示

IPv6 地址作为文本字符串有三种常用的表示形式:

  1. 首选的形式是 x❌x❌x❌x:x,其中 'x' 是地址八个 16 位段中的一到四个十六进制数字。示例: 

     
      ABCD:EF01:2345:6789:ABCD:EF01:2345:6789
    
      2001:DB8:0:0:8:800:200C:417A

    注意,在单个字段中不必写出前导零,但每个字段中必须至少有一个数字(除了第 2 点所述的情况)。

  2. 由于某些分配特定样式 IPv6 地址的方法,地址中常会包含长串的零比特。为了简化含有零比特地址的书写,有一种特殊的语法可以用来压缩这些零。使用“::”表示一组或多组 16 位的零。“::”在地址中只能出现一次。此外,“::”也可以用来压缩地址开头或结尾的零。

     

    例如,以下地址 

     
      2001:DB8:0:0:8:800:200C:417A   单播地址
      FF01:0:0:0:0:0:0:101           多播地址
      0:0:0:0:0:0:0:1                回环地址
      0:0:0:0:0:0:0:0                未指定地址

    可以表示为 

     
      2001:DB8::8:800:200C:417A      单播地址
      FF01::101                      多播地址
      ::1                            回环地址
      ::                             未指定地址
  3. 在处理 IPv4 和 IPv6 节点混合环境时,有时更方便的另一种形式是 x❌x❌x❌d.d.d.d,其中 'x' 是地址六个高位 16 位段的十六进制值,而 'd' 是 IPv4 地址部分的十进制表示。这种形式允许在 IPv6 地址中嵌入 IPv4 地址,用于过渡期间的技术实现。

 
 
 
 
 
 
 
 
 

 Currently, IPv6 continues the IPv4 model in that a subnet prefix is
   associated with one link.  Multiple subnet prefixes may be assigned
   to the same link.

2.2.  Text Representation of Addresses

   There are three conventional forms for representing IPv6 addresses as
   text strings:

   1. The preferred form is x:x:x:x:x:x:x:x, where the 'x's are one to
      four hexadecimal digits of the eight 16-bit pieces of the address.
      Examples:

         ABCD:EF01:2345:6789:ABCD:EF01:2345:6789

         2001:DB8:0:0:8:800:200C:417A

      Note that it is not necessary to write the leading zeros in an
      individual field, but there must be at least one numeral in every
      field (except for the case described in 2.).

   2. Due to some methods of allocating certain styles of IPv6
      addresses, it will be common for addresses to contain long strings
      of zero bits.  In order to make writing addresses containing zero
      bits easier, a special syntax is available to compress the zeros.
      The use of "::" indicates one or more groups of 16 bits of zeros.
      The "::" can only appear once in an address.  The "::" can also be
      used to compress leading or trailing zeros in an address.

      For example, the following addresses

         2001:DB8:0:0:8:800:200C:417A   a unicast address
         FF01:0:0:0:0:0:0:101           a multicast address
         0:0:0:0:0:0:0:1                the loopback address
         0:0:0:0:0:0:0:0                the unspecified address

      may be represented as

         2001:DB8::8:800:200C:417A      a unicast address
         FF01::101                      a multicast address
         ::1                            the loopback address
         ::                             the unspecified address

   3. An alternative form that is sometimes more convenient when dealing
      with a mixed environment of IPv4 and IPv6 nodes is
      x:x:x:x:x:x:d.d.d.d, where the 'x's are the hexadecimal values of
      the six high-order 16-bit pieces of the address, and the 'd's are

 

地址中四个低位 8 位段的十进制值(标准 IPv4 表示法)。示例: 

 
     0:0:0:0:0:0:13.1.68.3

     0:0:0:0:0:FFFF:129.144.52.38

或者用压缩形式表示为: 

 
     ::13.1.68.3

     ::FFFF:129.144.52.38

2.3 地址前缀的文本表示

IPv6 地址前缀的文本表示类似于无类别域间路由 (CIDR) 记法 [CIDR] 中 IPv4 地址前缀的书写方式。一个 IPv6 地址前缀用以下记法表示: 

 
  ipv6-address/prefix-length

其中 

 
  ipv6-address    是第 2.2 节列出的任何一种表示法中的 IPv6 地址。

  prefix-length   是一个十进制值,指明地址最左边连续多少比特构成了前缀。

例如,以下是 60 位前缀 20010DB80000CD3(十六进制)的有效表示: 

 
  2001:0DB8:0000:CD30:0000:0000:0000:0000/60
  2001:0DB8::CD30:0:0:0:0/60
  2001:0DB8:0:CD30::/60

以下不是上述前缀的有效表示: 

 
  2001:0DB8:0:CD3/60   可以省略任一 16 位块内的前导零,但不能省略后导零

  2001:0DB8::CD30/60   斜杠左侧的地址展开为 2001:0DB8:0000:0000:0000:0000:0000:CD30

  2001:0DB8::CD3/60    斜杠左侧的地址展开为 2001:0DB8:0000:0000:0000:0000:0000:0CD3

  the decimal values of the four low-order 8-bit pieces of the
      address (standard IPv4 representation).  Examples:

         0:0:0:0:0:0:13.1.68.3

         0:0:0:0:0:FFFF:129.144.52.38

      or in compressed form:

         ::13.1.68.3

         ::FFFF:129.144.52.38

2.3.  Text Representation of Address Prefixes

   The text representation of IPv6 address prefixes is similar to the
   way IPv4 address prefixes are written in Classless Inter-Domain
   Routing (CIDR) notation [CIDR].  An IPv6 address prefix is
   represented by the notation:

      ipv6-address/prefix-length

   where

      ipv6-address    is an IPv6 address in any of the notations listed
                      in Section 2.2.

      prefix-length   is a decimal value specifying how many of the
                      leftmost contiguous bits of the address comprise
                      the prefix.

   For example, the following are legal representations of the 60-bit
   prefix 20010DB80000CD3 (hexadecimal):

      2001:0DB8:0000:CD30:0000:0000:0000:0000/60
      2001:0DB8::CD30:0:0:0:0/60
      2001:0DB8:0:CD30::/60

   The following are NOT legal representations of the above prefix:

      2001:0DB8:0:CD3/60   may drop leading zeros, but not trailing
                           zeros, within any 16-bit chunk of the address

      2001:0DB8::CD30/60   address to left of "/" expands to
                           2001:0DB8:0000:0000:0000:0000:0000:CD30

      2001:0DB8::CD3/60    address to left of "/" expands to
                           2001:0DB8:0000:0000:0000:0000:0000:0CD3

 

当同时写一个节点地址及其前缀(例如,该节点的子网前缀)时,可以将两者结合如下: 

 
  节点地址      2001:0DB8:0:CD30:123:4567:89AB:CDEF
  及其子网号    2001:0DB8:0:CD30::/60

  可以缩写为 2001:0DB8:0:CD30:123:4567:89AB:CDEF/60

2.4 地址类型识别

IPv6 地址的类型由地址的高位比特来确定,具体如下: 

 
  地址类型         二进制前缀        IPv6 表示法   章节
  ------------     -------------     -------------   -------
  未指定           00...0 (128位)    ::/128          2.5.2
  回环             00...1 (128位)    ::1/128         2.5.3
  多播             11111111          FF00::/8        2.7
  链路本地单播     1111111010        FE80::/10       2.5.6
  全球单播         (其他所有)

任播地址是从单播地址空间(任何范围)中选取的,在语法上与单播地址无法区分。

全球单播地址的一般格式在第 2.5.4 节中描述。一些用于 IPv4-IPv6 互操作目的的嵌入了 IPv4 地址的特殊用途的全球单播子类型在第 2.5.5 节中描述。

未来规范可能会重新定义全球单播地址空间中的一个或多个子范围以供其他用途使用,但在这种情况发生之前,实现必须将所有不以以上列出的前缀开头的地址视为全球单播地址。

2.5 单播地址

IPv6 单播地址具有可聚合性,可以有任意长度的前缀,类似于无类别域间路由下的 IPv4 地址。

IPv6 中存在几种类型的单播地址,特别是全球单播、站点本地单播(已废弃,请参见第 2.5.7 节)、链路本地单播。还有一些特殊的全球单播子类型,如嵌入了 IPv4 地址的 IPv6 地址。将来还可以定义更多的地址类型或子类型。

   When writing both a node address and a prefix of that node address
   (e.g., the node's subnet prefix), the two can be combined as follows:

      the node address      2001:0DB8:0:CD30:123:4567:89AB:CDEF
      and its subnet number 2001:0DB8:0:CD30::/60

      can be abbreviated as 2001:0DB8:0:CD30:123:4567:89AB:CDEF/60

2.4.  Address Type Identification

   The type of an IPv6 address is identified by the high-order bits of
   the address, as follows:

      Address type         Binary prefix        IPv6 notation   Section
      ------------         -------------        -------------   -------
      Unspecified          00...0  (128 bits)   ::/128          2.5.2
      Loopback             00...1  (128 bits)   ::1/128         2.5.3
      Multicast            11111111             FF00::/8        2.7
      Link-Local unicast   1111111010           FE80::/10       2.5.6
      Global Unicast       (everything else)

   Anycast addresses are taken from the unicast address spaces (of any
   scope) and are not syntactically distinguishable from unicast
   addresses.

   The general format of Global Unicast addresses is described in
   Section 2.5.4.  Some special-purpose subtypes of Global Unicast
   addresses that contain embedded IPv4 addresses (for the purposes of
   IPv4-IPv6 interoperation) are described in Section 2.5.5.

   Future specifications may redefine one or more sub-ranges of the
   Global Unicast space for other purposes, but unless and until that
   happens, implementations must treat all addresses that do not start
   with any of the above-listed prefixes as Global Unicast addresses.

2.5.  Unicast Addresses

   IPv6 unicast addresses are aggregatable with prefixes of arbitrary
   bit-length, similar to IPv4 addresses under Classless Inter-Domain
   Routing.

   There are several types of unicast addresses in IPv6, in particular,
   Global Unicast, site-local unicast (deprecated, see Section 2.5.7),
   and Link-Local unicast.  There are also some special-purpose subtypes
   of Global Unicast, such as IPv6 addresses with embedded IPv4
   addresses.  Additional address types or subtypes can be defined in
   the future.

 

IPv6 节点可能对其 IPv6 地址的内部结构有相当多的了解,也可能了解得很少,这取决于节点所扮演的角色(例如,主机与路由器)。最起码,一个节点可以认为单播地址(包括它自己的)没有内部结构:

|                           128 位                              |
+-----------------------------------------------------------------+
|                          节点地址                             |
+-----------------------------------------------------------------+

稍微复杂一点的主机(但仍然相对简单)可能会额外意识到其连接到的链路的子网前缀,不同的地址可能有不同的 n 值:

|          n 位               |           128-n 位            |
+-------------------------------+---------------------------------+
|       子网前缀              |           接口标识符          |
+-------------------------------+---------------------------------+

尽管非常简单的路由器可能对 IPv6 单播地址的内部结构一无所知,但路由器通常会知道用于路由协议操作的一个或多个层次边界。已知的边界将根据路由器在路由层次中所处的位置而有所不同。

除了上文讨论的子网边界的认知外,节点不应对接口标识符以外的 IPv6 地址结构做出任何假设。

2.5.1 接口标识符

IPv6 单播地址中的接口标识符用于识别链路上的接口。它们必须在子网前缀内是唯一的。建议不要在同一链路上的不同节点之间分配相同的接口标识符。在某些情况下,它们也可能在一个更广泛的范围内唯一。在某些情况下,接口的标识符将直接从该接口的链路层地址派生而来。只要这些接口连接到不同的子网,在同一节点上的多个接口可以使用相同的接口标识符。

需要注意的是,接口标识符的唯一性独立于 IPv6 地址的唯一性。例如,可以用本地范围的接口标识符创建一个全球单播地址,也可以用全局范围的接口标识符创建一个链路本地地址。

 IPv6 nodes may have considerable or little knowledge of the internal
   structure of the IPv6 address, depending on the role the node plays
   (for instance, host versus router).  At a minimum, a node may
   consider that unicast addresses (including its own) have no internal
   structure:

   |                           128 bits                              |
   +-----------------------------------------------------------------+
   |                          node address                           |
   +-----------------------------------------------------------------+

   A slightly sophisticated host (but still rather simple) may
   additionally be aware of subnet prefix(es) for the link(s) it is
   attached to, where different addresses may have different values for
   n:

   |          n bits               |           128-n bits            |
   +-------------------------------+---------------------------------+
   |       subnet prefix           |           interface ID          |
   +-------------------------------+---------------------------------+

   Though a very simple router may have no knowledge of the internal
   structure of IPv6 unicast addresses, routers will more generally have
   knowledge of one or more of the hierarchical boundaries for the
   operation of routing protocols.  The known boundaries will differ
   from router to router, depending on what positions the router holds
   in the routing hierarchy.

   Except for the knowledge of the subnet boundary discussed in the
   previous paragraphs, nodes should not make any assumptions about the
   structure of an IPv6 address.

2.5.1.  Interface Identifiers

   Interface identifiers in IPv6 unicast addresses are used to identify
   interfaces on a link.  They are required to be unique within a subnet
   prefix.  It is recommended that the same interface identifier not be
   assigned to different nodes on a link.  They may also be unique over
   a broader scope.  In some cases, an interface's identifier will be
   derived directly from that interface's link-layer address.  The same
   interface identifier may be used on multiple interfaces on a single
   node, as long as they are attached to different subnets.

   Note that the uniqueness of interface identifiers is independent of
   the uniqueness of IPv6 addresses.  For example, a Global Unicast
   address may be created with a local scope interface identifier and a
   Link-Local address may be created with a universal scope interface
   identifier.

 

对于所有单播地址,除了以二进制值 000 开头的地址外,接口标识符需要是 64 位长,并且必须按照修改后的 EUI-64 格式构建。

基于修改后的 EUI-64 格式的接口标识符可以具有全局范围,当它们从全局令牌(例如 IEEE 802 的 48 位 MAC 地址或 IEEE EUI-64 标识符 [EUI64])派生时;或者在没有全局令牌可用时(例如串行链路、隧道端点),或当全局令牌不受欢迎时(例如出于隐私考虑的临时令牌 [PRIV]),可以具有本地范围。

当从 IEEE EUI-64 标识符形成接口标识符时,修改后的 EUI-64 格式接口标识符通过反转 "u" 位(在 IEEE EUI-64 术语中为全局/本地位)来形成。在结果得到的修改后的 EUI-64 格式中,"u" 位设置为 1 表示全局范围,设置为 0 表示本地范围。IEEE EUI-64 标识符的前三个八位组的二进制形式如下: 

 
      0       0 0       1 1       2
     |0       7 8       5 6       3|
     +----+----+----+----+----+----+
     |cccc|ccug|cccc|cccc|cccc|cccc|
     +----+----+----+----+----+----+

以互联网标准比特顺序书写,其中 "u" 是全局/本地位,"g" 是个体/组位,"c" 是公司 ID 的比特。附录 A,“创建修改后的 EUI-64 格式接口标识符”,提供了关于创建基于修改后的 EUI-64 格式的接口标识符的例子。

反转 "u" 位来形成接口标识符的动机是为了在硬件令牌不可用时,让系统管理员能够轻松地手动配置非全局标识符。例如,这预计会在串行链路和隧道端点的情况下出现。另一种选择将是使用如 0200:0:0:1, 0200:0:0:2 等形式,而不是更简单的 0:0:0:1, 0:0:0:2 等形式。

IPv6 节点不需要验证使用设置了全局 "u" 位的修改后 EUI-64 令牌创建的接口标识符是否唯一。

在修改后的 EUI-64 格式标识符中使用全局/本地位是为了允许未来技术的发展,这些技术可以利用具有全局范围的接口标识符。


   For all unicast addresses, except those that start with the binary
   value 000, Interface IDs are required to be 64 bits long and to be
   constructed in Modified EUI-64 format.

   Modified EUI-64 format-based interface identifiers may have universal
   scope when derived from a universal token (e.g., IEEE 802 48-bit MAC
   or IEEE EUI-64 identifiers [EUI64]) or may have local scope where a
   global token is not available (e.g., serial links, tunnel end-points)
   or where global tokens are undesirable (e.g., temporary tokens for
   privacy [PRIV]).

   Modified EUI-64 format interface identifiers are formed by inverting
   the "u" bit (universal/local bit in IEEE EUI-64 terminology) when
   forming the interface identifier from IEEE EUI-64 identifiers.  In
   the resulting Modified EUI-64 format, the "u" bit is set to one (1)
   to indicate universal scope, and it is set to zero (0) to indicate
   local scope.  The first three octets in binary of an IEEE EUI-64
   identifier are as follows:

          0       0 0       1 1       2
         |0       7 8       5 6       3|
         +----+----+----+----+----+----+
         |cccc|ccug|cccc|cccc|cccc|cccc|
         +----+----+----+----+----+----+

   written in Internet standard bit-order, where "u" is the
   universal/local bit, "g" is the individual/group bit, and "c" is the
   bits of the company_id.  Appendix A, "Creating Modified EUI-64 Format
   Interface Identifiers", provides examples on the creation of Modified
   EUI-64 format-based interface identifiers.

   The motivation for inverting the "u" bit when forming an interface
   identifier is to make it easy for system administrators to hand
   configure non-global identifiers when hardware tokens are not
   available.  This is expected to be the case for serial links and
   tunnel end-points, for example.  The alternative would have been for
   these to be of the form 0200:0:0:1, 0200:0:0:2, etc., instead of the
   much simpler 0:0:0:1, 0:0:0:2, etc.

   IPv6 nodes are not required to validate that interface identifiers
   created with modified EUI-64 tokens with the "u" bit set to universal
   are unique.

   The use of the universal/local bit in the Modified EUI-64 format
   identifier is to allow development of future technology that can take
   advantage of interface identifiers with universal scope.

 

形成接口标识符的细节在相应的“IPv6 over <链路>”规范中定义,例如“IPv6 over 以太网”[ETHER] 和“IPv6 over FDDI”[FDDI]。

2.5.2 未指定地址

地址 0:0:0:0:0:0:0:0 被称为未指定地址。它绝不能被分配给任何节点。它表示地址的缺失。一个使用示例是在初始化主机在其学习到自己的地址之前发送的任何 IPv6 数据包的源地址字段中。

未指定地址不得用作 IPv6 数据包的目的地址或在 IPv6 路由头中使用。源地址为未指定地址的 IPv6 数据包绝不应该被 IPv6 路由器转发。

2.5.3 回环地址

单播地址 0:0:0:0:0:0:0:1 被称为回环地址。节点可以使用它来向自己发送 IPv6 数据包。它不应被分配给任何物理接口。它被视为具有链路本地范围,并且可以被认为是通往无处可达的虚拟链路上的虚拟接口(通常称为“回环接口”)的链路本地单播地址。

回环地址不得用作向外发送的 IPv6 数据包的源地址。目的地址为回环地址的 IPv6 数据包绝不能发送到单一节点之外,也不应被 IPv6 路由器转发。在接口上接收到的目的地址为回环地址的数据包必须被丢弃。

2.5.4 全球单播地址

IPv6 全球单播地址的一般格式如下:

|         n 位          |   m 位   |       128-n-m 位         |
+-----------------------+----------+-------------------------+
| 全球路由前缀        | 子网 ID  |       接口标识符        |
+-----------------------+----------+-------------------------+

其中全球路由前缀是分配给站点(一组子网/链路)的(通常是分层结构的)值,子网 ID 是站点内链路的标识符,而接口标识符如第 2.5.1 节所定义。

 The details of forming interface identifiers are defined in the
   appropriate "IPv6 over <link>" specification, such as "IPv6 over
   Ethernet" [ETHER], and "IPv6 over FDDI" [FDDI].

2.5.2.  The Unspecified Address

   The address 0:0:0:0:0:0:0:0 is called the unspecified address.  It
   must never be assigned to any node.  It indicates the absence of an
   address.  One example of its use is in the Source Address field of
   any IPv6 packets sent by an initializing host before it has learned
   its own address.

   The unspecified address must not be used as the destination address
   of IPv6 packets or in IPv6 Routing headers.  An IPv6 packet with a
   source address of unspecified must never be forwarded by an IPv6
   router.

2.5.3.  The Loopback Address

   The unicast address 0:0:0:0:0:0:0:1 is called the loopback address.
   It may be used by a node to send an IPv6 packet to itself.  It must
   not be assigned to any physical interface.  It is treated as having
   Link-Local scope, and may be thought of as the Link-Local unicast
   address of a virtual interface (typically called the "loopback
   interface") to an imaginary link that goes nowhere.

   The loopback address must not be used as the source address in IPv6
   packets that are sent outside of a single node.  An IPv6 packet with
   a destination address of loopback must never be sent outside of a
   single node and must never be forwarded by an IPv6 router.  A packet
   received on an interface with a destination address of loopback must
   be dropped.

2.5.4.  Global Unicast Addresses

   The general format for IPv6 Global Unicast addresses is as follows:

   |         n bits         |   m bits  |       128-n-m bits         |
   +------------------------+-----------+----------------------------+
   | global routing prefix  | subnet ID |       interface ID         |
   +------------------------+-----------+----------------------------+

   where the global routing prefix is a (typically hierarchically-
   structured) value assigned to a site (a cluster of subnets/links),
   the subnet ID is an identifier of a link within the site, and the
   interface ID is as defined in Section 2.5.1.

 

除了以二进制 000 开头的地址外,所有全球单播地址都有一个 64 位的接口标识符字段(即 n + m = 64),其格式如第 2.5.1 节所述。以二进制 000 开头的全球单播地址对于接口标识符字段的大小或结构没有这样的限制。

以二进制 000 开头的全球单播地址的例子包括在第 2.5.5 节中描述的嵌入了 IPv4 地址的 IPv6 地址。从非 000 二进制值开始的全球地址(因此具有 64 位接口标识符字段)的一个例子可以在 [GLOBAL] 中找到。

2.5.5 嵌入了 IPv4 地址的 IPv6 地址

定义了两种类型的 IPv6 地址,它们在地址的低 32 位中携带了一个 IPv4 地址。这些是“IPv4 兼容的 IPv6 地址”和“IPv4 映射的 IPv6 地址”。

2.5.5.1 IPv4 兼容的 IPv6 地址

“IPv4 兼容的 IPv6 地址”是为了协助 IPv6 过渡而定义的。“IPv4 兼容的 IPv6 地址”的格式如下:

|                80 位               | 16 |      32 位        |
+------------------------------------+-------------------+
|0000..............................0000|0000|    IPv4 地址     |
+------------------------------------+----+------------------+

注意:在“IPv4 兼容的 IPv6 地址”中使用的 IPv4 地址必须是一个全局唯一的 IPv4 单播地址。

“IPv4 兼容的 IPv6 地址”现已弃用,因为当前的 IPv6 过渡机制不再使用这些地址。新实现或更新的实现不需要支持这种地址类型。

2.5.5.2 IPv4 映射的 IPv6 地址

定义了另一种包含嵌入 IPv4 地址的 IPv6 地址类型。这种地址类型用于将 IPv4 节点的地址表示为 IPv6 地址。“IPv4 映射的 IPv6 地址”的格式如下:

 All Global Unicast addresses other than those that start with binary
   000 have a 64-bit interface ID field (i.e., n + m = 64), formatted as
   described in Section 2.5.1.  Global Unicast addresses that start with
   binary 000 have no such constraint on the size or structure of the
   interface ID field.

   Examples of Global Unicast addresses that start with binary 000 are
   the IPv6 address with embedded IPv4 addresses described in Section
   2.5.5.  An example of global addresses starting with a binary value
   other than 000 (and therefore having a 64-bit interface ID field) can
   be found in [GLOBAL].

2.5.5.  IPv6 Addresses with Embedded IPv4 Addresses

   Two types of IPv6 addresses are defined that carry an IPv4 address in
   the low-order 32 bits of the address.  These are the "IPv4-Compatible
   IPv6 address" and the "IPv4-mapped IPv6 address".

2.5.5.1.  IPv4-Compatible IPv6 Address

   The "IPv4-Compatible IPv6 address" was defined to assist in the IPv6
   transition.  The format of the "IPv4-Compatible IPv6 address" is as
   follows:

   |                80 bits               | 16 |      32 bits        |
   +--------------------------------------+--------------------------+
   |0000..............................0000|0000|    IPv4 address     |
   +--------------------------------------+----+---------------------+

   Note: The IPv4 address used in the "IPv4-Compatible IPv6 address"
   must be a globally-unique IPv4 unicast address.

   The "IPv4-Compatible IPv6 address" is now deprecated because the
   current IPv6 transition mechanisms no longer use these addresses.
   New or updated implementations are not required to support this
   address type.

2.5.5.2.  IPv4-Mapped IPv6 Address

   A second type of IPv6 address that holds an embedded IPv4 address is
   defined.  This address type is used to represent the addresses of
   IPv4 nodes as IPv6 addresses.  The format of the "IPv4-mapped IPv6
   address" is as follows:

 

posted @ 2024-09-30 20:51  suv789  阅读(142)  评论(0编辑  收藏  举报