IPv6 address format

An IPv6 address is 128 bits long, much larger than a 32-bit IPv4 address. Also, 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. Here is an example IPv6 address:

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

As you can see from the IPv6 address listed above, there are letters in the address. If you are not familiar with the hexadecimal – binary conversion, here is a table that will help you:

binary to hex table

IPv6 address shortening

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

1. a leading zero can be omitted

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

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

For example, the IPv6 address of 2340:0000:0000:0000:0455:0000:AAAB:1121 can be shorten as 2340::0455:0000:AAAB:1121

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 are a couple of more examples 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

Geek University 2022