CompTIA Network+ N10-008 – IP Addressing
IPv4 Addressing IPV-four addressing As a result, IPV 4, or Internet Protocol version 4, This is extremely commonly used in our networks. Now, you’ve probably seen these addresses before. They’re written in what’s called dotted decimal notation. So some examples of those would be ten dot one, dot two, three, or 172 21 dot 2243 dot 67. Each IPv4 address is divided into four separate numbers, each divided by dots, hence dotted decimal notation. Each of these divisions is referred to as an “octet” because it contains eight bits. Each…
IPV-four addressing As a result, IPV 4, or Internet Protocol version 4, This is extremely commonly used in our networks. Now, you’ve probably seen these addresses before. They’re written in what’s called dotted decimal notation. So some examples of those would be ten dot one, dot two, three, or 172 21 dot 2243 dot 67. Each IPv4 address is divided into four separate numbers, each divided by dots, hence dotted decimal notation. Each of these divisions is referred to as an “octet” because it contains eight bits. Each of these decimal numbers will be anywhere from zero to 255. And that can be represented by eight ones or zeros or bits. When these are added together, they form four eight-bit octets, as shown on the screen with the examples 192, 168, and one four. So with IPV for addressing, we divide up our address into a network portion and a host portion. The subnet is what’s going to define what is the network portion and what is the host portion. If there’s one in the space, it’s part of the network portion. If there’s a zero, it’s part of the host portion. So let’s take the example of 192, 168, and one four.
You can see when we break that down into binary, it’s there on the screen. Now, its subnet mask is 255.255.2550, keeping it on a standard class C subnet. Now, if I convert that to binary, you can see that the first three octaves are all ones. That means that the network portion of this address is 192, 168, 1. The dot four represents that this is the host. So this is the fourth host on this particular network. Now, when we look at IP addresses, we break them up into classes. And each class has its own default subnet mask. In the last example, that was a default “Charlie” or “Class C” address. This is what we call a “class full mask” because it used the default subnet mask. So if I want to look at the different classes, there are four of them. There are four classes: A, B, C, and D. The way you can determine this is based on the first octet. If the first octet is between one and 126, it’s a class A address. If it’s 128 to 191, it’s a class B address. If it’s 192 to 223, it’s a class C address, and if it’s 224 to 239, it’s a class D address.
The class will now have notations. If it’s A, the first octet will be 255. If it’s B, the first two octets will be 255, and if it’s C, the first three octets will be 255. For class D networks, there is no glassful subnet mask. We can actually abbreviate these as “816” or “24 networks.” Notice that 127 was skipped in between class A and class B. That’s because the 127 range is a special IP address called the loopback address, which we’ll talk about more later. Now, when we talk about IPS, we have two main types. There are two types of IPS: routable and no routable. Routable IPS are publicly available. Routable IP addresses that are globally managed by ICANN ICANN is the Internet corporation that assigns names and numbers. Now, if you want a public IP address, like for a Web server, you have to buy that address, and ICANN is the one who leases those out. Now, there are five different groups underneath ICANN. There’s Erin, which is for North America; Lac Nick, which is for Latin America; Afnik, which is for Africa; and AP. Nick, which is for Asia and the Pacific region, and then Ripe, which is for Europe. Those are the ones who’d handle it on behalf of ICANN in those regions.
So since I’m in America, if I wanted public IP address, I would go to Aaron, right? Well, not exactly. Aaron’s not going to just sell me one IP, so unless I want a whole block of IPS, I’m going to have to get it from a reseller. So in my case, my Internet service provider is Verizon. So if I want a public IP, I go to Verizon, which has bought an entire chunk of them from Aaron. Now, public IPS have to be purchased before you can use them, and you can get them either in blocks of one or many of them from your local service provider. Now, when we talk about no routable IPS, these are known as “private IPS” because they’re not public. Private IPS can be used by anyone, and they’re not routed outside your local area network. If you look at the IP address of your computer, you most likely have an IP address that starts with either a 10 or a 192. Those are both part of the private IP ranges. When you want to go out to the Internet, your router conducts a network address translation to change your private IP into a public IP. We’ll talk more about network address translation and port address translation in a future lecture. Now, when we look at the private IPS, you do need to memorise this chart. There are three classes: A, B, and C. Private IPS.
If you’re looking at class A, anything that starts with a ten in the first octet is going to be considered a private IP. In class C, anything beginning with 192.168.1.1 is a private IP address. The one that takes a little bit more memorization is class B because it goes from 170 216 something through 172 31 something. So on test day, CompTIA may try to trick you and say, “Which of these addresses is not a private IP?” And one of the answers might be something like 170 or 212 something.
And that address is public because it falls outside this range. Next, let’s talk about some specialised IPS, and there are two big categories we need to consider: COVID The first is a loopback address, which is 127 or something. If your address starts with 127, It is referring to the device itself, and it’s only used for testing, basically. One hundred and twenty-seven zero-one is the most commonly used loopback, and we consider that home or here. Now, automatic private IP addresses, or IPAs, are in the range of 169 to 254 something. This is dynamically assigned by your operating system when a DHCP server is unavailable and the address has not been assigned. So when we go through the whole DORAP process of discovering, offering, requesting, and acknowledging, if something goes wrong in that DHCP scope and we can’t give out an address, your computer would just crash, essentially. So what they did was they created this IPA that says, “If I can’t get a DHCP, I’m just going to pick my own address in this range.” Again, anything with a 169, 254, or something is acceptable.
Now, if you look at a computer and you can’t get on the Internet, for instance, what can you do? Well, if you run an ipconfig or Ipconfig, which we’ll talk about in Troubleshooting Tools later, and you get an IP address that comes back as 169, 254, or something that tells you it’s a DHCP problem, go check the DHCP server. Finally, let’s talk about how you can identify the network and the host portion of an IPV4 address. We talked about this briefly earlier when we talked about subnets. In the case of a class A network, it is so because of the IP address, which begins with a one and ends with a four; anything between one and 126 is class A.
And because we have a class-full mask here, we can see that it has a 2550, which is class-full for class A. Because it has 255 there, it means the first octet is going to be the network portion, and the last three octets are going to be the host portion. If we look at the Class B example, you’ll see it’s Class B because it’s between 128 and 191. Because it’s 147, the subnet mask is 255,254, which is suitable for class B. And that tells us the network portion is the first two octaves, or 140 712, and the host portion is 38 81. If I look at Class C, we can see that it’s Class C because it’s above 192 or higher, in this case 214, and we’re going to see that we have a subnet mask of 2255-255-2550, which tells me that the network portion is the first three octaves and the host portion is the dot.
Internet Protocol version four Data flows. So when we talk about the way data flows in a network, there are really three different ways that it can flow. When you’re talking about IP, IP allows for unicast, multicast, and broadcast data flows. Unicast is when data travels from a single source to a single destination. For example, if I am talking to you, multicast allows data to be transferred from a single source to multiple but specific destinations.
So in this example, maybe I’m in a classroom with three people, and I can talk to all three of them at once. Now, broadcast, on the other hand, is when data travels from a single source to all the sources on a destination network. So if you think about going on a radio broadcast, I might start speaking on the radio. I don’t know who I’m talking to; I just know I’m talking to a lot of people. That’s the big difference between unicast, multicast, and broadcast. Let’s look at them a little closer with some diagrams. With unicast, I have one server that wants to send messages to PC One and PC Two. So I put it into an envelope or a packet, and I send it out based on its IP address, from the server to PC One or from the server to PC Two. and you can see that here on the screen. Now, when I go into multicast, I can send just a single message and direct it to whomever I want it to go to as part of a multicast group. So my server in this case is sending out a message to multicast group number one at 239, two, one, three.
Now, when it gets to the switch, the switch knows who’s part of that multicast group. In this case, both PC One and PC Two receive the message. The great thing about this multicast is I don’t have to repeat the message twice, even if it’s the same message, I send it once and the switch will do the repeating. For me. This works very well when you’re doing things like broadcasting video using a service like a live stream, because I can send my message once to, say, Facebook, and then Facebook can multicast it out to all the users who want it. Following that, we have broadcast. And when you’re dealing with a broadcast message, this is when the server sends it out and says, “Hey switch, tell everybody you know about this message.” And by doing that, you tell it to go to the broadcast on the network. For example, on a standard class C network, that would be two 5525-525-5255. And so when it goes out to the switch, it’s going to send it to everyone it knows. PC 1, PC 2, and PC 3 in this case.
assigning IP addresses. So when we have our networks and they rely on IP addresses like IPV4, how do we tell our devices what addresses they’re going to have? Well, there are two different methods to use. One is by manually statically assigning them, and the other is by dynamically assigning them. When I use static, it’s a very simple process. I give it its IP address, its subnet mask, its default gateway, and its DNS server. But it is time-consuming because if I have 20 devices on the network, I have to go and assign them 20 different times.
And if you mistype the number, you’re going to the wrong place. It’s also impractical when dealing with large networks. Some of the networks I’ve managed in the past have had five, ten, fifty, or even thousand computers, and keeping track of all those IP addresses quickly becomes a full-time job for a team of people. And it’s just a waste of manpower and resources. Instead, we can use dynamic allocation. And doing that, we have a quicker method, an easier method, a less confusing method, and it’s very simple for large networks. In your home, you’re probably already using dynamic IP addressing. If you took your cell phone, you didn’t have to tell it what IP to choose; you just told it what network to join. And your router gave it a DHCPaddress by dynamically assigning one. Now, what are the components of an IP address? Well, whether you do static or dynamic assignment, you still need the same basic components. And there are four required components.
You must have an IP address, a subnet mask, a default gateway, or the IP of the router, and a server address for either DNS or Wins. DNS if you want to go outside your network and talk on the Internet, or Wins if you’re trying to stay inside your network. Remember that DNS converts domain names to IP addresses, so “google” becomes “8 8” or something along those lines. Wins is to convert your net BIOS name, like Jason’s PC, into a local IP address that other people can reach inside my network. Now, we can do the automatic assignment a couple of different ways, but the most popular is by using Dynamic Host Control Protocol, or DHCP. DHCP is based on an older protocol called the Bootstrap Protocol, or Boot P. Now, Boot P had a static database of IPS and Mac addresses. And so I could say, every time you see this Mac address, give it this IP that isn’t as dynamic as you would like, obviously. And so DHCP was a much better iteration. DHCP allows assigning an IP based on an assigned pool of addresses, so I can tell my DHCP server to hand out the addresses that are 192 dot 168, dot one dot 100, and dot one dot 200.
And that gives you 100 clients that you can assign, and every time somebody connects, it will borrow one of those IPS and be assigned to it. IP Management is a piece of software that’s used to manage all of these IPS that are managed here and assigned, so we don’t have to control it ourselves or keep track of it. But if we have an issue later, we can look in the logs and say, “Who is that 100 host?” And we can then figure it out using IP address management. Now, as we’re talking about DHCP, you have to remember that it’s going to give you all of those variables that you need, like your IP address, your subnet mask, your default gateway, your DNS server, your Windows server if you’re reusing one, and other variables needed for VoIP. All of this can be done through the DHCP protocol. Now, I know I’ve said this about three times, so that should be a hint to you that this information is important. You should understand what DHCP gives your clients for those four critical things. Keep that in mind for test day.
Each IP address is issued as a lease. It’s borrowed for a certain amount of time from the pool, and when your lease expires, it pulls that address back. Now, this doesn’t cause a problem for your computer, because if your computer is online longer than the lease, when it approaches the end of the lease, it just sends a message to the DHCP server and says, “Hey, I’m still using that.” Let me keep it. And they just renewed the lease. So it’s kind of like a library book where you can just keep checking it out over and over again if you haven’t finished reading it. Now, the second method of generating automated addresses is known as Pippa, and as we discussed in a previous video, it is used when DHCP cannot find an address to assign. So if there’s any kind of problem where the DHCP server can’t give out an address or a client can’t reach the DHCP server, you then have a computer assign itself what’s called an IPA address or a self-assigned address. In Windows, you’ll find that under the Alternate configuration tab under the TCP IP properties, this is going to pull an address randomly from the 169.254.0.100 scope. Now, this is designed to allow quick configuration of a local area network without the need for DHCP. So if I take ten clients and put them all on one switch with no DHCP server, they will default to using their own IPA addresses, which is perfectly fine. The only problem is that these are not routable outside the network. So we can talk about that switch, but we can’t get to the router. That’s the default issue that we have with Ipipa.
So if you ever have a computer that says it has a 169 address and you can’t figure out why it’s not connected to the Internet, that’s the reason IPAs can’t get past the router and IPA addresses are not going to let you connect to the Internet. The last one we have here is what’s called “zero configuration.” This is a newer technology that was based on IPA and will give you a lot of the same features as IPA and then some new ones, including assigning a Link local IP address, which is a non-routable IP used on the local subnet just like IPA. But it also has the ability to resolve computer names to IP addresses without the need for DNS. So it can communicate internally by using something called the Multicast Domain Name Server. So, even though this zero configuration has an IPA-type address, I can still refer to it as Jason’s PC. This will also allow you to locate network services on the local network using service location protocols like Microsoft’s Simple Service Discovery Protocol and Apple’s DNS-based Service Discovery Protocol to find things like file shares and printers on your local network. However, just like a PIPA, your zero configuration will not allow you to connect to the Internet or use services outside of your local subnet.
Computer mathematics. So before we go any further and start diving into subletting, we have to start talking about how computers do their numbering and do mathematics. So in this lesson, we’re going to talk about different numbering systems. Now, as humans, we like to count in what’s called “base ten” or decimal numbers. So when you count, you start at zero, then go to the second column and add one. And so it becomes 10 or 11, 1111, et cetera. And we just keep on going with that. So we only have ten choices for each place, zero through nine. Now computers and networks don’t actually understand decimal natively. Instead, it’s all based on binary, or base-two, numbering. It’s either a one or a zero, an on or an off. And that’s how computers understand things. So when they count, they go 011-0110 is actually the number two for us, but for a computer it’s 10.And so we’re going to have to learn how to convert things from decimal to binary and from binary back to decimal. And that’s what we’re going total about in this lesson.
Now when we convert from binary to decimal, we’re going to do this using this table on the screen. Now each number is a factor of two because each place can only hold a one or a zero. So, if we start on the right and work our way to the left, if I have one, that will take the place of one. If I have a 10 in the two and one columns, that will become two as we go along, and so on. And if you’re not getting it quite yet, you will by the end of this lesson, I promise. So let’s go ahead and give an example. Let’s say I gave you the binary number 1001-110 and asked you to tell me what that is in decimal. So we’d start filling it in the table from the right to the left. So we’ll enter that number from right to left, and it’ll end up being what you see on the screen here, and it’ll become 1001-0110. Now, any place that there’s a one, I’m going to add the number above it. So I’m going to add 128 plus 16 plus four plus two. And then when I add all that together, I’m going to get 150. So the number 1001-010 in binary translates to 150 in decimal.
See how easy that was? If you have the chart, it makes it very simple. And going from right to left on the chart, each position starts out with one position, then two. 4816, 32, 64, and 128 If I added up a one in every single position, the biggest number I could get is 255. Now why are we only carrying up to eight decimal places? Well, because when we deal with IP addresses, they can be any number from zero to 255. Because there are eight bits in each octave, it’s important to understand decimal and binary numbers in what we’re doing here as we move into subletting. So what if I gave you a decimal number like an IP address and asked you to convert it to binary, could you do that?Well, yes, we can take this 167 and convert it back down to binary, but instead of adding up, we’re going to be subtracting. And so what I’ll do is take 167 and start from the left. Can 128 be taken from 167? Well, certainly it can, and it’ll have 39 left over. So then I go to the next column, 64. Can I take 64 from 39? Well, no, there’s not enough there, so I’ll put a zero in that place. Can I take 32 from 39? Yes, I can. And that leaves me with seven left over. So I’ll put one in that column, and then I’ll look. Can I take 16 from seven? No.
As a result, I put a zero. How about eight from seven? No. So I put a zero; how about four from seven? Yes. And that leaves me with three. So I’ll put a one down in the fourth column, and can I take two from three? Yes, I can. So I’ll put one down. How about one from each? Yes, I can. And so I put one down. And this is how you convert a decimal back to binary. So you notice that when we went from binary to decimal, we added up the columns, but when we go from decimal to binary, we’re going to subtract the columns. But, in any case, you must have this chart, these two factors, memorized. So now that we have that example underway and we see that 167 is 1010-0111, how can I check my math? Well, I can just add up the numbers that have one, and if they come out to 167, I know I solved the problem correctly. So let us proceed to check our answer. 128 plus 32 plus four plus two plus one does not equal 167. So we did this math problem correctly. Now in the next lesson, I’m going to give you some problems, and we’re going to try doing these together and see if you understand the concept.
SY0-501 Section 1.1- Implement security configuration parameters on network devices and other technologies.