Writing IPv6 addresses (explained)

An IPv6 address is usually written as eight blocks of four hexadecimal digits, with each block separated by a colon.

Example: 2001:0B80:0000:0000:0000:0F80:3FA8:18AB

You may shorten addresses by eliminating leading zeros in a block. Also, note that some of the four-digit blocks may consist of zeros only. If any number of such 0000 blocks are consecutive, you may shorten addresses by replacing the 0000 blocks with two colons as long as there is only one such double colon in the address.

Example:
2001:0B80:0000:0000:0000:0F80:3FA8:18AB can be shortened to

2001:B80:0000:0000:0000:F80:3FA8:18AB if removing the leading zeros, or to

2001:0B80::0F80:3FA8:18AB if removing the 0000 blocks, or even to

2001:B80::F80:3FA8:18AB if removing the leading zeros as well as the 0000 blocks.

Using IPv6 Addresses in URLs

IPv6 addresses contain colons. Colons, however, are also used in other types of network addressing syntax. For example, IPv4 uses a colon to separate IP address and port number when both are used in a URL. IPv6 has inherited this principle. Therefore, to avoid confusion, square brackets are put around IPv6 addresses when they are used in URLs.

Example of a URL with an IPv6 address:
http:// [2001:0B80:0000:0000:0000:0F80:3FA8:18AB], which may of course be shortened to, for example, http:// [2001:B80::F80:3FA8:18AB]

Example of a URL with an IPv6 address and a port number:
http:// [2001:0B80:0000:0000:0000:0F80:3FA8:18AB]:1234, which may of course be shortened to, for example, http:// [2001:B80::F80:3FA8:18AB]:1234

For more information about IPv6, see, for example, the IANA website. IANA, the Internet Assigned Numbers Authority, is the organization responsible for the global coordination of IP addressing.

© 2018 Milestone Systems A/S