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.

Two to the power of two or two squared is four, and so on. If you want to think of it another way, start with the one on the right and double it as you go left. one, two, 4816, 326-4128. You do that until you have eight different columns. And if you’ve got a binary value made up of eight binary numbers, here’s how you can convert that into decimal. Let’s say that we have a binary value of 100-10110. And you’ll notice I made the ones in red. I want to highlight those because I want you to notice the column headings for each of those columns that have one in it. Those columns are 128; 16; four; and two. If we want to convert this binary string of ones and zeros into a decimal value, all we do is add up those column headings that contain a one. So we say, “What is 128 plus 16 plus four plus two?” That gives us 150. That’s how we can convert an arithmetic number to a decimal number. Now it’s a little bit more work to go in the opposite direction, but still fairly straightforward. Let’s say that we want to take the decimal number of 167 and calculate the corresponding binary number. We’ll return to our table of eight columns and begin on the left side, taking the decimal value we’re working with and asking the question of the leftmost column. Is, in this case, 167 greater than or equal to 128? The answer is yes. And if the answer is yes, then we’re going to put one in that column because 167 is greater than 128. We say, “Let’s put one in that column,” and then we find the difference. In other words, we’re going to subtract 128 from 167. So, 167 128, which is a 39, gives us a value of 39. And we take that over to the next column, which is 64. And we ask the question: is 39 greater than or equal to 64? And the answer is that it isn’t. And if the answer is no, then we’ll put a zero in that column and move along. Let’s go to the 32 column, and we’ll say that 39 is the number we’re dealing with now. Is 39 equal to or greater than 32? Yes.

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.

5. 9.4 IPv4 Address Format

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.

What we’re talking about is the network component of an address and the host portion of an address. The network address is much like a street number, and the host address is much like a house number. Now, where is that dividing line? A subnet mask is used to determine where the dividing line that separates network bits from host bits is. A subnet mask is also a 32-bit value, but its purpose is to tell us which of these 32 bits in this address refer to the network and which refer to the host. Well, for your notes, you might want to write down that the network portion comes first. It’s always network bits followed by host bits. And let’s say that we have a subnetmask of eight ones followed by 24 zeros. That’s the way a subnet mask is going to be formatted. We’re going to have a series of ones followed by a series of zeros. And anytime we have one, the corresponding bit position in the IP address is part of that IP address’s network address. In other words, we’ve got eight binary ones in the subnet mask. That means the first eight values of the first eight bits in the IP address are network bits. And the last 24 bits in the IP address are going to be host bits. And if somebody says, “All right,” what is your IP address? You could say, “Well, it’s ten one two three.” Well, that gives you the address.

You could go to that address, but you don’t know what the network portion is. In other words, you cannot, from that information, Say, “Oh, you’re on this network because you don’t know where the dividing line is.” There are a couple of ways of specifying that dividing line. We could say that our address is 101238, That’s sometimes called prefix notation or cider notation. CIDR stands for “classless interdomain routing.” Another way to represent that dividing line is to take the subnet mask and convert it into a dotted decimal. What do we have if we take eight binary numbers and convert them to decimal? Well, that’s going to be 128 plus 64 plus 32 plus 16 plus eight, plus four, plus two, plus one. If you do the math and this is the number you need to memorize, it comes out to 255. As a result, the subnet mask and dotted decimal are both 2550 zero. So we could say our IP address is 10 1 2 3 with a subnet mask of 2550 0. There are a couple of different ways of expressing IP address information along with subnet mask information. And different IP addresses have different default subnet masks. We can adjust the default subnet mask.

We can add bits to that mask. We can subtract bits from that mask. But I want you to know the default subnet mask values. We have four different IP addresses. The way you’re going to recognise the subnet mask is by classifying an IP address into a class. And there are five different classes of IP addresses: ABC, D, and E. And you can tell the class of an IP address by looking at the first octet, that first decimal number. If that first decimal number is in the range of one to 126, that’s a class A network. and its default subnet mask is eight bits. So, in dotted decimal, that is 2550 zero. Or since it has eight bits in the subnetmask, we could write that in prefix notation, slash notation, or cider notation as eight. A class B address is going to have its first octet in the range of 128 to 191. Its default subnet mask is going to have 16 addresses. And in dotted decimal, that’s going to be 255-25500, or simply 16. And you might be wondering what happened to 127. It looks like we skipped over that. We did. Because 127 is reserved for a special purpose It’s reserved as a loopback address.

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.

You see, we’re never going to assign a Class D IP address to a device. A Class D IP address is used for something called multicasting. It can be a destination address. Think of a multicast address. In other words, a class D address. Think of that as something like a club that you could join. You and other members join this club, and that club is its own entity that contains these members. And if I wanted to send information to all the members, I could simply send information to the club, and every member of the club would get that information. same thing with multitasking. You’re going to define a multicast group address as a Class D address, and you can send information to that address, and it will go to all the members of that multicast group. But you’re never going to assign a Class D address to a device. Now, a Class E address I predict you will never use I’ve been in this business for over three decades now, and I’ve always heard that a Class E address is used for experimental purposes. Well, after 30 years, I’ve never seen such an experiment, and I doubt that you will either, especially with the advent of IP version 6, which will eventually replace IP version 4. but you can recognise a classy address. It’s got a value in its first octet in the range of 240 to 255. But again, there’s no concept of a default subnet map for client e-mail addresses.

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.

That’s not going to be a possibility today. So how can we still use IP version 4 addresses if we have no more? Well, within an organization? We can use some private IP addresses that are not routable on the public internet. In fact, I could use addresses in my company, and you could use addresses in your company that actually overlapped with one another. That’s how we can keep using IP version 4 addresses because inside an organisation or inside your home, you’re probably using private IP addressing. And then we’re going to use a service called “Nat Network Address Translation” that will take maybe 100 private IP addresses and allow those 100 IP addresses to share a single publicly routable IP address that your Internet service provider gives you. That’s the reason we can still use IP version 4, even in new installations. And I’d like for you to be able to recognise these ranges of private addresses.

And we’ve got a range for each of our address classes: A, B, and C. For Class A, any IP address that begins with “at” in the first octet is a private IP address. Remember, a Class A IP address has a default subnet mask of zero. Now, this can give you literally millions of IP addresses that you can use inside your organization. Somebody else could be using those in their organisation as well, and they won’t interfere with one another because you’re translating those private addresses into one or more publicly written IP addresses using that Network Address Translation service. For Class B, we can have private IP addresses in the range of 170, 2160, zero, all the way through 100, and 723-125-5255. In other words, if it begins with a 172 and the second octet is in the range of 16 through 31, that’s a private IP address. And a Class B IP address has a default subnet mask of 16 or 255.255.0. But notice that I have two private IP address ranges for a Class B address. The next one is a bit of a special case. If your IP address starts with 169.254.x, it is a private IP address; it is a Class B IP address. So it’s got a 16-submit mask as well.

But it is not routine—even within your own organization. In other words, it cannot pass through a router boundary. Now, these other IP addresses, such as the ten addresses Yeah, within your company, you could have routers and different networks. You can also route from 10 1 10 to 170 216 20. You can route between those networks as long as they’re within your organization. But you can’t even route this network. And the reason is that this is called an APipa address. That’s AP IPA. That stands for “Automatic Private IP Addressing.” And if you see one of these IP addresses on a host, it’s probably going to be an issue because when a PC boots up, for example, usually it will go out and try to dynamically learn an IP address using a service called DHCP, the Dynamic Host Configuration Protocol. However, if it cannot obtain an IP address from a DHCP server, and if nobody has gone and administratively configured an address manually on that PC, it’s going to say, “Nobody gave me an IP address.” So I guess I’ll just pick one. And it will pick one from this range of APIPA addresses, an IP address that begins with 169 254.And it’s not routable, but if you have a couple of PCs that happen to pick their own IP addresses in that range, they can talk to one another if they’re on the same network segment and there’s not a router between them. But usually, if you have an APA address, that’s a problem. Now, back to the regular private IP addresses that can be routed within your organisation for class C. A private IP address begins with and ends with any value in the last two octets. And since it’s a classic C IP address range, the default subnet mask is a slash 24, or in dotted decibels, that’s 255-255-2550.

7. 9.6 IPv4 Unicast, Broadcast, and Multicast

In this video, we’re going to COVID three different types of IP. Version four allows for three types of packet flows: unicast, broadcast, and multicast. And none of these are bad in and of themselves. There’s a time and a place to use each one. But just as a single metaphor that we can use as we discuss all three of these, imagine that we have a video server that’s going to go out to the PCs within our company. Let’s say at 2:00 p.m. Today, the corporate CEO is going to make a big company announcement, and you have the option of joining or not, but it’s recommended you join. And let’s pretend that PC One and PC Two exist. Yeah, they want to join; they want to see what she has to say. But with PC number three, they’re on a deadline. They don’t have time to break away for a meeting. As a result, they do not want to receive that video stream. Let’s think about three different ways of delivering that video. One way is unicast. Now.

PC one, PC two They want to receive it. So what the video server could do is send a packet flow just to PC One and then a separate packet flow just to PC Two. We’re doubling up our traffic when we do that, but we’re going just to the two PCs that want the traffic, and we’re not bothering the PC that does not want the traffic. To make things easier to understand, I only put three PCs on the screen. But suppose we had a couple of hundred PCs, and we had maybe 150 PCs that did once you got the video. Now that the video server is having to send 150 duplicate IP streams, That could put a processor burden on that server. It could put a bandwidth burden on that link between the video server and the switch. It’s not a very scalable solution, but it does meet the criteria of delivering the video only to PC One and PC Two and not to PC Three. Now let’s talk about another way of delivering the video where we’re not overtaxing that video server or its link. and that would be a broadcast. And a broadcast goes everywhere within a network segment that we also refer to as a “subnet,” or sometimes we call that a “VLAN.” By the way, it’s going to go to all devices on this network segment, by the way.Network segments are separated by routers. But here we’ve got these three PCs plugged into a switch. A broadcast is going to go everywhere within what is called this broadcast domain or this subnet. And this allows the video server to send each packet in the video stream just one time.We’re not burdening its processor; we’re not burdening the bandwidth on that link between the server and the switch. And PCs One and Two get the traffic they want.

The downside is that PC Three also got the traffic; it did not want the traffic on its network. Interface Card had to look at every single broadcast packet coming in and say, “Oh, that’s not for me to discard.” That’s not for me to discard. That’s not for me to discard. We’re taxing the resources on PC 3 because it’s having to throw all that stuff away that it doesn’t want. So for our particular scenario, trying to send out a video stream to select recipients via broadcast is probably not the way to go either. What might be a good fit for us is multicast. With IP version 4 multicast, we’re going to have what is called a multicast group. A multicast group is going to be identified by a class D IP address. As a result, PC 1 and PC 2 can join this group. And this group’s address is 239 One kleistress has a value in the first ten in the range of 224 through 239. So we can look at that 239 and know that’s a class D address. In other words, that’s a multicast group address. So now the video server can send out a single video stream, and the switch knows that those two PCs want to receive the traffic. It knows that PC Three did not want to receive traffic because it didn’t ask to join the group. So the switch is going to replicate that single video stream coming from the video server and go just to PCs One and Two. Now, for our scenario, this is the optimal solution. The video server and its link are not being overtaxed. The devices that want to receive the video stream receive it. And any device that does not want to receive the video stream is not bothered by having to examine and then drop those packets it doesn’t want. So for our example, multicast is the best solution.

Leave a Reply

How It Works

Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!