TechKnowSurge
Cisco CCNA 1.9 Cisco CCST Networking 2.3 CompTIA Network+ 3.4 Cisco CCNA 1.8
VideoNetworkFree

IPv6 Address Format

IPv6 uses 128-bit addresses divided into eight 16-bit segments called hextets, represented in hexadecimal and separated by colons. This content covers IPv6 address structure, prefix length and subnetting, and shorthand notation rules for simplifying these addresses.

Complete this video to capture a CTF flag worth 1 point.

About this video

IPv6 addresses are 128 bits in length, a dramatic increase over the 32-bit space of IPv4, and that expanded size translates into an enormous number of available addresses — 2 to the 128th power. The 128 bits are divided into eight sections called hextets, each 16 bits wide and represented in hexadecimal notation. Hexadecimal uses the digits 0 through 9 and the letters A through F to represent values 0 through 15, with each hexadecimal character accounting for four bits. The eight hextets are separated by colons, and alphabetic characters are officially written in lowercase, though uppercase is widely accepted on networking equipment. Rather than using a subnet mask as IPv4 does, IPv6 relies on prefix length notation borrowed from CIDR. A slash followed by a number — such as /16, /32, /48, or /64 — indicates how many of the 128 bits are assigned to the network portion of the address, with the remaining bits identifying the interface. The /64 prefix is the most common standard for typical networks, splitting the address evenly between the network and interface sides. Subnetting within IPv6 often takes place within a single hextet, which on its own provides up to 65,536 possible subnet values. Because full 128-bit addresses written out in hexadecimal are long and unwieldy, two shorthand rules exist to reduce their length. First, leading zeros within any individual hextet can be omitted, so a hextet written as 0078 becomes simply 78, and a hextet of all zeros becomes a single 0. Second, one contiguous sequence of consecutive all-zero hextets anywhere in an address can be replaced with a double colon. This substitution is permitted only once per address so that the total number of hextets remains unambiguous — a device always knows there must be eight in total and can reconstruct the omitted zeros accordingly. When two separate runs of zero hextets exist, the longer run takes the double colon. These shorthand conventions are not optional style choices but are defined in the relevant RFCs as standard practice.

What you'll learn

What's covered

IPv6 Address Format

Aligned to

Cisco CCNA
1.9 Describe IPv6 address types
1.8 Configure and verify IPv6 addressing and prefix
Cisco CCST Networking
2.3 Identify IPv6 addresses and prefix formats
CompTIA Network+
3.4 Given a scenario, implement IPv4 and IPv6 network services

Key terms

IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.
IPv6
The sixth version of the Internet Protocol, using 128-bit addresses written in hexadecimal and separated by colons to provide a vastly larger address space than IPv4's 32-bit addresses. IPv6 also introduces built-in features like SLAAC, NDP, and mandatory support for IPsec.
Hextet
A group of four hexadecimal digits in an IPv6 address; eight hextets separated by colons form a complete 128-bit IPv6 address.
Hexadecimal
Hex
A base-16 number system using digits 0–9 and letters A–F; each hex digit maps to exactly 4 bits, making it a compact shorthand for representing binary data.
Prefix Length
The number of consecutive 1-bits in a subnet mask, written after a slash (e.g., /24), that defines how many bits of an IP address represent the network portion versus the host portion. A /24 prefix means the first 24 bits identify the network, leaving 8 bits for host addresses.
Subnet
A logical subdivision of an IP network, used to organize and segment network traffic.

Transcript

We've seen how IP version 6 addresses are quite huge. How do you deal with such big numbers? There are some ways that we can break this down, and there are components that go into this IP version 6 address format. We'll talk about IP version 6 formatting and what the format of IP version 6 looks like. Then we're going to get into prefix length and subnetting, and talk about how you subnet these. There is a lot of flexibility within IP version 6; however, there are some standards that we generally follow, so we'll talk about those standards. Then we'll talk some about shorthand notation and what the shorthand notation looks like.

IP version 6 formatting

IP version 4 addresses have 32 bits, and IP version 4 addresses are broken down into four sections. We call each one of those sections an octet, and that octet has eight bits for each one of those sections. Well, that's fine for IP addresses that have 32 bits total. But when you're talking about IP version 6, you have 128 bits that need to be represented.

So this is broken down, first of all, into eight different sections, and each one of these sections is called a hextet. It goes by a couple of different names, but these are hextets. Each one of these hextets has 16 bits per hextet, and is represented in a hexadecimal form. So each one of these is hexadecimal, which means that it is a 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, but it's representing 16 total. So 10 is actually A, 11 is B, C, D, E and F. Each one of these digits would be one of these digits here, and that goes into each one of these spots and represents — once again, each one of these represents four bits. We'll talk a little more about that in a second.

They're divided by semicolons, so that's one of the differences between this and an IP version 4 address. And then also notice that we have a, b, c, d, e and f. Here I have them representative as lowercase. Technically, they should be really lowercase, but you'll see equipment out there that does have them in uppercase. So both is, I guess, generally accepted out there, but officially they probably should use lowercase. So there is the IP version 6 formatting, what an IP version 6 address looks like and how it's broken down.

Breaking it down further

Just to note that IP address is huge: with 128 bits, and each bit can represent a zero or one, it'd be two to the 128th power, and you're talking about a huge number of address capabilities. It utilizes much of this. When we get into the protocol, you'll see the way we break this down and utilize this, where we really make it a lot easier for ourselves than we did with IP version 4. So it's great to have that many bits, and let's talk about how those bits are represented.

Let's take a look at those hextets, or officially they're hexaductets. It's hard for me to even say, so we just shorten it to hextet. It also can be known as a quibble or a quad nibble, so they can go by a few different names.

I'm only showing you four hextets here, and we know already that IP version 6 has eight of these. I just couldn't fit them across my screen and still have it at a decent size that we could look at it, so I have broken this down to just the first four. What does this look like? Each one of these hextets is 16 bits total. You'll count this up and there's 16 bits total, and it's broken into fours here, so each one of those is four bits. And four bits we can represent in hexadecimal, so I've got the hexadecimal ranges right here.

We could actually translate this. If we were to translate 0010, we see right here it is a two, so this would be a two. And then 0000 is a zero, so 0 0. And this is 001, is a one, so we've got one, and then colon. And then I can go all the way through this. So we've got 2, 03, 02. All ones right here is an F, so F. 0101 — look that up, and that is a five, so five. And 1010 is an A, so this would be A; there's another A. 1011, 011 is a B. So that is representing the first 64 bits right there, and then we'd have to do this for the following 64 bits to totally figure out what this address is. But this is when you actually are translating bits of these IP addresses to the hexadecimal form of this.

Prefix length

With IP version 4, we had a subnet mask. The subnet mask would identify how many of the bits were designated towards the network side and how many of the bits were designated towards the host side. IP version 6 has something similar. In IP version 4, even towards the later part of it, we started using CIDR notation to identify the count of bits, rather than having a subnet mask that said 255.255.0.0 or whatever the subnet mask was. So we made a transition with IP version 4.

IP version 6 just uses the prefix length, and it identifies what is the network portion and what is the interface portion of this address. When we see an example and we see a /16, that is saying that there are 16 bits that are designated towards the network side of this, and so 16 bits would be this first hextet right here. Or we would see a /32, and that would be up until this point right here. Or we'd see a /48, and that would be up to this point. So it designates how much bits the network is assigned to, and that is the prefix length.

For most of our networks, our network is going to be the first 64. So most of your networks, you're going to see a lot of /64, and that's designated as the network address for a lot of our networks, and then the last 64 bits are designated towards the interface. So this is the prefix length when you're talking about IP version 6.

Subnetting

A quick note about subnetting. When you're talking about subnetting an IP version 6 address, a lot of times we do it right within this hextet right here, and this hextet has 16 digits to it. 2 to the 16th power is 65,536, so we've got a lot of subnets that we can work with. We could just count up 0, 1, 2, 3, 4. So we have a lot of subnets that we can work with. Not all the time is this what we're given, but a lot of the time we have a lot of freedom with how many subnets we can create on our networks.

Shorthand notation

These addresses are very long. IP version 6 addresses are very long. But there are some ways that we can cut down on the size of these addresses, and make them simpler to type out and to write out.

Here I have the rule of no leading zeros. At one point in time — you'll still see sometimes where they'll put zeros in there — but for the most part, we can cut down on a lot of the zeros that you have. The address space is so huge that we still use a lot of zeros. So this says that we can cut out leading zeros. Leading zeros are the ones that are up front, and this has to deal with it on a per hextet basis.

So we look at each hextet, and there is no leading zeros in here. There are leading zeros in here, so we could actually cut this down to just zero — cut out the leading zeros here. Once again, there's three leading zeros here, so we can cut this down to zero as well. There's three leading zeros; we can cut that down to zero as well. This one does not have any leading zeros. If we were to cut out this zero right here and it said def, then what the machine would do is assume that the zero is up front. And so this would not be something we could shrink, this hextet right here. That would not be something that we could do. This we could cut down to just a zero again. And then this we could cut down to just a 78. And then we couldn't reduce this last one, because there's no zeros in there. So that is the rule of cutting the leading zeros, cutting any of those leading zeros out.

Another thing that we do with IP version 6 addresses is we cut out when there's a series of zeros in a row, where hextets have a series of zeros. So in this example right here, we have one right here and we have one right here. Well, in this IP version 6 address we can put one set of double colons. In this case right here, we're going to choose what is the largest set. In this case, we have a three here and only one here, so I'm going to choose this three. And I'm going to write this out as 2011::deff0:0:78:9abc.

The reason why I can only do it once within this range right here: if I ended up doing the same thing right here and had a double colon right here, the problem with that is it doesn't know whether I have one hextet set of zeros here and three over here, or if I have two sets of hextets over here and two over here, or three sets of hextets here and one over here. It knows that in total there has to be eight sets of hextets. So we've got 1, 2, 3, 4, 5 defined. So now it knows that this representation of the double colons right here — it knows that that's where it needs to put in three hextets there.

So that's how you figure out how to reduce it, and how the machine figures out how to add those back in when it's doing its calculation to figure out what its address actually is. So this is what we end up with, this address right here, which is quite a bit different than that address that we started with, with all of those zeros involved in it. Removing these not only helps you in identifying these addresses much easier, but it also is something that should be done. It's just part of the RFCs that you do eliminate these — not that it's optional to eliminate these.

We talked about IP version 6 formatting and what an IP version 6 address looks like. We talked about prefix length and how we identify those network bits and also the interface bits. And then we also talked about the shorthand notation, or removing those zeros to reduce the size of these IP addresses.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →