What You Need To Know About IPv6 Address
Internet Protocol Version 6 (IPv6) is the latest way to provide unique addressing to systems within a network. IPv6 is slowing replacing IPv4 IP addresses. (Note, there is no IPv5). The main reason that IPv4 needs to be replaced is the huge amount of devices which connect to the Internet cannot be handled by the current amount of IPv4 address space. IPv6 has a huge amount of address space and will be able to handle growth in the amount of devices connected to the Internet for a long, long time.
IPv6 provides more possible unique addresses, but that is not the only benefit of IPv6 over IPv4. There are things that IPv6 does better than IPv4.
The numbers we normally use go fro 0-9. This is a base-10 decimal system which can represent ten different amounts per digit. A hexadecimal system is base-16 and can represent up to 16 different values in a single digit. Due to convention, we use letters once we run out of numbers to represent these digits.
So in hexadecimal form, digits are represented from 0-9 in the same way as our normal base-10 system. However, we can also represent 10-15 using a single digit. Mathematicians could have made up some new symbols to represent these values, but instead the chose to use letters. So the letter 'A' represents the number 10, 'B' the number 11, etc.
In hexadecimal, we have the digits 0-F representing the values 0-15. It's just a way to write the same numbers using a single character instead of having two characters for numbers between 10 and 15.
Letters in IPv6
IPv6 addresses are huge. Because of their large size, they are written in hexadecimal digits. This is why IPv6 addresses have letters in them. The letters represent a number.
You will only see the letters A-F in IPv6 addresses. If you ever see a letter such as 'G' or 'M' then you know that this is not a valid IPv6 address.
Full IPv6 Addresses
IPv6 addresses are usually shortened. There are rules for shortening addresses which we will cover later. A fully written our IPv6 address will be composed of eight four digit sections. Each section will be separated by a colon ':'. Each of these eight sections contains a single four digit hexadecimal number. This totals to 128 bits of data per IPv6 address.
An example of a fully written out IPv6 address is:
Eight sections, each containing a four digit hexadecimal number, separated by colons. The letter digits (A-F) can be lowercase or capitalized.
Shorter IPv6 Addresses
A full IPv6 address is cumbersome to read and write. Luckily there are some standard ways in which IPv6 addresses can be shortened. Shortening an address makes it more readable and makes transcribing the address less error-prone. One should always shorten addresses when possible.
Drop Leading Zeros
If a section of an IPv6 address begins with a zero, or multiple zeros you can drop the lead zeros.
The above address can be changed into:
Note that you cannot drop ending zeros. Only the first set of zeros in each section of the address can be dropped.
Combine Multiple Zero Sections
An address may have multiple sections that contain nothing but zeros. In the example above the second and third to last section contain only zeros. These can be combined and represented with a double colon:
The double colon in an IPv6 address represents a set of zeros. Everything between those colons is zeros.
You can do this for a lot of zeros. Say you have the IP address:
You can shorten this to:
That's a lot cleaner. Note that you can only have one set of double colons in an IPv6 address. If you had two or more, you would not know how many sets of zeros are between each double colon. So the following address:
can only be shortened to:
Many of the IPv6 addresses you encounter in the real world will have sets of zeros in them.
IPv6 has two types of unicast addresses. A unicast address is an identifier for a single location on a network. A packet with a destination unicast address will end up going to a single, specific locatin. There are other types of addresses that have multiple end locations.
A link local unicast address always begins with FE80. A link-local address is automatically configured and are used to communicate within a broadcast segment. These types of addresses do not go through layer-3 devices such as routers. A link-local address is used to communicate in a local network only.
A global unicast is the IPv6 equivalent of a regular, publicly routable IPv4 address. There are IP addresses that are unique to the global Internet and has a single destination. Packets destined for these addresses can travel through many networks.
Anycast and Multicast
IPv6 also has anycast and multicast IP addresses. A multicast address will always start with FF0x where x is a digit between 1 and 8.
An anycast IP is assigned to many different devices and a packet with an anycast destination will be sent to the closest device with that IP address. This is useful for things like DNS servers or cloud servers. If all the DNS servers of a network share a single IP address, then the packets sent to the DNS servers will automatically go to the closest DNs server.
Multicast is also an IP address that is set on multiple devices. However, packets sent to a multicast address will travel to ALL the devices with that multicase address.
In IPv6 there is no such thing as a broadcast address.
IPv4's loopback address is 127.0.0.1. the equivalent IPv6 address is ::1. Note the double colon, this means that everything before the 1 is a zero.
No Subnet Masks
IPv4 configurations include having to worry about the size of a subnet mask. With IPv6 the subnet mask is built into the IPv6 address. In an IPv6 address, the first 48 bits are the network prefix. The next 16 bits are the subnet ID. The last 64 bits are the device interface identifier.
The 16 bits in the middle are used in a similar way that a subnet mask is used in IPv4.
IPv6 Size Range
IPv4 addresses had a subnet size of up to a /32, which was a single IP address. Because IPv6 is 128 bits long, those addresses can be subnetted down to a /128, which is a single IPv6 address.
It is common for organizations to use a whole /64 to organize their network. some ISPs will also allocate a /48 and break that down into /64s for their users. A larger ISP can be allocated a /32 or even larger.
Some useful IPv6 links include: