Got it

IPv6 Address structure

Latest reply: Dec 27, 2018 06:47:37 1240 6 7 0 0

Hello, 

As is well known, IPV6 addresses are 128-bit identifiers for interfaces or collections of interfaces, in this post, we'll introduce you the basic structure of IPv6 address.


There are three types of addresses:

Unicast : Identifier for an interface.A packet sent to a unicast address is sent to the interface determined by that address.

Anycast :  Identfication of a set of interface .A packet sent to an anycast address is sent to one of the set interfaces identified for that address.

Multast:    Identfication of a set of interface.A packet destined for a multicast address is sent to all interfaces identified by that address.


In IPv6, there is no broadcast address, and the function of broadcast address is replaced by the ability of multicast address.


Address model :

All types of IPv6 addresses are assigned to interfaces, not to nodes. An IPv6 unicast address is associated with a single interface. Since each interface belongs to only one node, the unicast address of any node can be used as the identification of the node


All interfaces are required to have at least one link-local unicast address A single interface may also have multiple IPv6 addresses of any type (unicast, anycast, and multicast) or scope.  Unicast addresses with 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:


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


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 the hexadecimal values of the eight 16-bit pieces of the address.


Examples:


FEDC:BA98:7654:3210:FEDC:BA98:7654:3210


1080:0: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 .


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:


1080:0: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 addresses


may be represented as:


1080::8:800:200C:417A       a unicast address

FF01::101                   a multicast address

::1                         the loopback address

::                          the unspecified addresses


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 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


Text Representation of Address Prefixes The text representation of IPv6 address prefixes is similar to the   way IPv4 addresses prefixes are written in 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 12AB00000000CD3 (hexadecimal):


12AB:0000:0000:CD30:0000:0000:0000:0000/60

12AB::CD30:0:0:0:0/60

12AB:0:0:CD30::/60


The following are NOT legal representations of the above prefix:


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


12AB::CD30/60     address to left of "/" expands to12AB:0000:0000:0000:0000:000:0000:CD30


12AB::CD3/60      address to left of "/" expands to 12AB:0000:0000:0000:0000:000:0000:0CD3


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


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


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


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

   Site-local unicast   1111111011           FEC0::/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 which 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.


Unicast Addresses


IPv6 unicast addresses are aggregable with prefixes of arbitrary bit-length similar to IPv4 addresses under Classless Interdomain Routing.


There are several types of unicast addresses in IPv6, in particular global unicast, site-local unicast, and link-local unicast.  There are also some special-purpose subtypes of global unicast, such as

IPv6 addresses with embedded IPv4 addresses or encoded NSAP addresses.  Additional address types or subtypes can be defined in the future


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.


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 non-global scope interface identifier and a site-local address may be created with a global scope interface identifier.


For all unicast addresses, except those that start with 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 global scope when derived from a global 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, etc.) 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 global 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" are 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 case for serial links, tunnel end-points, etc.  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 1, 2,

etc.


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 global scope


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


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


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 may never 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 destination address of loopback must be dropped.


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         |

   +------------------------+-----------+----------------------------+


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.


IPv6 Addresses with Embedded IPv4 Addresses


The IPv6 transition mechanisms [TRAN] include a technique for hosts and routers to dynamically tunnel IPv6 packets over IPv4 routing infrastructure.  IPv6 nodes that use this technique are assigned special IPv6 unicast addresses that carry a global IPv4 address in the low-order 32 bits.  This type of address is termed an "IPv4-compatible IPv6 address" and has the format:



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


A second type of IPv6 address which holds an embedded IPv4 address is also defined.  This address type is used to represent the addresses of IPv4 nodes as IPv6 addresses.  This type of address is termed an "IPv4-mapped IPv6 address" and has the format:


   |                80 bits               | 16 |      32 bits        |

   +--------------------------------------+--------------------------+

   |0000..............................0000|FFFF|    IPv4 address     |

   +--------------------------------------+----+---------------------+


There are two types of local-use unicast addresses defined.  These are Link-Local and Site-Local.  The Link-Local is for use on a single link and the Site-Local is for use in a single site.  Link-Local

addresses have the following format:


   |   10     |

   |  bits    |         54 bits         |          64 bits           |

   +----------+-------------------------+----------------------------+

   |1111111010|           0             |       interface ID         |

   +----------+-------------------------+----------------------------+


Link-Local addresses are designed to be used for addressing on a single link for purposes such as automatic address configuration, neighbor discovery, or when no routers are present.


Routers must not forward any packets with link-local source or destination addresses to other links.


Site-Local addresses have the following format:


   |   10     |

   |  bits    |         54 bits         |         64 bits            |

   +----------+-------------------------+----------------------------+

   |1111111011|        subnet ID        |       interface ID         |

   +----------+-------------------------+----------------------------+


Site-local addresses are designed to be used for addressing inside of a site without the need for a global prefix.  Although a subnet ID may be up to 54-bits long, it is expected that globally-connected sites will use the same subnet IDs for site-local and global prefixes.


Routers must not forward any packets with site-local source or destination addresses outside of the site.


Anycast Addresses


An IPv6 anycast address is an address that is assigned to more than one interface (typically belonging to different nodes), with the property that a packet sent to an anycast address is routed to the"nearest" interface having that address, according to the routing protocols' measure of distance.


Anycast addresses are allocated from the unicast address space, using any of the defined unicast address formats.  Thus, anycast addresses are syntactically indistinguishable from unicast addresses.  When a unicast address is assigned to more than one interface, thus turning it into an anycast address, the nodes to which the address is assigned must be explicitly configured to know that it is an anycast address.


For any assigned anycast address, there is a longest prefix P of that address that identifies the topological region in which all interfaces belonging to that anycast address reside.  Within the

region identified by P, the anycast address must be maintained as a separate entry in the routing system (commonly referred to as a "host route"); outside the region identified by P, the anycast address may be aggregated into the routing entry for prefix P.


Note that in the worst case, the prefix P of an anycast set may be the null prefix, i.e., the members of the set may have no topological locality.  In that case, the anycast address must be maintained as a

separate routing entry throughout the entire internet, which presents a severe scaling limit on how many such "global" anycast sets may be supported.  Therefore, it is expected that support for global anycast sets may be unavailable or very restricted.


One expected use of anycast addresses is to identify the set of routers belonging to an organization providing internet service. Such addresses could be used as intermediate addresses in an IPv6 Routing header, to cause a packet to be delivered via a particular service provider or sequence of service providers.


Some other possible uses are to identify the set of routers attached to a particular subnet, or the set of routers providing entry into a particular routing domain


There is little experience with widespread, arbitrary use of internet anycast addresses, and some known complications and hazards when using them in their full generality [ANYCST].  Until more experience has been gained and solutions are specified, the following restrictions are imposed on IPv6 anycast addresses:


An anycast address must not be used as the source address of an IPv6 packet.


An anycast address must not be assigned to an IPv6 host, that is, it may be assigned to an IPv6 router only


Required Anycast Address


The Subnet-Router anycast address is predefined.  Its format is as follows:


   |                         n bits                 |   128-n bits   |

   +------------------------------------------------+----------------+

   |                   subnet prefix                | 00000000000000 |

   +------------------------------------------------+----------------+


The "subnet prefix" in an anycast address is the prefix which identifies a specific link.  This anycast address is syntactically the same as a unicast address for an interface on the link with the

interface identifier set to zero.


Packets sent to the Subnet-Router anycast address will be delivered to one router on the subnet.  All routers are required to support the Subnet-Router anycast addresses for the subnets to which they have interfaces.


The subnet-router anycast address is intended to be used for applications where a node needs to communicate with any one of the set of routers.


Multicast Addresses


An IPv6 multicast address is an identifier for a group of interfaces (typically on different nodes).  An interface may belong to any number of multicast groups.  Multicast addresses have the following

format:


   |   8    |  4 |  4 |                  112 bits                   |

   +------ -+----+----+---------------------------------------------+

   |11111111|***s|scop|                  group ID                   |

   +--------+----+----+---------------------------------------------+


binary 11111111 at the start of the address identifies the address as being a multicast address.


                                       +-+-+-+-+

  ***s is a set of 4 flags:     |0|0|0|T|

                                       +-+-+-+-+


The high-order 3 flags are reserved, and must be initialized to 0.


T = 0 indicates a permanently-assigned ("well-known") multicast address, assigned by the Internet Assigned Number Authority (IANA).


T = 1 indicates a non-permanently-assigned ("transient") multicast address.


scop is a 4-bit multicast scope value used to limit the scope of the multicast group.  The values are:


            0  reserved

            1  interface-local scope

            2  link-local scope

            3  reserved

            4  admin-local scope

            5  site-local scope

            6  (unassigned)

            7  (unassigned)

            8  organization-local scope

            9  (unassigned)

            A  (unassigned)

            B  (unassigned)

            C  (unassigned)

            D  (unassigned)

            E  global scope

            F  reserved


interface-local scope spans only a single interface on a node, and is useful only for loopback transmission of multicast.


link-local and site-local multicast scopes span the same topological regions as the corresponding unicast scopes.


admin-local scope is the smallest scope that must be administratively configured, i.e., not automatically derived from physical connectivity or other, non- multicast-related configuration


organization-local scope is intended to span multiple sites belonging to a single organization.


scopes labeled "(unassigned)" are available foradministrators to define additional multicast regions.


group ID identifies the multicast group, either permanent or transient, within the given scope.


 The "meaning" of a permanently-assigned multicast address is independent of the scope value.  For example, if the "NTP servers group" is assigned a permanent multicast address with a group ID of

101 (hex), then:


FF01:0:0:0:0:0:0:101 means all NTP servers on the same interface

(i.e., the same node) as the sender.


FF02:0:0:0:0:0:0:101 means all NTP servers on the same link as the

sender.


FF05:0:0:0:0:0:0:101 means all NTP servers in the same site as the

sender.


FF0E:0:0:0:0:0:0:101 means all NTP servers in the internet.


Non-permanently-assigned multicast addresses are meaningful only within a given scope.  For example, a group identified by the non-permanent, site-local multicast address FF15:0:0:0:0:0:0:101 at one site bears no relationship to a group using the same address at a different site, nor to a non-permanent group using the same group ID with different scope, nor to a permanent group with the same group ID.


Multicast addresses must not be used as source addresses in IPv6 packets or appear in any Routing header.


Routers must not forward any multicast packets beyond of the scope indicated by the scop field in the destination multicast address


Nodes must not originate a packet to a multicast address whose scop field contains the reserved value 0; if such a packet is received, it must be silently dropped.  Nodes should not originate a packet to a multicast address whose scop field contains the reserved value F; if such a packet is sent or received, it must be treated the same as packets destined to a global (scop E) multicast address.


Pre-Defined Multicast Addresses


The following well-known multicast addresses are pre-defined.  The group ID's defined in this section are defined for explicit scope values.


Use of these group IDs for any other scope values, with the T flag equal to 0, is not allowed.

Reserved Multicast Addresses:   FF00:0:0:0:0:0:0:0

                                      FF01:0:0:0:0:0:0:0

                                      FF02:0:0:0:0:0:0:0

                                      FF03:0:0:0:0:0:0:0

                                      FF04:0:0:0:0:0:0:0

                                      FF05:0:0:0:0:0:0:0

                                      FF06:0:0:0:0:0:0:0

                                      FF07:0:0:0:0:0:0:0

                                      FF08:0:0:0:0:0:0:0

                                      FF09:0:0:0:0:0:0:0

                                      FF0A:0:0:0:0:0:0:0

                                      FF0B:0:0:0:0:0:0:0

                                      FF0C:0:0:0:0:0:0:0

                                      FF0D:0:0:0:0:0:0:0

                                      FF0E:0:0:0:0:0:0:0

                                      FF0F:0:0:0:0:0:0:0

The above multicast addresses are reserved and shall never be assigned to any multicast group.


All Nodes Addresses:    FF01:0:0:0:0:0:0:1

                                      FF02:0:0:0:0:0:0:1


The above multicast addresses identify the group of all IPv6 nodes,within scope 1 (interface-local) or 2 (link-local).


All Routers Addresses:   FF01:0:0:0:0:0:0:2

                                       FF02:0:0:0:0:0:0:2

                                       FF05:0:0:0:0:0:0:2



 The above multicast addresses identify the group of all IPv6 routers, within scope 1 (interface-local), 2 (link-local), or 5 (site-local).


     Solicited-Node Address:  FF02:0:0:0:0:1:FFXX:XXXX



Solicited-node multicast address are computed as a function of a node's unicast and anycast addresses.  A solicited-node multicast address is formed by taking the low-order 24 bits of an address (unicast or anycast) and appending those bits to the prefix FF02:0:0:0:0:1:FF00::/104 resulting in a multicast address in the range



      FF02:0:0:0:0:1:FF00:0000


   to


      FF02:0:0:0:0:1:FFFF:FFFF



For example, the solicited node multicast address corresponding to the IPv6 address 4037::01:800:200E:8C6C is FF02::1:FF0E:8C6C.  IPv6 addresses that differ only in the high-order bits, e.g., due to multiple high-order prefixes associated with different aggregations,will map to the same solicited-node address thereby, reducing the number of multicast addresses a node must join.


A node is required to compute and join (on the appropriate interface) the associated Solicited-Node multicast addresses for every unicast and anycast address it is assigned.


A Node's Required Addresses


A host is required to recognize the following addresses as identifying itself:

      o  Its required Link-Local Address for each interface.

      o  Any additional Unicast and Anycast Addresses that have been

         configured for the node's interfaces (manually or

         automatically).

      o  The loopback address.

      o  The All-Nodes Multicast Addresses defined in section 2.7.1.

      o  The Solicited-Node Multicast Address for each of its unicast

         and anycast addresses.

      o  Multicast Addresses of all other groups to which the node

         belongs.

A router is required to recognize all addresses that a host is required to recognize, plus the following addresses as identifying

   itself:


      o  The Subnet-Router Anycast Addresses for all interfaces for

         which it is configured to act as a router.

      o  All other Anycast Addresses with which the router has been

         configured.

      o  The All-Routers Multicast Addresses defined in section 2.7.1.


Security Considerations


IPv6 addressing documents do not have any direct impact on Internet infrastructure security.  Authentication of IPv6 packets is defined  in [AUTH].


Refer to RFC

https://tools.ietf.org/html/rfc3513



That's all for this post, if you have any questions, please comment below.

Thanks.



  • x
  • convention:

Mysterious.color
Created Dec 5, 2018 08:20:55

it's very useful
thanks
View more
  • x
  • convention:

liwaye
liwaye Created Dec 7, 2018 09:06:03 (0) (0)
thanks too dear  
EdeninRealMadrid
Created Dec 12, 2018 17:16:04

No information
View more
  • x
  • convention:

Hawasli
Created Dec 15, 2018 15:12:13

Nice
View more
  • x
  • convention:

4am
Created Dec 22, 2018 00:52:17

IPv6 is always used and may be in use.
View more
  • x
  • convention:

dagui
Created Dec 27, 2018 06:47:37

A node is required to compute and join (on the appropriate interface) the associated Solicited-Node multicast addresses for every unicast and anycast address it is assigned.Can you provide a more detailed explanation?
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.