IPv6 address format

Unlike IPv4, which uses a dotted-decimal format with each byte ranges from 0 to 255, IPv6 uses eight groups of four hexadecimal digits separated by colons. For example, this is a valid IPv6 address:

2340:0023:AABA:0A01:0055:5054:9ABC:ABB0

If you don’t know how to convert hexadecimal number to binary, here is a table that will help you do the conversion:

binary to hex

IPv6 address shortening

The IPv6 address given above looks daunting, right? Well, there are two conventions that can help you shorten what must be typed for an IP address:

1. a leading zero can be omitted

For example, the address listed above (2340:0023:AABA:0A01:0055:5054:9ABC:ABB0) can be shortened to 2340:23:AABA:A01:55:5054:9ABC:ABB0

2. successive fields of zeroes can be represented as two colons (::)

For example, 2340:0000:0000:0000:0455:0000:AAAB:1121 can be written as 2340::0455:0000:AAAB:1121

NOTE
You can shorten an address this way only for one such occurrence. The reason is obvious – if you had more than occurence of double colon you wouldn’t know how many sets of zeroes were being omitted from each part.

 

Here is a couple of more examples that can help you grasp the concept of IPv6 address shortening:

Long version: 1454:0045:0000:0000:4140:0141:0055:ABBB
Shortened version: 1454:45::4140:141:55:ABBB

Long version: 0000:0000:0001:AAAA:BBBC:A222:BBBA:0001
Shortened version: ::1:AAAA:BBBC:A222:BBBA:1

upravnik