Assigning IPv6 Addresses – CompTIA Network+ N10-007 – 1.4


The IPv6 addressing of a device has similarities to IPv4, but there are also some significant differences. In this video, you’ll learn about DHCPv6 and how to modify a MAC address for use as a static IP address.

<< Previous Video: Assigning IPv4 Addresses Next: Network Topologies >>


Just like with IP version 4, we can use DHCP in IP version 6. This is often used to have devices configured with a global IP address that can be used to communicate out to the internet. With IP version 6, though, every device has already been assigned a link local address. You’ll see those links local addresses all start with fe80, and every interface that is configured for IPv6 will automatically have a link local address associated with it.

Because there is an IP address that we can use to communicate locally, we don’t need to send this information out using broadcasts. This DHCP communication can be sent with multicast, and it uses UDP port 546 and UDP port 547 to communicate. Also like IP version 4 the DHCP in IP version 6 uses four different steps to be able to accomplish this process.

The first is a DHCPv6 solicit message to a multicast address in a particular UDP port looking for DHCP servers. And on this subnet, we do have a DHCP server that will receive that multicast and respond back with a DHCP version 6 advertised message with an associated IP address. The DHCP client will receive the list of all of the different advertisements from all of the DHCP servers on that subnet. It will choose one of them, and then send back a DHCPv6 request message.

The DHCP server will then respond with a DHCv6 reply message, at which point that workstation will configure itself with the IP version address that was assigned by the DHCP server. There are other ways to assign IP addresses with IP version 6. This method is one that would allow all devices on the network to automatically configure themselves with a static IP version 6 address that can be used to communicate worldwide. This is going to be a process based on the other address on this workstation that never changes, which is the MAC address of the network interface card.

We’re are going to modify this MAC address to create a static IP version address, and this type of address that we’re creating is using an EUI-64. EUI stands for extended unique identifier, and it is a 64-bit value. You may have already realized, though, that there is a difference between a MAC address and a 64-bit EUI address.

Obviously, the MAC address is 48 bits long, and we need 64 bits to be able to create the static IP version address. This means that we’re going to need some extra bits to use for this particular static IP address. So we’re going to use that MAC address, make a minor change to it, and take that 48-bit MAC address and create from that a 64-bit EUI.

Let’s review what we know about the MAC address. That stands for Media Access Control address, and it’s the physical address that’s associated with the network interface card on your Ethernet network. You’ll sometimes see this referred to as an EUI-48 address associated with the 48 bits of the MAC address. There are also two halves to the MAC address.

The first three bytes are the OUI or organizationally unique identifier, which tells us who manufactured this particular network interface card. The last three bytes will be unique to your network interface card. So combined together no other device on your network will have exactly this same MAC address. To create this EUI-64 from this 48-bit MAC address, we’re going to split the MAC address into two pieces. It will be two 24-bit halves.

And in the middle, we’re going to insert 16 additional bits. These will specifically be FFFE that will go into the middle of this address. Then we have to make a change to the original MAC address. There is the seventh bit that needs to be modified. This changes the address from being one that’s a burned in address to something that is a locally administered address. This is what we call the UL bit. That changes it from universal to locally administered.

Here’s an example of changing that seventh bit. That’s obviously going to be in the first byte of the MAC address. So if the MAC address starts with 8c, we need to list out that 8c into binary. You can see that seventh bit here is going to be a 0. We need to change that 0 to a 1, and that will be represented as 8e when you look at it in hexadecimal form.

Now let’s build this IPv6 address. We need two different 64-bit halves of this address. The first half is going to be the subnet prefix. And as we learned in earlier video, we can easily find our subnet prefix by sending a Neighbor Discovery Protocol to the routers that may be on our local subnet and our routers will respond with our local subnet prefix. Once we have the subnet prefix, we need the final 64 bits that are created from a combination of our modified MAC address and the FFFE that we would put in the middle.

So the first three bytes would be that modified MAC address. We’ve already changed that 0 to a 1 to designate this as a locally assigned address. We will add FFFE to the middle, and then we’ll finish with the last three bytes of the MAC address which are unchanged.

In our previous example of converting the MAC address from a universal address to a locally assigned address, we converted the MAC address from hexadecimal to binary and then converted it back to hexadecimal again. But there is a shortcut that you can use to make this process much simpler without performing any of that conversion. To do this we’ll create a chart and we’ll start at zero and count all the way up to f in hexadecimal, and we’ll put them in these groups of four, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, and c, d, e, f.

These groups of numbers and letters will be the conversions that are used to convert between a universal address and a locally assigned address. If we look at our previous example, we know that MAC address started with 8c, and it was that second value, the c value that needed to be changed. When you go to our chart, we find the one that has the c associated with it and we see that the alternate for that is e.

That means flipping the seventh bit would make this MAC address 8e and the remainder of the MAC address. That means that we can very quickly make this change by modifying the c and turning it into an e and writing out the rest of the MAC address. Now that we have our chart, let’s see how quickly we can perform some conversions between a burned in MAC address and an EUI-64 address.

Let’s take that original MAC address that we were working with, we’ll split it into two halves, and this starts with an 8c. We know that we’re going to change the c to the corresponding value, and in our chart that’s an e. That means we have 8e:2d Alpha Alpha. We’ve split it into, and in the middle we’ve put ff:fe. And that entire value is our EUI-64.

Here’s another MAC address. This one starts with 18. We’ve obviously split it right in the middle. We need to look at that second character, which is an 8. And if we look at our chart, we can see the corresponding value would be an a. So if we bring this over, we can start with 1a, split the MAC address into two, add the ff:fe in the middle, and then finish with the last half the MAC address.

Here’s another MAC address that starts a0:21:b7. So that 0 is the one we’re most interested in, and you can see the corresponding value would be a 2. That means the first three bytes of the EUI-64 would be a221:b7. We’ll put the ff:fe in the middle and then finish with the last half of the MAC address. This MAC address starts with 34:62:88. We’ll look at that 4 value, see that the corresponding number is a 6, so that will change to a 3662:88, again, putting the ff:fe in the middle, and then finishing with the last three bytes of the MAC address.

So you can see the conversion process goes pretty quickly by using your conversion chart and simply converting between the MAC address and the EUI-64. Now you can combine this EUI-64 with your 64-bit IPv6 subnet prefix for a static IPv6 address. So you don’t need a DHCP server, and you don’t need to manually configure static addresses on all of your devices. They can be configured automatically using this process with IPv6.