First off I want to thank Keith Barker for teaching IPv6. You’ve been instrumental in helping me understand IPv6 and how it’s similar and different from IPv4. This post was written as a journey of me going over the class information.
What is an IPv6 Address?
Keith talks about IPv6 and how it is similar to house addresses. The two main parts of an address are:
- Street Name – Represents the Network address in IPv6. The network Address is called the “Network Prefix” and tells us about the network groupings of computers.
- House Address – Represents a single device in IPv6. It is called the “Interface Identifier”.
What does an IPv6 Address look like?
A IPv6 address has several qualities:
- IPv6 address are 128bits in length.
- A mask is essentially the dividing line between the network address called the “Network Prefix” and the host address called the “Interface Identifier”.
- A Mask of /64 following the address will mean that the Network Address is 64bit and the Host Address is 64bits.
- Most addresses will have a mask of /64
- Each IPv6 address scan be broken down into 8 groups of 16bits each.
- Each group is separated by semi-colons.
- Every 4bits can be converted into a single Hex character. People some times call 4bits a nibble since it’s half of a byte.
- All leading Zeros can be dropped from the group. More on this near the end of the post.
- 2 or more groups of consecutive zeros can be merged by putting a :: and then a zero. This can only be done once. More on this near the end of the post.
Before looking at what an IPv6 address normally looks like… it is a good idea to look at what the address looks like in binary:
*Note* – There is no spaces and the address should be all on one line. Due to the size of the address had to fit it on two lines.
How to convert from Binary to Hex.
It’s probably best that you first start off by looking at this Hex Cheat Sheet.
After looking at the Hex cheat sheet you are probably starting to understand why I said in the previous section 4bits can be converted into a Hex character. Using the cheat sheet let’s convert the binary address into the Hexadecimal address that we’ll actually work with on routers and devices.
I’ll break the process up over each 16bits.
Let’s work on the Network Prefix:
- 0010 0000 0000 0001 – This equals “2001” in hex.
- 0000 1101 1011 1000 – This equals “0DB8” in hex.
- 0000 0000 0010 0001 – This equals “0021” in hex.
- 0000 0001 0001 0001 – This equals “0111” in hex.
We now know the network prefix is: “2001:0DB8:0021:0111”
Let’s work on the Interface Identifier:
- 0010 0000 1000 0001 – This equals “2081” in hex.
- 0000 1101 1010 1000 – This equals “0DA8” in hex.
- 0000 1000 0010 0001 – This equals “0821” in hex.
- 0000 0001 0101 0001 – This equals “0151” in hex.
This is how the Full IP address will look like in Hex:
Ok. Now that you’ve seen what an IPv6 address looks like… check out the IPv6 cheat sheet:
Let’s take a look at what IPv6 will look like on Cisco IOS. This is the output from setting up an IPv6. Notice the leading zeros had been removed.
You might be wondering 6 things about the line that says: FE80::2D0:BCFF:FE20:7802
- What is this called? This is a IPv6 Link Local Address
- How was it entered? – The router “auto-magically” created this address.
- What is the “::” mean? – This means that several groups of zeros have been shrunk down to shorten the address.
- Why do some of the groups only have less than 4 characters. – This means that there were leading zeros and were dropped.
- Is there something special about “FE80”? – Yes. This means this address is a link local address.
- How did the Interface Identifier get created? – It was created using the MAC address of the device it was assigned to.
I hope I’ve wet your appetite enough to want to learn All About IPv6 Link Local Addresses