CompTIA Network+ N10-008 Topic: Module 9 – Addressing Networks with IPv4 Part1
December 14, 2022

1. 9.0 Addressing Networks with IPv4

In addition to physical Mac addresses, our network devices need logical addresses in order to communicate on our network as well as out to the Internet. These logical addresses are called IP addresses. That’s short for Internet Protocol addresses. And we’ve got two versions: version four and version six. And in this lesson, we’re going to be discussing IP version four, or IPV4 for short. And we’re going to get a bit mathematical and work with binary numbers. And we’re going to make decisions about how to allocate IPV-4 addresses as we’re doing a network design. And to get us prepared for all of that, in our next video, we’re going to be taking a look at binary numbering. Bye.

2. 9.1 Binary Numbering

If you’re like me, you’re most familiar with decimal numbering. That’s where we have digits of zero through nine, and then we go to two digits. But in the networking world and in IP addressing specifically, we really need to know binary numbering. Binary means that a number can only have two values: zero or one. As an example of why we might need binary numbering, consider an IP version 4 address. This is written in what is called dotted decimal notation. Notice we’ve got four different decimal values. We’ve got a ten, we’ve got a one, we’ve got a two, we’ve got a three, and there’s a dot separating each of those decimal values, so it’s dotted decimal notation. And what we want to be able to do is take each of those individual decimals and represent each decimal as a binary number. And that binary number is going to have eight binary values.

For example, let’s take the number ten in decimal. We’re going to see that the decimal value often translates into the binary value of 000-1010. The decimal value of one translates into a binary number of seven, zeros and one, and so on. And because each of these decimal values is represented by eight binary values, we say that each of these is an octet because octo means eight and an octet represents eight binary values. So the ten we’re going to say is in octet number one, the one is in the second octet, the two is in the third octet, and the three is in the fourth octet. And what we want to do for the remainder of this video is figure out how to do this. How do we take a decimal number and translate it into binary, and vice versa? How do we take a binary number and translate it into decimal? Let’s start with that one, because I think that’s the easiest. Whichever way you’re going, from binary to decimal or from decimal to binary, I recommend that you start by sketching out a table with a pen and paper. And this table is going to have eight columns. And these columns, starting from the right, are the powers of two. Two to the power of zero is one. Anything to the power of zero is a one. “Two to the power of one” is a two.

So since it is, we’ll put one in that column and find the difference. 39 -32. Is seven. Now we’re dealing with the number seven, and we go to the 16th column. Is seven greater than or equal to 16? No, it’s not. So we put a zero in that column and move along to the eighth column. Is seven greater than or equal to eight? No. So we put another zero there and move along. What about the four columns? Is a seven greater than or equal to a four? Yes, it is. So we put one in each of the four columns and compared the results. What’s the difference between four and seven? It’s three. So we take that value and go to the two columns, and we say, “Is three greater than or equal to two?” Yes, it is. So we put one in each column and find the difference. What’s the difference between three and two? It’s one. And now we take that one and go to the one column and say, is one greater than or equal to one? Yes, it is equal to one. So we put one in that column, and the difference is zero. That tells us that the binary value for the decimal number 167 is 101-0011. And that’s a look at how we can convert a binary number to decimal and a decimal number to binary.

3. 9.2 Binary Practice Exercise #1

Let’s go to a practise exercise where you are going to convert a binary number into a decimal number. Specifically, given the number 011-0101, I want you to pause the video and, on some scratch paper, calculate what the corresponding funding decimal number is. And when you’re done, you can resume the video, and we’ll go through the solution together. All right. Did you take the opportunity to go through the calculation? Let’s see if we agree on what the answer is. The way that we typically do our conversion is to start with a table of eight different columns. And these columns are powers of two, starting at zero on the right and going through two to the seventh on the left, where you could just say, “Let’s start with a one on the right, and then double it until we have eight columns, and we just plug in our binary number of 011-0101 one.” And anytime we have a column with a one in it, we take that column value, like 643-2821. We just add up those column values containing a one. In this case, we’re saying 64 plus 32 plus eight plus two plus one, which gives us 107. Is that the answer you calculated? If so, congratulations.

4. 9.3 Binary Practice Exercise #2

Let’s go through a practise exercise together where I’m going to give you a decimal number and I want you to calculate the corresponding binary number. Specifically, I want you to take the number 49, pause the video, and convert that into a corresponding binary number. And as a tip to get you started, remember whether we’re doing a conversion from binary to decimal or from decimal to binary. I like to always start with a table with eight columns. We start with one on the right, and you double that value all the way to the left. So you’ve got 1248, 116, 32, 64, and 128.

So go ahead and pause the video right now, and when you’re done, you can resume the video, and we’ll go through the solution together. All right, how did you do with your calculation? Let’s go through it step by step. We’ve got a number of 49, and we want to convert it to binary. And given our table with these eight columns containing the powers of two, we want to start on the left. And we ask, is 49 greater than or equal to 128? The answer is no. If the answer is no, then we put a zero in that column, take our number, and move to the next column. Is 49 greater than or equal to 64? Still no. So we put a zero in that column and move along to the 32 column. Now, is 49 greater than or equal to 32? Yes, it is.

That means we’ll put a one in that column and find the difference. What is the difference between 49 and 32? Well, let’s see 49-32. that’s 17. So now we’ve got the number 17 that we’re working with, and we can move to the next column. Is 17 greater than or equal to 16? Yes, it is. So we’ll put a one in that column, and we’ll find the difference, which is a one. Now we’re working with number one. You could still have gone through each column and said, “Is one greater than or equal to eight?” No, it’s not. Set to zero. Is it greater than or equal to four or two? The answer is going to be no for those three columns. You could have done that, or you might have made a logical leap to save some time. You might have noticed I’ve only got one left. It’s not going to fit in any other column except this one column.Because when you finally get to that column on the right, you ask, “Is one greater than or equal to one?” It’s equal to one answer, which is yes. So we put one in that column, and that’s our answer. The decimal number of 49 corresponds to a binary number of 1.

In this video, we want to consider the format and structure of an IP version 4 address. And I compare the IP version four-address format to a street address. Let’s say you ask your friend where they live, and they say, “Let me write it down for you.” Here’s my address. And they make a note of 2783 7th Street. That’s a bit confusing. You don’t know which of those numbers refers to the house number and which refers to the street number.

I mean, after all, they could live at 278-37 Street. Or maybe they live at 27-83 7th Street. You don’t know where the dividing line is between the house number and the street number. It’s very similar to an IP version 4 address. An IP version 4 address is made up of 32 bits. And those bits are typically written in dotted-decimal format. We might have ten, one, two, and three. Each of those decimal values is separated by a dot, and each of those decimal values can be represented by eight binary bits. for a grand total of 32 bits. We’ve got eight bits and then a dot, and eight bits and a dot. Eight bits and a dot and eight bits Four times eight That’s 32. That’s the reason we say we’ve got 32 bits in this address. Now let’s take each of those decimal values and convert them into their corresponding binary values. Ten in binary is going to be 000–1010. A one is going to be seven zeros, a one and a two are going to be six zeros, and a 10 and a three are going to be six zeros and a one one.Some of those values represent the street on which the device with this IP address lives. And some of those values represent the house number, if you will.

For example, if you wanted to test your computer to make sure it had an operational network interface card, You could do what is called a “ping.” You could say pingspace: one hundred and twenty-seven, zero, one. And if your network interface card is functional, you’ll get a response, and they’ll say, “Yeah, I can get to that,” because you’re getting to yourself. It’s a loopback IP address. That’s the reason we skipped 127. A class C address is going to have a value in the first octet in the range of 192 through 223. It’s going to have 24 binary ones in its subnet mask and dotted decimal. That’s 255-255-2550. Or we could just say 24. Now, things get a bit different when we get into the last two classes, a Class D and a Class E address. They do not have default subnet masks, which we also refer to as “class full” subnet masks. Let’s consider Class D. Its first octet value is going to be in the range of 224 through 239, but it doesn’t have the concept of a subnet mask.

6. 9.5 Public vs. Private IPv4 Addresses

When it comes to IP version four addresses, I’ve got some bad news. And that’s why we’re out. You can no longer go to your numbering authority and say, “Hey, I’d like this big block of IP version 4 addresses.” They cannot give you a class B block of addresses. For example, now, back in the early 19, when Iwas working at a university, yeah, we went to ourcountry’s numbering authority, and we asked for a group ofaddresses, and they gave us an entire Class B network. I mean, there are thousands upon thousands of IP addresses that are publicly rabble on the Internet.