How will IPv6 addresses be written?

John Savill

June 5, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Since IPv6 address's are 128-bit and hence four times longer thanan 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 4bits and so can be between 0 and F (F is 15 in hexadecimal) and so examples ofvalid 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 youmust have at least one numeral in each part. For example :0800: can be writtenas :800:.

Obviously you may have a large sequence of zero's in the address and so itis possible to have a single gap by writing :: which will fill the gap withzero'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 IPv4and 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-bitpieces of the address, and the 'd's are the decimal values of the fourlow-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 addressspecifying 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

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like