Archive for the ‘IPv6’ Category

IPv6 Addressing Overview – Explained

Thursday, November 12th, 2009

IPv6 Addressing Overview.

Probably most of us have heard of IPv6 by now. And probably most if us know why IPv6 has come about. The continued growth of the internet or rather IP ready devices that, if needed, can connect to the internet has meant that the number of available standard IPv4 addresses is quickly running out. In fact today complex routing protocols are employed to keep the Internet working as a result.

There are a number of enhancements coming with IPv6. Perhaps the most obvious is the addressing standard, which has been changed dramatically in order to provide a vast number of IP addresses something in the order of 3×10 38 . This should see us all well into the future, even if every single device with electronics in has an IP address even your toaster.

Most of us recognise an IPv4 address, commonly written as dot separated decimal, for example 192.168.0.1. These addresses are 32 bits long or 4 octets (bytes). Consider for a moment that an IPv6 address is 128 bits, or 16 octets. Now imagine having to remember 192.168.1.25.17.133.145.28.201.1.99.18.6.4.33.129 as your station IP address, and now add to that a gateway address. It soon becomes obvious that you will need a lot of note paper and pens, not to mention the problems with typing errors.

With IPv6 the problem is simplified to some extent. Firstly instead of using decimal as we do today for IPv4 hexadecimal is used in the same way as MAC addresses. The second is to compress the address to remove some zeros. So an IPv6 address in long form could look like this 3ADF:1B4C:0000:0000:0000:0045:2CD2:EFA1. Now since a typical address like this might have a number of zeros this address can be displayed in short form notation, and becomes 3ADF:1B4C::45:2CD2:EFA1. Notice also that the address uses : rather than . as the separator.

The convention here is that leading zeros within the 4 digit groups can be dropped; you will notice that 0045 in the long address becomes simply 45 in the short version. Also a group of consecutive 16 bit numbers with the value of zero can be replaced with a double colon ::. It is only possible to replace one null string with the double colon, which can then be filled out to retrieve the long form address. If there are two null strings, only one can be compressed like this because if both were compressed it wouldn’t be possible to determine how long each one was so you’d end up with an ambiguous address.

Finally there is a slightly modified form of the IPv6 address for use when it’s desirable to express an IPv4 address in IPv6 format. To save having to convert constantly between base 10 and base 16 and to avoid conversion errors this convention uses the original dot separated decimal notation for the last 32 bits of the address, so the original IPv4 address of 192.168.0.1 in IPv6 long format would be 0000:0000:0000:0000:0000:0000:192.168.0.1 which compresses into the short form as ::192.168.0.1. Despite the fact that the address space in IPv6 has been quadrupled the old IP number can still be expressed unambiguously in the new format with only 2 additional characters.