IPv4 and IPv6 – CompTIA Security+ SY0-401: 1.4

IPv4 and IPv6 are some of the fundamental building-blocks of network communication. In this video, you’ll learn the structure and design of the IPv4 and IPv6 protocols.

<< Previous Video: Defense in DepthNext: IPsec >>

Let’s start with some of the most common protocols you’ll find, IPv4 and the IPv6. And you can see if you’re using a computer today, you’re probably using IPv4. This is the most popular protocol known to man, I think.

This is Internet Protocol version 4. These are addresses that are 32 bits long. And because they’re 32 bits long, if we do the math, there’s a maximum number of 4,294,967,296 addresses you can get. Well, as we’ve probably seen in the trade magazines in the news, that is not a lot of addresses. We are running out of addresses.

So we needed something bigger and badder, something that would really give us flexibility at least into even the unforeseeable future, to provide us with more capabilities. And so we came up with a new version of IP, TCP/IP version 6. These are 128-bit addresses. And these are much larger. You can see the total number of addresses available now, which means that you can have everybody in the world with many, many, many of their own addresses and then some.

You can cover the entire world with IP addresses now. Parts of the ocean can just be covered with TCP/IP. And we’d still have plenty more left over for everybody else. So a lot of flexibility, a lot of capabilities there. And we’ll talk a little bit about some of the additional advantages that IPv6 is going to bring to us.

You’ll notice also that we moved between IPv4, we just jumped right to IPv6. And that’s because in the standards realm, there was something called an IPv5. It was called the Internet Stream Protocol, or ST. It obviously never really took off. But it is one, because that name was taken, we couldn’t really repeat it. So going to IPv6 was the next step. And that’s why you have that jump between the version 4 and the version 6.

IPv4 addresses, as we said, are 32-bit addresses. But we almost always represent them in decimal form, in a base 10 form. And we call this a dotted decimal form, because you have four decimal numbers here, And it’s got these dots between. It’s got a period between all of them.

Now, behind the scenes the computer obviously isn’t really representing these in decimal numbers. That’s for us human beings. It’s representing them in binary. And here is the binary representation of each of these what we call octets, this group of eight all stuck together.

You can see 192 is 11000000. 168 is 10101000. So if you put all those together, it comes out to be 168 whenever you’re converting that between binary and decimal.

You might hear these different sections referred to as an octet, because it’s eight of those bits put together. Eight bits put together is also a byte, at least it is in the computing architectures that we tend to use. And so whenever you hear these different bits or bytes or octets, that’s what it’s referring to in this dotted decimal notation for IPv4.

And that’s where we get the 32 bits of an address is when you add all of that up, that’s how big they are. So if each one of these is eight bits long, if all of these were turned into a 1, the maximum number that you could ever have for any section of these dotted decimal IPv4 addresses is 255. And that is how we’re typing in our IP addresses into our systems, into our firewalls. And we’re deciding where people can go to what subnets are based on usually these IPv4 addresses.

IPv6 addresses are much bigger. There are much more things to look at here. In fact, we’ve got away from dotted decimal. It’s now we’re separating out and representing an IPv6 address in hexadecimal. And that 16, that base 16 functionality provides us with addresses that look like, Fe80, a couple of colons, 5d18, colon, 652, colon. The colon is now really taking the place of that decimal that we were using before.

And you’ll notice in some cases we have two colons stuck together. That represents a series of zeroes stuck between. A real IPv6 address if you’re going to write it all the way out would look something like this.

These sections of four, it’s really these two hex values that are all stuck together. And they have colons that are separating them. But fortunately, we’ve created some shortcuts for us that if there’s a string of zeroes, we’ll just put two colons in place and assume that those are zeroes between them. If there are leading zeroes in front of a couple of numbers, you can always get rid of the zero. So it helps a little bit.

And of course, if you were going to write it all out in binary, you can see the representation of all the binary numbers all spelled out on the screen for us. Now, this is now a lot of data going by. You can see those are 128 bits or 16 bytes for a single IPv6 address. So there’s a lot going on there.

And as you can imagine, typing in the IP address, the IPv6 address of a web server or the IPv6 address of your email server isn’t really going to be an easy thing any more when we move to IPv6. So your domain name services are going to be extremely important, being able to type in mail.google.com is going to be a lot easier than typing in a big, long IPv6 address.