Skip navigation

How will IPv6 addresses be written?

A. Since IPv6 address's are 128-bit and hence four times longer than an IPv4 address, addresses are expressed as:

X:X:X:X:X:X:X:X

where each X is a 4-digit hexadecimal integer (16 bits) and each digit is 4 bits and so can be between 0 and F (F is 15 in hexadecimal) and so examples of valid addresses would be

FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
1080:0:0:0:8:800:200C:417A

Notice in the second address you can leave off any leading zeros, but you must have at least one numeral in each part. For example :0800: can be written as :800:.

Obviously you may have a large sequence of zero's in the address and so it is possible to have a single gap by writing :: which will fill the gap with zero's, for example

1080:0:0:0:8:800:200C:417A

may be written as

1080::8:800:200C:417A

0:0:0:0:0:0:0:1 the loopback address (the same as 127.0.0.1 in IPv4) can be written as ::1.

A third format is available, 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

The subnet mask is now replaced by a number appended to the network address specifying the number of bits making up the network part (CIDR notation), e.g. ipv6-address/prefix-length:

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

Means the first 60 bits make up the network part of the address.

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 11AC:0:0:CA20:123:4567:89AB:CDEF
and its subnet number 11AC:0:0:CA20::/60

can be abbreviated as 11AC:0:0:CA20:123:4567:89AB:CDEF/60


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish