IPv6 Addressing

One problem that IPv6 solves is the limited number of addresses available in IPv4. IPv6 uses a 128-bit address space, which has no practical limit on global addressability and provides 340 282 366 920 938 463 463 374 607 431 768 211 456 addresses. Currently, this is enough addresses so that every person can have a single IPv6 network with as many as 18 000 000 000 000 000 000 nodes on it, and still the address space would be almost completely unused.

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

  • 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.
    FE80:0000:0000:0000:0001:0800:23e7:f5db 
    
    1080:0:0:0:8:800:200C:417A

    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 the following bullet).

  • 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 multiple groups of 16 bits of zeros. The :: can only appear once in an address. The :: can also be used to compress both leading and trailing zeros in an address.
    The following is a preferred form address:
    1080:0: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            
    The corresponding compressed forms are:
    1080::8:800:200C:417A 
    FF01::101             
    ::1                   
    ::                    
  • 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 6 high-order 16-bit pieces of the address, and the d's are the decimal values of the 4 low-order 8-bit pieces of the address (standard IPv4 representation) This form is used for IPv4-compatible IPv6 addresses and IPv4-mapped IPv6 addresses. These types of addresses are used to hold embedded IPv4 addresses in order to carry IPv6 packets over the IPv4 routing infrastructure.
    0:0:0:0:0:0:13.1.68.3
    0:0:0:0:0:FFFF:129.144.52.38
    The same addresses in compressed form are:
    ::13.1.68.3         
    ::FFFF:129.144.52.38

    As important as the expanded address space is the use of hierarchical address formats. The IPv4 addressing hierarchy includes network and host components in an IPv4 address. IPv6, with its 128-bit addresses, provides globally unique and hierarchical addressing based on prefixes rather than address classes, which keeps routing tables small and backbone routing efficient.

    The general format is as follows:

    Table 1. IPv6 Address Format
    global routing prefix subnet ID interface ID
    n bits m bits 128-(n+m) bits

    The global routing prefix is a value (typically hierarchically structured) assigned to a site; the subnet ID is an identifier of a link within the site; and the interface ID is a unique identifier for a network device on a given link (usually automatically assigned).

    For more information on IPv6 addresses, prefixes and routing refer to the z/VM: TCP/IP User's Guide.