An Overview of IPv4 and IPv6 – CompTIA A+ 220-801: 2.3

| November 14, 2012


The primary IP technologies used today are IP version 4 and IP version 6. In this video, you’ll learn the differences between these two technologies, the differences between public and private IP addressing, and how automatic private IP addressing (APIPA) can be used to provide connectivity.

<< Previous Video: TCP/IP SubnetsNext: TCP/IP Addressing >>


Review Quiz: An Overview of IPv4 and IPv6

Start
Return
Shaded items are complete.
12345
67
Return


An IPv4 address that stands for IP version 4, is an OSI Layer 3 address and it’s usually represented in this way. We usually talk about IPv4 addresses as decimal addresses. Here’s a good example– 192.168.1.131.

Now, our computers of course don’t read things in decimal, they read binary. And if you were to expand this out in binary, you would see there were four bytes associated with this IP version 4. There are 8 bits in a byte. Sometimes you’ll hear this also referred to as an octet, referring to an 8-bit byte. That means that you’ve got 32 bits in an IP version 4 address, or 4 bytes in order to work with this.

Now because we have 8 bits in a byte, this number that’s in each octet of the IP address is going to be between the value zero and the value 255. We can’t go any higher than that. So there are a total of 256 possibilities in each byte of an IP version 4 address.

The newest version of TCP/IP is IP version 6. And although IPv6 is not widely deployed, it’s becoming more popular every day. One of the significant differences of IPv6 is we don’t represent the address any longer in decimal. We now refer to the address in a hexadecimal format. And you’ll notice that is a much larger address. There are 128 bits, which means we have 16 bytes in an IP version 6 address.

There were a lot of reasons for making the IP address this long. But one of the big reasons, of course, is that we wanted to be sure that we would never, never run out of addresses again. You’ll notice that each section of an IPv6 address is separated with a colon. And we have two octets in each colon. That also means there’s 2 bytes or 16 bits in each section of an IPv6 address.

Sometimes in an IPv6 address you’ll see a double colon listed. In fact, this address has one right here. That means that we are abbreviating this address. There are sections of zeros in this address, so instead of writing out all of those zeros, we simply put in a double colon. You don’t even have to put in leading zeros if you don’t like. In fact, this address, instead of putting in 0652 we can simply write 652.

Now, because these addresses are so big, they’re in hexadecimal, they’re not very easy to type in. If you needed to go somewhere, your domain name system is going to be very, very important. It’s much easier to type google.com than having to type in the entire IPv6 address to be able to communicate to google.com.

Let’s look again at that shortcut process for taking one single IPv6 address and shrinking it down into something that’s more abbreviated. Let’s look at this IP address– fe80, there’s a bunch of zeroes, cabc, c800, 00a7, 08d5. That’s a really long address. But fortunately there’s spots in here where we could start making an abbreviation to some of these.

Let’s start with something that’s very easy. Let’s get rid of every place where there’s a leading zero. So if we do that, we’re able to get rid of a bunch of zeros that are here. There’s a leading zero down here on this set of bytes, and a zero right here at the end. That makes a much shorter address if we had to type something in.

But we don’t have to stop there. There’s another section of this where we can take any place where we have two or more groups of zeros and we can abbreviate them with a double colon. You can only do this one time inside of an address. You can’t have multiple double colons– only in one place.

So if we were able to see that we’ve got a zero and a zero and a zero, we can get rid of all of those and simply replace it with a double colon. Well, now you’ve got a much smaller address. And if you had to give that address to somebody, if you had to say it over the phone, if you had to type it in, that’s a much shorter way of typing this in than typing in this very, very, very long address at the top. And indeed, these are exactly the same address.

Another important concept with TCP/IP addressing is the idea of a public address and a private address. We created private addresses when we realized that the internet was so large and so many different devices that we would very, very quickly run out of IP addresses unless we did something. And what we decided to do was take a network address translation that you might have in your router and create a series of addresses inside of your organization that are private– they’re not routed onto the internet. Even if you tried to use these IP addresses on the internet, they wouldn’t be routed anywhere because we have specifically assigned them via RFC 1918 as private addresses.

And almost everybody connecting to the internet is using these private addresses in conjunction with the network address translation. Because not only does it decrease the number of addresses that we need on the internet, but it has a much more flexible set of subnetting that we could do inside of our organization.

When you’re designing and adding in your own private address, you can choose from three different groups. And in some cases you can use all three of these if you’d like to route between them in your environment. You have first a address range between 10.0.0.0 through 10.255.255.255, and colloquially we call this the 10 dot network. If you wanted to describe this with the old class-based system, you could think of this as a single class A.

And you’re able to use this CIDR block. The largest block you can use has a slash eight. So you’ve got a subnet of 255.0.0.0, so now you could subnet anything that’s below that. You could make this a slash 16, you could make it a slash 24, you could make it a slash 26. You have complete flexibility and it’s very common to see the 10 dot network being used in very large organizations.

This middle address range of private addresses is 172.16.0.0 through 172.31.255.255. That means it has a slash 12 subnet mask. And although some people simply call that the ability to build 16 class Bs, you’ve actually got a little more flexibility because we’re only using 12 bits of that particular address.

And it’s probably much more common, especially on our home routers, to see an IP address range of 192.168.0.0 through 192.168.255.255. Notice that the default mask here is a slash 16, so you’ve got a lot of flexibility. You could build out, for instance, 256 contiguous class Cs if you were thinking about that old class-based subnetting. But obviously with a CIDR block notation you have much more flexibility than that.

So you can see a lot of the advantages that this private IP addressing scheme gives us. We can architect and build the networks however we would like to inside of our organization. And only worry about our public IP addresses when we need to network address translate and communicate out directly to another device on the internet.

Have you ever plugged into a network and you were not given an IP address by a DHCP server? In those cases, your operating system assigned a link-local address. In the versions IPv4, this is commonly called an Automatic Private IP Addressing scheme or APIPA. Although we’re not able to route outside of our network with this locally assigned address, you are able to communicate on your local link to other devices that are on your local subnet, thus we call that a link-local address.

The IETF has reserved a range of IP addresses in IPv4 just to be used for these link-local addresses, and they are 169.254.1.0 through 169.254.254.255. Now you’ll notice that the last 256 of these addresses are reserved. So this does not go all the way to 255, it goes to 254 and it stops right there.

If you are using an IP version 6 network, you have a completely different group of link-local addresses that are automatically assigned. Those start with fe80 with a subnet mask of 10, but we have to have at least another 54 zeros. So if you look at this subnet mask in this address, you’ll notice that it’s almost always written out as fe80 with two colons and a slash 64 at the end.

These addresses are automatically assigned by your operating system. Once it realizes there’s no DHCP server responding, it then decides to pick an IP address to put on to this network. But before it assigns it, it sends an ARP out to your local subnet to see if anybody responds back. And if they do, we know we can’t use that IP address, we go to the next one in the list, we send another ARP, we wait for a response. And if we finally don’t get a response, that is the IP address we use for our link local address.

So if you’re on your network and you realize you can’t communicate outside of your subnet, you may have been assigned a link-local address. You need to check and see if the IP address of your workstation is between these ranges and then you’ll know that you have an automatic private IP address that’s been assigned to your machine.

One good way to see if this is what’s happened is you could bring up the IP configuration on your computer. If you are using IPv6, you’ll always be given a link-local IPv6 address. But look at the IPv4 address on this machine– it’s 169.254.228.109. And just by looking at that range, we know that we’ve been given an APIPA address.

Tags: , , , , , , , , , ,

Category: CompTIA A+ 220-801

Comments are closed.

X