From the course: CompTIA Network+ (N10-009) Cert Prep
IPv6 addressing
From the course: CompTIA Network+ (N10-009) Cert Prep
IPv6 addressing
- If you want to understand IPv6, we've got to start at the beginning and that is dealing with IPv6 addresses. So in this episode, all we're going to be doing is understanding the actual IPv6 address structure, what it looks like and some tricks we can do to manipulate it. So let's go ahead and get started. And I'm going to go ahead and throw an IPv6 address down right there. Now if you look at this address, number one, you're going to notice that it's broken up into eight groups of four hexa-decimal values separated by a colon. Now you need to be careful because on the exam they have a couple of really simple questions that'll say things like, which one of these is the valid IPv6 address? And you need to be comfortable, always start with, you're going to have eight groups separated by seven columns. So this is a lot of writing. So if you can imagine a world where you are in a static environment and you have to type this stuff in, it would be nice if we had some shortcuts. So I want to show you some of the shortcuts that we use when we're typing in IPv6 addresses. Okay, so first of all, if you look at this address, you'll see that there's a lot of groups that start with zeros. So the first thing we can do whenever we're doing an IPv6 address is we can dump all the leading zeros if there are any. So we can get here. And the four zeros gets reduced to a single zero. That 0 0 0 1 we had is now just to a single one. And this makes it a little bit shorter and a little bit easier to type. So that's one trick. So what I want to do, let's go ahead and get rid of that. And now let's put up another IPv6 address. Now I need you to look at this address very, very carefully. You'll see we have two groups of four zeroes and then we have three groups of four zeroes. Got the idea, sorry, it's, yeah. Okay. So what I want us to do is I'm going to show you how we can concatenate this. Whenever you have groups of zeros, first of all, let's go ahead and take all those four zeros and just replace with this. All right, now as you look at this, we can take any long string of zeros and simply replace it with a double colon. So let's do that with the first part. So we have Fe80::1234, and then the rest of the address. Now you'd say, "Well Mike, why don't we make another double colon for these other zeros?" Well, let's do that for a minute. So just for a moment, I'm going to make a bad IPv6 address here. So we're going to have Fe80::1234::1234. So now we have two sets of these colons. I have a question for you, how many sets of zeros go in that column and how many sets of zeros go into this one? And the answer is you can't do it. You can use this double colon nomenclature, but only in one place on the address. So let's go ahead and reset it back to its original setting all the way. All right, and this time what I'm going to do is I'm going to replace the three groups of four zeros with a double colon. So let's go ahead and make it Fe80:0. We can still drop the leading zeros, :0:1234::1234. When you're working with IPv6 addresses, these highly concatenated addresses are much more common. Pretty much all IPv6 addresses are going to have long strings of zeros in them, well at least for the next a hundred years we hope. And it's very common to see these types of addresses where you're always going to have a double colon in there. So be comfortable with that. Okay, so now that we understand the basic structure of an IPv6 address, let's talk about where IPv6 addresses come from. Now the first thing you need to understand, and this is a big one, is that with IPv6, you no longer have a single IP address. You now will have at least two IP addresses. One address is called the link-local address. The link-local address is automatically generated by any IPv6 capable host the moment that device starts up. The other address is called your internet address. The internet address is given to you at least in part by your gateway router. So you'll always have at least two addresses. Now, let's go ahead and see this. So I've got my system up over here and I'm in Windows and I've run IP config. Now if you look just at my ethernet adapter here, first of all, you'll see that it says IPv6 address. Do you see that? That's my actual internet address. I have these temporary addresses, which I'm going to ignore for the moment. We'll address these in other episodes, but here's the big one. Do you see link-local IPv6 address here? The link-local IPv6 address always begins with 80:0000 :0000:1000. And you can see we've just done a double colon there. The next four groups are actually generated by your Mac address. Now I want you to look at one more thing here. Do you see that percent 14? That is a Microsoft Windows thing, and I want you to just go ahead and ignore that for right now. And instead, let's concentrate on where does your link-local address come from. So let's go ahead and draw this up real quick. So we know that a link local address always begins with Fe80:0000:0000:0000. We got that part. So the first half is always the same on all computers in the universe. The second part comes from your Mac address. So let's say on the, we have a Mac address of 2a-3b-4f-09-45-01. Now hopefully you know that a Mac address is only 48 bits. So we use a standard called EUI-64 that will take a 48 bit Mac address and turn it into the last half of our link-local address. So to do this, we'll split the Mac address in half and we add ff-fe right into the middle of this. Now the next thing we do is we have to bear with me folks, you see that 2a, so that's the first eight bits of our Mac address, which is quickly turning into our last half of our link-local address. Those first eight bits, we have to flip the seventh bit so that A will turn into nine. Now, before we go any further here, let me stress something to you. It's important for the exam that you know that EUI-64 exists. The important thing here is that I don't want to turn this into a big hexa-decimal to binary course. I would strongly recommend you check out other episodes in the series that do that, or you can actually check out my A plus course. We do that as well. The bottom line is, is that that A gets turned into an eight because we flipped the seventh bit. This is only important for understanding EUI. You're not going to be tested on that stuff. Let's go ahead and go back to this diagram and let me show you what's going on. So we've now converted our Mac address into what is about to become the last half of our link-local IPv6 address. So at this point, let's go ahead and convert this into a nomenclature that makes more sense. So we'll take our Fe80:: and let's just draw all this in. So we're 283b, and let's make a colon and then 4fff, and let's make another colon and then fe09, and let's make our last colon and then 4501. So that folks is where your link-local address comes from. The cool part is is link-local addresses automatically generate. Now for those of you who are comfortable with IPv4, you'll go, "Well, Mike, isn't that kind of like in APIPA address?" Yeah, it's kind of like an APIPA address in that your system will generate that automatically. But remember, APIPAs are only generated when you can't find a DHCP server. So I wouldn't call it exactly the same type of thing. But the important thing is, is that if every computer that's IPv6 capable can make its own link-local address, automatically assuming it's plugged in, they can start talking to each other automatically. And that's where things like neighbor discovery protocol come into play. Now, before we dive too deep into that, what I would like to talk about is something that's fascinating. And to do this, let's go ahead and just put up some arbitrary address here, all right? When you look at this address, what is very important to understand is that this is 128 bit address. Just because we're running IPv6, that doesn't mean that we don't have subnet mask. That doesn't mean that we don't have default gateways, it's just longer. So when we're talking about IPv6, the smallest subnet mask you can have, and remember, let's use proper CIDR format here as a WAC 64. So no, you can't type this into two 55s. Everything is cider now, so it's always going to be a WAC 64. Isn't that interesting? You think about this. That means the smallest network, let's say you only have two computers with IPv6, you're going to have two to the 64th power addresses. Crazy, huh? Does that seem wasteful to you? In fact, a lot of people who help develop the IPv6 standard would agree with you that even if I only have a two computer network, my subnet mask is always going to be WAC 64, which is bazillions of computers. And people argued about this quite a bit, but that's how it is. So in the IPv6 world, you never type in a subnet mask because the subnet mask is always W 64, no exception. Now, okay, there is some exception to that, and we do actually have variable length subnet mask, VLSM format, but that's usually for routers up on the internet where they're breaking a subnet down and down through aggregation. They'll be using things like WAC 32s and WAC 48s and WAC 52s and things like that. But that really doesn't trickle down to us individually unless you've got a fairly advanced enterprise system with lots of routers and that type of thing. So what I want to do right now though, is I want to go back onto my system and I want to show you that there are situations where you may want to actually do some configuration. All right, so here I am in network and sharing center, and what I'm going to do here is I'm going to go directly into the properties for my ethernet card. Now, this should look pretty familiar to us. We've certainly done this in other times in other episodes where we're messing with IPv4, but this time let's mess with IPv6. Now, if you take a look at this, you'll see obtain an IPv6 address automatically. What it's telling you here is it's saying, listen, the router will tell me what my IPv6 address is. However, if you actually wanted to type it in, you really could type it all in here. And again, notice that the subnet prefix length, they leave this in as an option, which is actually kind of interesting because I just told you that for a network, it's always be WAC 64. There are a lot of people at Microsoft who said, Microsoft, why are you having us type in WAC 64 every time? Can't they do it automatically? And Microsoft answer is, we just want to be a little bit flexible. So you're going to type in WAC 64 there, but you can type in. And if I wanted to, I could manually type in an IPv6 address. There are some situations where you may type in an IPv6 address. With IPv4, things like servers, for example, would always have a static IP address. With IPv6, it gives us a little bit more flexibility. And if you have a local DNS server, you probably wouldn't even be doing this for a server. Everything pretty much just goes ahead and generates their own stuff and gets your internet address from their router by itself. So it works out really well. One more thing to look at before we leave here, and that is DNS. You still have to deal with DNS. We'll see in other episodes that the router will send out what's known as a router advertisement, which should include DNS information. But if you wanted to use a specific DNS server just like we do with IPv4, you could type it in right here. Now the last thing I want to mention is that while this is a revolution, it's also an evolution. IPv6 has been taking a long time to get widely adopted, and because of that, a lot of people, in fact, pretty much all operating systems support a single host that runs both IPv4 and IPv6 simultaneously. So let's take one more look at my IP config. So you see I've got all this IPv6 goo, but look here, I still have IPv4 information as well. What you're talking about here is called dual stack. Dual stack just means you're running IPv4 and IPv6. It makes for interesting situations. So for example, if you type in www.arbitrarywebhost.com and hit enter, remember DNS has to resolve that IP address. If that web host is running IPv6, it'll give you an IPv6 address. If that web host is running IPv4, it'll give you an IPv4 address and it can handle it either direction. We're probably going to continue to use IPv4 for, you know, everybody's guessing right now, five to 10 more years, but it's not going to be that long where we're going to go from a dual stack to a single stack and the only IP addressing you're going to have is IPv6.