Transcripts
1. IP addressing: Course Objectives: Greetings, Welcome back to our networking course. In this particular part, we will be dealing with IPv4 addressing. In particular, we will try to understand how a logical address is assigned to a device and what's associated with the values that you put on that logical address. And we will conclude this course with a few examples and then a little bit of an exercise where you will complete a portion of it. Our learning objectives will be the coverage of some concepts into application, specifically how physical addresses are represented by using what we call Media Access Control addresses. And then we're going to delve into, and that is the core of the corners, logical addresses and specifically IPV4. From there, we will understand the structure of or the composition of an IPv4 address. And that will be two parts, network and host. And we will use masks to be able to identify or delineate the separation between these two sections. That is the network or the host. That will lead us later on to identifying IP addresses that belong to class a, class B, class C. And we will use for this course default masks to complete the hands-on exercises to understand how IPv4 is assigned to a device on a network. And how do other devices recognize each other within that network?
2. Hands-on demonstration of how to apply the addressing concepts: Welcome back. To see how we can put IP addresses within the context of a network. We will build a network that will have a specific network IP address. And for this example, we will choose 192, 168 dot 10 dot 0. And we will use the default subnet mask for class C, and that will be 255, 255, 255 dot 0. In this small network, the way we will build it, this time, we will interconnect, let's say three computers together using a hub or a layer 1 device. Okay? A hub is a layer 1 device, so it's at the physical layer. So it doesn't have any intelligence. It doesn't typically require configuration. There are some advanced hubs up there that you can configure. However, it does not hold the database within itself in terms of which device is connected to whiteboard. So that's going to be important in terms of what a hub does. And typically when a message comes through from one port, it floods all the others. So that message will be broadcasted to all other computers, connect it to all parts of that out. So we will test connectivity. That means once we connect all of these computers together and we configure them, we were run some command line instructions, mainly ping. And to see if a computer that's within the same network will respond. Which means we have a form of communication that is a channel between them where communication is feasible. And then we will investigate. What else? How do computers know that they have neighbors? And that's where we're going to look at the ARP table. We're going to run the command ARP minus a to look at the content of the ARP table within a device. That will complete most of the objectives that I want out of this, however, we will experiment at the end where we will add a couple more computers, where the device IDs or the IP address we will put, will belong to a totally different network. And we will see if the other computers can reach them or if they can reach other computers that are not within the same network. However, they're all physically connected together. All right, Well let's start. So what I'm gonna do is pick a hub. So I'm gonna go down here, pick my tool, just going to pick a regular happier. Okay? Now if I double-click on this hub began, you can see that it's a six port hub. Ok, and it's on. And we'll leave it here for now. And I'm going to pick up three computers. Let's go ahead and pick three PCs. And I pick this one, put another one here, and then put another one here. Now, let's think about this. The network we want to be in is 192, 168 dot 10 dot 0. Okay? So we know that 0 is a reserved IP address that we cannot use for a device. What can we use? Well, based on the mask, the last octet can be used for host 0 obviously is not, will not be used since it identifies the network. And we cannot use 255, since that would be the broadcast address. So what can we use? Well, then we can use one through 254. Ha, so let's pick for this computer right here. Let's go to its configuration. And let's go to it's Fast Ethernet. And let's pick the first address within that range. So that will be 192, 168 dot 10 dot one. That'll be the first available address within that range. Click below where it says subnet mask. Notice it automatically goes to the default class C subnet mask. Okay? We will do some exercises in the future where we're not going to use default masks. But for the sake of this example, this is a class C address. This is a device address. So that one is an actual device. And it has this mask that will put it within a specific network when you use the default mask. And again, in another lesson, we're going to learn about subnetting. We only have one subnet, which is the network is the subnet. For this example. That's when we use default mask, which means your subnet is your network. So you don't have two subnets, you don't have threes, four subnets, et cetera, et cetera. Okay. So you only have one, which is the network. Good. So now let's go ahead and do the second computer you now can we use to Sure. Can we use three? Absolutely. Can we use the last one? Yeah. Why not? Let's go ahead and do that. 192, 168 dot 10 dot. Can you guess what the last one is? S and D to 54. Okay, within the same subnet, one, subnet one network using the default mask. Excellent. So for this one now, we're going to use something in the middle. Okay, 10 is fine. So let's go ahead and config, go to Fast Ethernet. And we're going to do 192, 168 dot 10 Kotlin. Sure why not? That ten is a valid host within that range, within that same subnet, same net. Okay? Now, these computers are not connected yet. So we will pick. So I'm going to go here where there's a bottling boat light here, lightening bolt. So what we're gonna do is I'm going to use the lightning bolt to connect. Typically what I would want you to do is decide, are you going to use a straight through or a crossover? That's an exercise for another day when you have like devices and unlike devices, you're going to have to make that decision. For now, I'm going to do this for you and you could see that it automatically picks this, picks the straight straight through. Straight-through is the one that's not dotted. So that would have been the appropriate cable to pick. Okay. So you could have picked this one right here. We'll have done the same thing. So I can go from here. And notice when you pick the straight through, now it asks you which Fast Ethernet you want to start with. Well, there is only one on the computer, right? If you look behind your computer, typically you will have one Ethernet card, which means one interface for, for your Ethernet, right? So for your, for your to connect to the NET. So you put your RJ-45 interface there where the Cat 6, 7, whatever cable you have and you go from here and you're going to pick another Fast Ethernet port right here. A Fast Ethernet port 0 is already taken, so we're gonna take one year. There are six ports in this hub by the way. Okay. So you could have done straight through if you knew, that's the kind of cable you want it. If you didn't, then you can pick the lightning bolt, right? And just go from here to here. And it will do that for you. Now if we double-click on the hub a little bit, we can see that we have six boards. Okay? But it doesn't show you here physically what's connected. But if I hover over it, right, it shows that Fast Ethernet 0, Fast Ethernet 1, 2 and 2 are up, which means they're the one used. 345 are down. I haven't used it. Okay. All right, fantastic. So now let's go ahead and test for connectivity. Okay? So again, I'm, let me hover my mouse over one of the computers here. You can see that it has 192, 168 dot 10 dot one. That's the first one we set up. You're gonna say, well what happened to that? 255, 255, 255 dot 0. Basically the network mask. While it's there, it's that slash 24. Okay? Now remember 255, 255, 255 is 24 ones. And the rest of the bits are all zeros. The last octet. Okay? So that's why you have a slash 24. So if I hover over this one, they are using the same mask. They all should have slash 24. Let me hover over this one. Slash 24 as well. Okay? All right, so let me hover over this one. Look at the address. That was the last one within the range dot 254. This was the first and this one was somewhere, anywhere. Randomly I picked ten. Okay. Another observation. Notice IPV6 hasn't been set. This is not an IPV6 exercise. We'll get back to that. But one thing important is that there is a MAC address associated with that IPV4. If you look all the way to the right, you will see that there is a MAC address associated with that Fast Ethernet. So each one of these computers will have a MAC address for its network interface card. The one that lets you connect your RJ-45 to to the hub, right? So RJ 45 in a Cat 6 and RJ 45 on the other end, right? Using a straight through cable. However, your computers are going to be able to identify themselves from those physical addresses with also the logical addresses. So we're going to combine logical and physical in a minute when we test for it. So let's go ahead first and go to the desktop of the first computer and go to the command prompt. Okay? So I can from here also inspect what kind of IP address I have. Ip config. So IP config is a command that allows me to see What is, which is the port ID for my fast Ethernet. It's Fast Ethernet 0. Not only that, it tells me also that the address that was set or the IPv4 address that was set is this one. Now remember that slash 24 here. It doesn't use slash 24 notation, but it actually uses the mask. We have not set the gateway, we have not set any default gateway either. That is for another exercise. The Bluetooth interface also was not set up for this one. We will deal with that in another networking class where bluetooth is used. Right now, we're using TCPIP type of networking, so we're interested in IPV4. Excellent, So now, what else can we do? I could do this also, IP, config, another variation of this command, 0. Okay? And this one is a longer version of the command. Notice it's not done. It says More here, which means I hit the Spacebar to go down. But before I do any of this, notice, I have extra information that I wouldn't have had using just IP config. Notice here that I have the actual physical address. Okay? And along with the logical address, so we're going to hit the Spacebar and I get a little more information on the Bluetooth. So you have two sections here. The TCPIP kind of information identification plus the Bluetooth stuff. Okay? And in this case with IP config slash, all, we were able to see a little bit more information than if we had done just simply IP config. Okay, Excellent. So let's go ahead and now ping my neighbors. So I'm gonna go back here, go to the command prompt. And let me just go to the bottom here where this is. And I'm going to ping the last device that's actually their right, 192, 168 dot 10, dot 254. Okay, So I am pinging PC1. I am on PC right now. So let's see what happens. Okay, fantastic. So it shows that it did get a reply. And we have connectivity. Another way to see if indeed PC, now we're recognized PC1 and the future is to do this command ARP minus a. And sure enough, it registered PC2 as 192 168 dot 10 dot 254 with its physical address into what we call the Address Resolution Protocol table or ARP table. Notice it doesn't know about that ten yet. Right? So let's go to that 10, 40 percent and run art from there and see if we see anything having not Ran, ran pinging at all from this computer, right? So we're going to do desktop. Okay, So I need you to take notes and observe the sequence of events as well. And I'm going to do an ARP minus a. Now remember this is the first time I'm getting into PC2 and there are no ARP entries. Okay, So now let's go ahead and ping 192, 168 dot 10, dot 1. First. I will definitely get a reply. They're on the same network and they're physically connected. Now let's go ahead and do an ARP minus a on this end. And notice that it registered this time PC 0 with its logical address and physical address. Fantastic. Let's go back to PC 0. Sometimes in networking you have to go back and forth inspect, especially when you're doing troubleshooting. And let's go to PC. Here. And do ARP again. Notice when we did ARP minus a before, it only recognized 254, right? So let's see what happens here. And notice that ten now is registered, even though we never pinned that n from this computer. Simply put, it's because that 10 communicated with that one, then both of them now are aware of each other. So if you go to either one of them, you will find that 10 and that one, right? So excellent. So now that we see that these computers can talk to each other, what if I change the IP at all? Just add another computer that's go ahead and do another one. And right here. And I'm going to assign it an IP address soon as I connect this to here. So yes, you can put cables, but you need to assign an IP address. So let's go to config fast Ethernet. And let's give it an address that's not part of this network. For example, 192, 168 dot 11. That one. Yes, I am. Remember all your IP addresses have to be unique. So this dot one is not the same as the other one. Remember the other one had 10 dot one. This has 11 dot one. So it still is unique. But it's not on the same network, right? So here you go. Now, if I go to that computer and try to ping, so let's go to the desktop. Let's run the command prompt, and let's try to ping 192, 168 dot 10 dot one. Let's see if we can reach it. And you can see that it's unreachable. It's going to time out. Even though PC3 and PC zeros are physically on the same network. But they do not share the same logical network ID, which is 192, 168 dot 10 dot 0. They do not share that. So they can't talk to each other even though they're physically connected together. And remember, this is almost a direct connection since you're using a hub. There's no buffering on, no holding onto the address to be interpreted or anything like that. Okay, a hub again, is a layer 1 device. So it will not alter any of the frames being transmitted by any of the devices connected to it. It is up to the devices to manage the connectivity, to manage the databases through their ARP tables. And you can see that we've timed out. So that means every time we did an echo command or an echo or a ping, which is really an echo. We did not get a reply. Pc probably refused to reply. So let's go back to PC. And lips look at its ARP table. And let me just make it wider so we can see here. So nothing really changed there. It never registered 11 dot one, right? It will not accept it. It's part of the team players within this game or this network. Now. So now we know that we can't communicate between devices that have a totally different logical network address. Can I put another computer that's within the realm or the world of the other network. Let me is technically what I'm doing now is I'm going to create two distinct networks. This single physical network, two distinct logical network say is, this is not the way to do it in real-world, but it's doable. So let's go to this computer here, and let's set up the Fast Ethernet. And this one, I'm going to set it up as 192, 168, that 11 dot to use the default subnet mask. That's fine. And then let's see who we can reach. And we could do ping 192, 168 dot 11 dot one. We should be able to reach anyone within our same network, which is 192, 168 dot 11 dot 0, right? So there is a device within that network. So again, the network is 192, 168 dot one dot 0. The device we're trying to reach within that network is 192, 168 dot 11 dot one, where within the same world since I M dot A2, right? So IP config. You can see that I am D2, so we're in the same domain. Okay, Good, Excellent. So stay tuned for the next lesson.
3. What is a device within a network?: Let's try to understand the relationship of a device vis-a-vis the network that it belongs to with the main objective of understanding how addressing is configured and that is internet protocol addresses or IP addresses. So initially let's go ahead and look in the idea of a device that belongs to some sort of a network, right? So you can think of this device as a person in a room, and that person belongs to that room. Which means there is a possibility of having another room where the person as well that belongs there. Now, what is a network? Well, in that room, let's call this one room a, and this one room be, let's say room a. We have three people. Okay. And then network, that means they can communicate with each other somehow. Okay, in room B, you might have something very similar, okay? And the way of communication could be done in this manner as well. Okay? So we can see here physically, the way they're connected could be also described as another methodology of networking. But our objective right now is to focus on the device. And how do we identify this device within room a or this device within room B? So a room. Let's start here, is basically your network. The network. These three devices, little a, little b, and little c belong to. Network B will be for w, y, and z, right? So these w, y and z individual devices belong to network B. Okay? So now notice the letter I'm using here. Okay? So this isn't theory. So the real identification of a device isn't done with a letter a, B, C. It's done with something a little more concrete, such as an actual physical address that describe or ID that describes this device. And that is typically recorded as the MAC address, which is Media Access Control address. Okay? So that is a physical address. What do we mean by physical address? It means that it's already etched in this device. When this device was built by the manufacturer of the device, the MAC address was already put in to identify this device vis-a-vis others. So that means a, B, C, or w, or z or y. Universally all have unique MAC addresses. We will go over MAC addresses in another lesson as to how it is assigned by the I Tripoli and how basically how it's broken down. It just gives you a quick idea. Typically it's a 48 bit address. So it's 48 bit to represent an address. And it's typically split into one is to identify the device itself. And the other section to identify who manufactured this device. Okay? There are some other bits in here in this section here also then indicate what kind of device this is as well. Okay? Now, an idea of this, your computer, the network interface card, the NIC network interface card within your computer has a MAC address. Okay. So, well, that's great. But this device a, maybe let's say I take it out of here and put it here. I can, a computer can move from one network to another and connected here it will still have address a as its own internal address. So the physical address does not indicate what network it belongs to. So we need a different schema. We need an ID at that combines the physical device to its network. And for that, you need what we call a logical address. Okay, so the MAC address, let's recoup here again a little bit. Is your physical address. What we need now is a logical address. So just similar to what we do here with the MAC address, we're going to have two sections for the logical address. One that identifies in the network, in one that identifies the host. So n is four network. So when I say one, I mean a section of bits representing the full address will be reserved to represent either the host or the network. So in our case, it's just a matter of agreeing how many bits total, just like the MAC address, we need for a logical address. Okay? Now, if we're doing IPV4 or Internet Protocol version 4, then the total number of bits you're going to need is 32 bits. Okay? And this line here, which mean some of these bits of the 32, We're represent the network. And some of these bits remaining, we're represent the particular host that you want on that network. Well, let's look at b for example, and let's do that. So B has a physical address. Let's say B is the physical address, okay? What, what we need also is we need to add to that be a logical address. So what we're going to put in here is network a as a content. And then let's say we call this computer one or two, and this one is one, then two would be the representative of B. Now this is in IPv4. If we have means, this address for the host is also a logical. So two dozen is not exactly be bit by bit as 48 bits. 2 is just a number that can be accommodated within the space left here from the 32-bit that you've used up for the network. And the rest of it was used by the host. There is another technique and that would be IPV6. And it uses the same schema. So we'll have network and host. Except for the host part. You might as well use the MAC address in there, which means go ahead and identify. So if we're doing IPV6, identify the network and identify the actual device within that network. So this would be IPV6 schema. This would be IPV4 schema. So IPV4, all logical. You, the administrator will decide what the host ID will be. On IPV6, the host ID is tightly related to the actual physical address of that device.
4. The Structure for a logical address: Okay, so we've seen a couple of things that I mentioned, IPV four and IPV six, okay? There are other Internet Protocol addressing schemes out there. Depending on the network platforms you're using. In the ancient world, they used to be, we used to have Apple Watch, Apple Talk. We used to have. So it has its own networking scheme. We used to have ipx, SPX stack, which was from Novell and so on. But these two are supported by TCP IP stack. So again, we will discuss this when we get into something called the OSI model. So that's a lecture all by itself. But just keep in mind what our focus right now is on Internet Protocol address version for an Internet address Protocol Version 6. Okay? This one is 32 bits as an address. Now remember this is a logical address. This here will be a 128 bits. Now this one is a combination of logical and physical address. No matter what. They all are broken down in this manner, where the network is represented in the first bits starting from left to right. Then the rest of the bits here are to identify the host. If you using IPV4, then the host is a logical address. If you're using IPV6, then you incorporate the actual physical address as a host ID. Now, what we need to do is figure out what do we put here and what do we put here to represent a device within a network. So if this network is called n and the device is called D, then what we end up with is something like this, n and d. Now d here could be either a logical address. If you using IPV4, which means you're the administrator will set that value. Or it could be a physical address which is automatically set up by the MAC address of this device. So to really get an idea how this work, we will concentrate on the 32-bit version of addressing. Then we will spend time on the 128-bit version at the end of this lesson. So we have 32 bits. So when I draw this, this is just a configuration, a rectangle where I can put all my bits here. I need 32. So think of it as a container, 32 bits to fill this container. If I had to put 32 bits straight up like this. So it will be very complicated and I could miss a one or 0. And things can get really tricky. So what we do is we actually break this into what we call octets. Octet is a bit. So an octet is eight bit. So what we have are four octets. So we end up with four octets. And what do we need this? So we can represent a 32-bit address with 0s. And you probably have seen these in your devices, either your phone, your TV, your computer, what your IP v4 might look like, and something like this. 192, 168 dot 0, dot one for example. Well, each one of these is represented in one of these octets. So that means the 192 will be here, the 168 will be here, the 0 will be here, and the one will be here. And you say, wait a minute, none of these numbers are binary. Indeed, they're decimal base. However, what we're saying is within this octet, which is eight bits, we need to know what is the equivalent of 192. For example, what is 0 in eight bits? While it will be something like this. What is one in eight bits? Then it will be something like this. And again, we're gonna go through this and show you how to convert. From binary to decimal, and it's a one right there. Now to do 168, 192, I'll have to do some calculations, but it will be a combinations of ones and zeros to represent 168. And it'll be a combination of one of the ones and zeros to represent 192. That's what your computer consumes. You, the administrator, right? Write it in human language, which is in this format. Your computer on the other hand, will consume it as binary value. The fact that we're bringing it up, we're breaking it down into octet is just for ease of notation. But at the same time, it's very convenient because we can break all are addressing based on octets. For example, we can reserve two octets for our network. In that case, for this particular example would be three octets for the network. And this here represents the host. For this particular example. We're going to talk about network mask in our next lesson. So for now, take my word for it. These three here for this tick kind of address. These three here will be for the network. And this one here will be to identify the host. So if you look in at it, you only have eight bits to identify the host. So two to the eight, It's 256. We're going to find out that does not mean you have 256 possible hosts. We will go through the math of this. It means really you have 254 possible hosts within any network that you define right here. So you're gonna say, okay, if so I'm missing two here. And that's what we're going to learn about the broadcast address and the network address. And again, that's for the next slice. So at this stage, we understand that we have a 32 bit address broken down into four octets. Each octet is eight bits that represent some sort of a decimal value that you can put an express with eight bits. Now, just to be clear, what is the max value you can put in any of these octets. Since you have eight bits to represent any number or possibility of numbers, then the highest value you can put here, starting with the lowest is 255. Well that is combination of 256 possible values. Okay? Now you didn't say Okay, well, but if you have 254 possible hosts, That's great. That means this is 0 value and this 255 value will not be used to identify a host. Okay, so anything in between we're going to be able to use it for identifying a host, will get to see that this will be used for identifying the network and this to identify the broadcast domain. And again, we'll get back to what is exactly a broadcast domain and what is a network. Stay tuned for the next lesson.
5. Network and hosts bits: Let's investigate the composition of an IPV4 address. And let's go ahead and draw the container that would have 32 bits to represent an IPv4 address. Out of that, we will split this into two sections. One to identify the network a particular address belongs to and the host that belongs to a particular host or device within that network. So this line here delineates these two sections, which leaves us with some bits here, reserved, the network, let's call it little n. And then some bits here reserved for the hosts, and let's call it little h. Now, the significance of little n and little h will become apparent once we need to analyze a particular IP address to figure out what are the possibilities in terms of how many possible networks are in there and how many possible hosts are in there. Or which network are we dealing with? And which particular host are we dealing with? Or other questions we may have. What is the network? What is the broadcast domain this network is handling? Or broadcast domains if there are several. And so there are questions to be answered. So there is one piece of information that's needed to create this line right here. And that will be called the mask. So you need a mask that actually creates this line for us. So what does the mask do? What think of the mask as another 32-bit piece of information that says this is where the line should be. Or maybe the line should be right here, or the line should be right here, right? So with a mask, we're able to move this given a specific IP address. So that means I have less or more n values here. Same thing with H in any of these scenarios. So a mask again and is another piece of information that you add to the IP address. So you need an IP address plus a mask to identify exactly where within that IP address, you're drawing a line that splits the two sections for you. Where you were, you know, which one is reserved for the identifying the network and which one is reserved for identifying the host. Okay, now let's look at the possibilities. As far as little n and little h. And let's write a rule right here. So for the number of networks, number of networks that will be equal to the base 2 since these numbers will all be binary. So the base is two. Why? Because you have ones and zeros from here to here, right? So if you have, let's say eight bits, so n is eight. So two to the eight will be your number of networks or possible networks, which will lead to 256 networks. Well, if you had eight bits here, that means h now is 24, right? Since you have a total of 32. And the number of hosts is kind of similar except for one small exception of hosts will be equal to two to the h. So very similar here, but we're going to subtract two. And the reason for that is we're going to have two reserved addresses that we cannot use to identify hosts. So one will be. For identifying the actual network. And another address will be to identify the broadcast domain where that device belongs. So for instance, let's do an example. Let's say I have an IP address, 32 bits total. And I have a mask that says out of that address, I want eight bits to be reserved for host. So that means my host will be here. And I want my 24 bits here reserved for the network, right? So you have the IP address plus the mask. And the mask allows you to draw the line. Where do you want to identify the host section versus the network section. Okay? So the IP address itself doesn't do that. You need a mask to draw as nine, okay? For this particular example, the number of networks will be equal to two, the 24. So that's a lot of networks. And number of hosts will be equal to 2. The a minus 2, which will be 256 minus two, which is 254 possible hosts within any of these networks. So you have two to the 24. You can pick any one of these networks. Within each one of these networks, you have 254 possible hosts. Okay? Now how do you identify these hosts? Well, if you have a bits to represent numbers, right, in decimal, so you're going to convert, so you're likely your lowest number would be a 0. Your highest number will be 255 combined, all of this is 256 except this will be reserved, and this value will be reserved. The ones available to you will be 1, 2, all the way up to 254. These would be valid, what we call valid host values. This here will be used to identify the network. And this here will be used to identify the broadcast domain, which is part of our next lesson. Okay, so again, let's recoup here. So what do we have? We have 32 bit address. You need a mask to be able to draw this line here because the IP address in itself does not dictate where that line is going to be. So you'd need another piece of information called a mask. And the mask is basically going to be, it was going to look like an IP address can have ones and zeros. But its job is to say where is this line? Where do I go on the IP address and see which bits were reserved for the network, in which bits were reserved for the host. And from there, I can do my basic calculations in terms of how many networks are possible with that IP address and how many hosts are possible with that IP address. And L1. If you are given an IP address, you're going to know where does it belong since that IP address is for a particular device, we're not looking at possibilities. We just want to know where does it belong, which means, which network does it belong to and which broadcast domain doesn't belong to.
6. Binary to decimal conversion: What we will learn is conversion from binary to decimal. That's going to be important if we're going to write IP addresses in a language that most humans will understand. But internally we know that the computer would read it in binary. Now remember, we had a 32-bit address and we would like to this time break it down into octets. Octet means we have chunks of eight bits. Okay? We're going to be doing that with the actual address or the IP address for the device. And also remember the mask will also have the same feature. So that means we were represent the content of an IP address or a mask using octets. So we would have four octets where each octet has eight bits to represent a total of 32 bit address. Since 8-bit seems to be the common resolution going from one section to the other. Why don't we learn how to convert at least with eight bits. Okay? So if we're dealing with binary, which is base two, then the, let's say we have a binary number 1101101. Okay? Now let's count how many digits this is. 1, 2, 3, 4, 5, 6, 7. Now, if we want to fit this in any of these octets, we want to put it in any of these octets, then we'll need a bit, so we will have to padded with zeros in front of it. This is called padding. So adding a 0 on the left side does not alter the value that we were trying to represent. Now, let's do another example. Let's say I had 1110. And I want to put it in an octet. Again, you can padded with four zeros and it will retain its value. Okay, Now that we understand that, let's go ahead and learn how to convert. What is this in decimal? What is this in decimal? Because in the end, you will enter IP addresses using decimal values. Okay? All right, so notice now that each bit represents a weight, just like in decimal numbers. So if I had 928, right? As a base 10 or decimal value, then this here will be the ones. This we're here will be the tens, and this here will be the hundreds. Now, what do we mean by ones, tens and hundreds? These are weights. Okay? So what is the weight for this column? That would be the base to the 0, position 0. What is the weight for this column? That will be 10, the base again to the one. What is the weight for this one? That would be 10 to the 2. Okay, So to reconstruct 1928, you will take the weights and multiplying by the content, each one of each column. So you will take nine times 10 to the 2, plus 2 times 10 to the 1, plus 8 times 10 to the 0. Well, let's find out what that is. 10 to the 2 is 100, so that's nine times 100 plus 2 times 10. Since 10 to the 1 is 10 plus 8 times 1, anything raised to the 0 is one. So what does that leave us? 900 plus 20 plus eight. And what is that? That's 928. So we went full circle from this value back to here. But the point is, we now understand that each one of these has its own weight. It's the same thing in a binary number. This will be the base 2 to the 0 for the weight for this one, this would be 2 to the 1, 2 to the 2, 2 to the third, two to the fourth, et cetera. Now, what we would like to do is to be able to express values up to at least eight bits. But Let's go ahead and solve for this one just so you can see, how do you solve for this binary value. To find out its decimal equivalent. What you will do is you'll take two to the third. So whenever there is a one, you're going to add them up two to the third, because that is really two to the third times 1 plus 2 to the 2, right? So times one again, sorry if you're multiplying by 0, then it's 0, so there's no need to add it. So plus 2 to the 1 times 1, right? So what is that? That is eight plus four plus two. Well, that is 14 based in so 000, 0, 0, 1, 1, 1, 0 is an eight-bit number, represents 14 in decimal. So if I had an IP address, for example, something like this, 192, 168 dot 10, that 14. And let's say my last octet was 14. What it means really, what I've stored at that location is this value 0001110. That is what your computer will read or your router were read or you switch would read. Okay, So then you need to convert this one to binary. While this one would be 0, 0, 0, 1, 0, 1, 0. Then you need to convert this one, and then you need to convert this one. Well, to be able to do these conversions, we need to understand, okay? What are the weights at least up to the eighth location, right? So from 0 to seven as far as the exponent for the weights. So we need to understand what is 2 to the 0, what is 2 to the 1? 2 to the 2. Two to the third, two to the fourth, two to the fifth, two to the six, and the seven at minimum. Okay? So that would be 4, 8 bits. So what is the value for each one of these? Remember anything raised to 0 is 1. So we have one right here. This would be two, this would be four. This would be 8. This would be 16. And you can guess this would be what? 32. And this here will be 64, and this here will be 128. So at minimum, we need to be able to convert up to eight bits to be able to do these calculations. Okay, so let's do another example. So let's say I have 1101011 as a value that I need to put in one of the octets. Well, let's first count. How many bits do we have? 1, 2, 34567. So we need to pad it with a 0 to fit the octet. Then we will look at the weight or the weights that we have here, right? And multiply it by that one. So we know we have a one here, we have a two here. We're going to skip this one. We have an eight here, we're going to skip this one. We have a 32 and we have a 64, and we're going to skip this one. So you're going to add 64 plus 32 plus 8 plus 2 plus 1. Defined what this value is. Okay? So 64 plus 32 plus 8 plus 2 plus 1. Okay? So let's do a quick calculations here so that we know this is 10. 10 plus 32 is 42, and then we have 64 plus 42 plus one. Okay? So what do we have here? So we have 76 plus four is 10, so this will be one or seven base ten. Okay? So if you had to do something like this, 192, 168 dot 10, 7, that 14, that what you're storing here for the 14 will be the same value we had before. And here you would be storing, okay, which is this value we had here. If your IP address was structured in this manner, then it's a matter of converting 168 and 182 into binary. Now, you can, out of this, figured out what 168 in 192 is. What you need to do is add enough values from here to come up with 168 and Arthur come up with 192. Okay? Another way to do it is to convert from decimal to binary. Okay, so for the next lesson, we're going to learn how to convert from decimal to binary. And we'll get to see a technique to do so.
7. Decimal to binary conversion: We will convert from decimal to binary. So initially, let's make sure that we understand the conversion as laid out here, right? So based on the weights for any binary value and what is its equivalent in decimal. So this would be based in values for any binary number that you put together, based on the value for each column or the actual weight for each column, right? So we want to work backwards. So let's say I had an IP address of 192, 168 dot 10 dot three. And we want to know how is this stored in the computer or how does your computer reading what we know that each one of these octets, remember this will be represented with eight bits. This also will be represented with eight bits, eight bits, and eight bits. So we need eight bits for each one of these. Let's call it an octet. And we want to represent three in binary within the confines of eight bits. Okay, so that's how an IP address will be stored. So for example, to do this by looking at these values. So we're going to do a conversion from decimal to binary. We can add some of these columns together to come up with this value. So how did we add up anything to get to three? Well, we can see the last two columns, 21 will add up to three. So that means you're going to have to turn these on. But remember, since it needs to be in an octet, so it has to be represented by a bits. So that leads us to 1234567. Actually these are eight bits. Let me see here. Four here and four, right? So that's your three, right? So we have 11 turned on. How about 10? What is 10? Well, 10 is 82. Okay, So how does that work? That means we're going to do something like this. 0, 0, 0, 1, 0, 1, 0, 8 and 2 turned on. Excellent. How about 168? What does that? What happens if we add 128 with 32 and eight? Okay, so that means we would have a 10, 101000. Now let's double-check and make sure that is indeed 16, 8. So this is 128. This here will be 60, this would be 32 and 64. And this one here would be eight. So let's pull out our calculator. You get 128 plus 32 plus 8, and that gives you 16, 8. So this whole value here is 168 base ten. Okay, How about 192? Well, what happens if you add 128 with 64? So you pull your calculator 128 plus 64 gives you exactly 192. Okay? So how would you express it in binary? Well, since they are the two most significant binary digits that are laid out. So we're going to go ahead and do that. Then the rest are zeros. And that will be the representation of 192, 168 dot 10, dot 3. Now there is another technique in converting from decimal to binary instead of using this method here. So how does that work? Well, you can take any of these values and divide it by two. And then keep on dividing by two. And then the division has to be an integer division. And we will keep track of the remainders and the last result. So let's take 10 for example. And let's divide that by two. So ten divided by two will be 55 times two is 10. 10 times 10 is 0, so the remainder is 0. We keep dividing by the base or two until the value we reach is below the base. So we're gonna take, divide this by two. While we have two, twos in five. So the remainder is 1. We're going to have to divide again. Remember what I said? You need to reach a value that is less than the base. So we're going to have to divide two by two. That is one and the remainder is 0. Now notice here, this is your last result. This here will be called the MS b, or the most significant bit. And this here will be called the LSB or the least significant bit. So how do you read it? You're going to read it backwards like this. So you're going to start with this 11010. That is 10 in binary. Okay? So can we convert it back from binary to decimal to prove that? Sure, this is two to the 02 to the one. So that's a 22 to the third. Two to the 22 to the third. That is an a. A, a plus two is 10. Now, if you're half to store this in an octet, you will pad with four zeros to have a total of eight bits. And indeed, that is what we obtained here. So as an exercise, go ahead and take 168 divided by two all the way and start from the MSB as your most significant bit. And where the LSB here will be the least significant bit, right? So this one will be here, and this one will be right here. And then pad, when needed to reach eight bits. So that is the one of the techniques on how to convert. So you could use this method right here, or you could use this method right here.
8. Network Mask: Let's work with an example where we have an IP address, 192, 168 dot 10 dot 3. Now we know we need another piece of information and that is the network mask. And the reason for that is that because we need to know which of the bits that belong to the IP address will be used to identify the network and which bits will be used to identify the host. So in our case, we not only need an IP address, but we also need a mask. So we need to add a mask. Okay? All right, so what is a mask going to do exactly? Remember when you put a mask on your face and it's got two holes for the eyes, for example. That means you're masking all your face except for the eyes. It's the same principle. So the idea behind it is to be able to use the mask to identify the network that we need and filter out or filtering the eyes, for example, or in our case, the host or the host portion. So let's work a scenario first. And in this case, let's say I have an IP address. This IP address I hear, and I have four octets, right? So I have 19 to hear, 168, 10, and three, right? And let's say I decided that I really want this to be for the network. Three in particular is host number three within that network. So this would be the host. What it means is if I have a network and I have a host here, then this will be hosting three within this network, 192, 168 dot 10, dot 00 here identifies the network that we're dealing with. This whole network is 192, 168 dot n dot 0. Now remember 0 cannot be used to identify a host. Remember that 255 as well cannot be used to identify a host. So this is a special address within this network that identifies the actual network. What other reserved address we have we know of that we cannot use to identify a particular host. This one, 192, 168 dot 10 dot to 55. So remember to 55 and 0 from our previous lessons are reserved for these two particular cases where we identify the network and where we identify the broadcast domain. Which means if you were to send a message to and you want to send a message to all of these devices within this network, you can use this IP address. So it's not an address for one particular device, it's for everybody within that network. Three happens to be a particular one because that's our strategy. This is what we want. We want three to represent a particular, a specific device. Now the way you will enter that IP address in the device manually or dynamically if you're using some sort of a dynamic addressing. But in your case, we're going to be doing an example where we're going to enter this manually. You just enter three. You enter this 192, 168 dot 10. Dot a3 is the IP address plus a mask to let the computer know that is exactly what you're doing. That you want this three. Your intent is to make three the actual host. Okay? And your intent is to make this your network address and to make this your broadcast address. So the mask is going to be extremely important to let the computer or the device know this needs to be done. This needs to be done, and this needs to be done. Okay, Good. So what do we want? So, we want, now remember if you multiply anything by one, it remains the same. If you multiply anything by 0, it becomes 0. We could use those bit masks to filter out what we want. So the idea here, if you want all of this, all of these bits to remain the same, then you will be multiplying by the mask as 11 bit by bit 1111, and you enter the mask in this manner. Now, obviously will be entering the mask in a decimal format. But right now I'm showing it to you in binary. 1, 1, 1, which means we are trying not to alter these three octets right here, except this one. We want all zeros here. Remember the eyes. Okay? So we want to enter a mask in this manner that will create this scenario for us. Which means the last octet in our case would be reserved for the actual identification off the particular host within that network. And let's see what happens when you multiply this mask by this IP address. When you do that, when you multiply these two together, you end up with 11 000, 000, 000, 000, that 1010. Remember I am multiplying bit by bit vertically. So I am still getting my first three octets. Nothing got altar there. However, the last part became all zeros since you're multiplying by all zeros, right? So let me make sure I have the right number of zeros. Yep. Yeah, I do. Now, you convert this back to decimal. What do you get? 192, 168 dot 10, dot 0. This identifies the network. So by using a mask that makes sure that we're not filtering out these three octets, identifies this particular network, which we have right here. Okay? So that means this octet. If you were to change numbers in it, what are the possibilities? We know we can go from 0 to 255, while in-between we can have 123, et cetera, until 250. For these here you could use for particular hosts. It just happened that we picked host three out of that range. So valid hosts are going to be from one to 254. Dot 0 here will be reserved to identify the network. 255 will be used to identify the broadcast where this particular roast dot a3 belongs.
9. Default Masks: Let's continue with our example using this address 192, 168 dot 10 dot 3 to identify a specific device or host within a network. Now, as you recall, we needed another piece of information, which is the network mask. So we need a network mask. Okay, or simply the mask to identify the network this host will belong to. So remember we did that in binary. So that means every octet we masked, we masked with ones or multiplied by ones for the network portion and zeros for the host portion. We're not going to technically enter masks in binary, so they're going to be entered using decimal notation. Just like we write IP addresses during configuration of a device, it will not be done in binary, in decimal values for each one of the octets. Okay? So if you have all ones for one octet, that would be 255. Remember the first octet, the leftmost where all eight ones, the next one. We're all eight ones as well. And then the next one, we're all eight ones as well, except for the last one, which was simply as 0, right? So this means I have eight ones in this octet, eight ones in this octet, eight ones in this octet, in eight zeros in this octet. By multiplying these two together, you end up with 192, 168 dot 10 dot 0. And this identifies the network. So it will be this network. So we use the mask to identify the network. In other words, it's picking up on these three octets, right? Since we're multiplying all these three octets by one and the last one by 0 as the network identification. So we're still using a structure where some of the bits represent the network and the remaining bits represent a host. Okay? All right, so now that we've seen the format, how a network mask is entered, Can any of these values change? The answer is yes, as long as. So let's go back to the binary value for this 11111111. Let me just count properly here. I've got four ones except for one. And let's say I have another one. Okay, and then I have another one. And then we were left with eight zeros right here. So my point was, can we change these values? Yes, but you cannot have, for example, as 0 in the middle of these bunched up once. What you can have is maybe something like this where this is the same, this is the same. This is the same. In this manner. Maybe a 0 here. And then the rest are zeros. As long as zeros are together, bunched up together, and ones are bunched up together, then you can do that. Which means for our network mask, as long S or let me just abstracted in a container, put a line here. So all of these will be 1s and all of these will be zeros. Okay? So you're going to put zeros on the left side, in ones on the right side. And you can move this line here. Moving this line means you're simply, you could change this to a 0. So now the line is here and these belong to 0. Or you could go the other way around. These could be 111, then this is the network and this is the host. So as long as you stay consistent, which means everything on the right will be ones with no spaces for zeros in between. And everything on the right will be zeros with no spaces for ones in between. Then that would be a proper mask notation. Okay? Now, this leads us to special kind of masks. And we're going to call these default. So default masks. These are special. These are for classful addressing. And let me write them up. So the first one is this. So what's particular about this? That means the first octet is all ones. Could we have had less than 255? Absolutely. As long as all your bits on the right are all ones. But that would not be a default mask. So all your default mask will reach this dot here with all ones. So the next one will be this one. So these are particular ones where full octets are covered with ones. And then the last one will be this. These are called default masks. Me just write it plural here. So what does it mean? It means the first eight bits of an IP address that you apply this mask two will be for the network and the last three octets will be for the host range that you want to handle. Which means this is great for scenario where you have a limited number of networks, but you want more hosts per network, okay? This one is 50 percent, so that means you have two octets to represent networks and two octets to represent posts, right? So that will be two to the 16 minus 2 number of host and two to the 16 number of networks. So these are the possibilities with these default masks. Lastly here, this one in here. That means you have 24 bits to represent any network within that range. And you have only eight bits to represent hosts. So in again, with eight bits, that's 256 combinations. However, remember we always subtract two.
10. Network Classes (A, B and C): Okay, So the objective of this lesson is to understand how IP addressing is classified. Mainly we're going to be looking at class a, class B, class C, D, and E. Okay, so we know that for an IP address, which is a 32-bit address, right, is subdivided into four octets. So if we have a 32 bit address, we like to break this down into four octets. And then we express these values instead of binary. We can express them in decimal. But we know internally they're stored in binary. What we're going to find out now remember we covered the default masks we could use to identify out of all this, which portion will be in the network and which portion will be the host, right? And we've done the default masks where if we map to the first octet, then the other three octets will be for the host. And that was using a default mask of this is plus a default mask off to 55 dot 0 dot 00 as a review. So this is an IP address. This means the first eight bits are used to identify the networks, possible networks. And these 24 bits are used to identify the possible number of hosts. So same thing with the other subnet mask we used. We picked up. So let's break this down into octets. And this time we picked two of these octets to identify the network. And again, this is an IP address. And so in this case we have 16 bits for the networks and 16 bits for identifying the host. And the mask was written up this way. Okay, So these are the masks to accomplish this goal against an IP address. Okay? The last one we looked at, we use the first three octets and delineated right here. Where all these three were used to identify the network. The last eight bits were to identify the host range for ourselves. So we've got to 55, 55, 255, dot 0. These were the possible masks. Now what we're going to see and these particular mask are called default mask. Default mass for whom? For these particular patterns. And we're going to find that these are going to be classified as class a, class B, and class C. The key now is how to let the computer know that's what you're doing. Well, one thing is, depends on the mass we're using. Well, those masks are default mask only if you're using class a and class B. So we need one more piece of information that definitely says we are using a class a or class B or class C. Because we could use these masks on a classless setup, which we will be reviewing in another lesson. So for now, let's focus on these particular classes. So how does it work? The way it's gonna work is you will always use the leftmost octet value to pinpoint which class you belong to or that IP address belongs to. Now, if you have an octet, the possible values you can have with eight bits is from 0 to 255. So out of this range, for particular octet, we can break it down into sections and say, Okay, from here to here will be a class a, class B, class C, et cetera. Remember I mentioned that we're gonna be seeing in class a, B, C, D, Any, these will be the classes we're going to be seen. Now. In practical terms, when you're dealing with networks. These are the classes you will be using if you're using class full addressing. Okay? So D and E will not be used for specific IP addresses that we're going to need in our course for networking. Okay? So, and I'll explain again the purpose of D N a when we're ready. So as I mentioned before, the first octet value determines what class a particular address might belong to. And here's the, here's how it works for class a. In binary, you want the most significant bit to remain 0. And that's for the first octet. So octet one, which means your first value, is all zeros for octet one. Which is really this value right here in decimal, right? So this is here in decimal, and this here is in binary. So keeping the most significant bit at 0, my next combination would look like this. This is counting in binary. My next combination would look like this, et cetera. Where are you going to stop? So this will be the first value for class a and it will stop when. So we're gonna keep going like this and keep the most significant bit at 0. What happens is you will fill in all of the other bits to one, because now we're ready for the next higher number. So this will be the last value within that range for class a. Because what happens after that? Well, if you add a one to this and now remember we're counting, so we're adding one as we go down, right? So if you add a one here in binary, addition, 1 plus 1 will be 0, carry a 10, carry a 10, carry a one, and your next number will be 10. And everybody else is at 0. So that would be the next highest number after this. But remember as a rule, we said that we want the most significant bit to remain at 0, and we're going to group all of these as class a. So what is the first value? Well, that's a 0. What is this last value? If you convert this from binary to decimal, you will obtain 127. So for class a, the first octet will go from 0 to 127 as possible values. So if I get an address that looks like this, ten dot, one, dot 200 dot one. By looking at the first octet, I know it's within 0 to 127, then this is a class a. And if it's a class a, and I want to use a default mask. Mask. Now, if you want to use, you could use default or non-default. But if you want to use a default mask, then you could use this one here. For class a, where you will be masking the first eight bits are the first octet. So that will remain there to identify your network, which frees you up with the other 24 bits to identify the range or possible hosts that you can have for any network you choose from this range. Fantastic. So what's the rule? For the next range? Now remember, the next range is going to be a class B, a. And notice here what I'm gonna do is I'm going to highlight this. I want these two to remain the same. Well, if you're counting up 10, the next count after this, Is this. The next count after that will be this, et cetera, et cetera, until you reach the last value. Where so dot, dot, dot, dot, dot.me. I've counted a lot of times here until I reached where all of these values turn to one. Because what's going to happen after that is you're going to be carrying a if you add a one. So for the, So this is my range, total range. So if I add a 12, all of this, then what I will get is 0, 0, 0, 0, 0, 0, 1, 1. That will be my next value. Okay? So from here to here, I was able to maintain that 10 as my last two significant bit. As soon as you added the last one out of this range, the pattern has changed. That's another range we're going to be talking about. So what is this value? This value, we added one to all of this to get here. So we added plus one to this value right here to get here. So that is 128. And what is this value? So if you convert this binary values to the last value or valid value for the most significant octet for class B will be 191. So for this range, we're gonna go from one 28 to 191 for a class B. Okay, So how about a class C? What is it we need to maintain as our most significant bits? Until we switch over to another pattern. We're going to pick all of these three. We want to keep this as much as possible and then that will indicate that we're in a different range. So our next number after this. Oops, this should be on one. Let me just erase here. So we're adding one. Remember, every time you go down, you're adding one. The next number again. Okay, et cetera, until we reach. So remember, I want to keep this pattern right here, just like I did with this one. I wanted to keep this pattern, just like I did with this one. I wanted to keep the 0. Okay, So now for this pattern here, I kept it. So the, you saturate these values with one. Okay? We now know that if you add a one to this, our next number after that is going to be what? 11100000, right? Because you get add 1 plus 1 is 0, carry 1, 0, carry 1, 0, carry 1, 0, carry 1, 0, carry 1. 1 plus 0 is 1, and then the rest remain the same. This is another range. So what is this value? What we just added one to 19, one to get here. Which means this is 192. And what is this value if you convert it? While that would be two to three. So for class C, the range value is from one to 22 to three. Okay? So that leaves us now with the values for Class D and E. Okay? So, and I'm without doing the math here, I'm just going to tell you what they're going to be. So we got class D and class E. Well, one thing we know for sure is where we're going to have to end that to 55, right? So remember, we're going to start at 0 and end that to 55. We just broken down our ranges to identify the various classes we're going to be dealing with. And now remember for networking we're simply going to use these three classes. Okay? So for Class D, you're going to have to add one to two to three, right? So two to four. Ok? And it's going to go from two to four. And the idea is, so I'm going to keep this question mark. This will be your exercise, and this will be your exercise right here. So I'm going to leave it here for you to solve. What will be the last value for Class D? What would be the last value for class II? Now there are several ways to do this. We know the full range from here to here, to 24 to 255. You could divide that by two. Okay, so hint, hint. So I'll let you complete that to figure out what will be the value here. And what would be the value here. Very good. So I'll see you for the next lesson.
11. Possible networks and hosts calculations: Okay, So our objective now is to investigate the address range for all the networks possible using a class a or class B or class C with a default mask or a default network mask. And so let's look at a class a. The idea behind a class a typically is that we are interested in the first octet, right, the leftmost octet to identify the network and the rest of the bits that are shared between the last three octets towards the right will be for the host range. And to accomplish this particular goal, you need to add a default mask that masks these bits by multiplying them by one bit wise, and these by 0. By multiplying by 0 bit wise obviously to identify the actual network needed so for what we're end up with. So for this particular example, the default mask will be this dot 000. So whenever this IP addresses, we're applying this default mask to it. So we need these two pieces of information. So we can end up with a range of possible networks. So number of possible networks will be two to the eight, right? So you have eight bits on this octet, right? So as 256 possible network, any of these networks. So you have 256 over. Any of them will have a number of hosts. So any of them could have a number of hosts based on how many bits we have here. So number of possible hosts per network. So for each one of these, so again, per network will be equal to 202 to the 24th, right? So minus two. Remember we had two addresses that we needed to keep out. Which one identifies the network and the other one identifies the broadcast. Okay, so we want to to the 24 minus 2. And that would be your possible number of hosts per network. Per network. Out of these 256 networks, you're going to have that many host within each one. Class B. We will have an IP address structured where we really want these bits right here to represent the network. And these two represent the host. So you have two octets for the network to octets for the host with a default mask. That looks like this, 255, 255. So we can see that these 16 ones multiply by the 16 bits will conserve the network address for us, since we're multiplying by one. However, here we're going to be multiplying by 0. This bit here to identify the actual network that we need at any given time. We'll do an example here, for example, for class a, Let's say I have a particular address, 10 dot 2015 DOT 3. And if I add this subnet mask to it, this tells me that the network, this particular network, out of the 256 possible ones is 10 dot 000, this particular network. Okay? So that means out of 256 networks, I don't, I have this particular one that I've identified for class B, for example. For a class B, let's say I have an address like 134 dot 15, 20, dot 86. And you using this default mask right here. What is, what is the network we're dealing with? So it will be 134. So your network dot 1500. So this will be your network for this particular case. But out of how many networks, number of possible networks will be two to the 16. For each one of these networks, possible hosts per network will be again two to the 16 minus 2. Okay? So this particular network, what kind of hosts can I have in it? Well, you can have this 134, 15 dot 0 dot one, the first host within that range. What's the next one? Dot t2. What's the next one? Dot three. And then you can say, Okay, well, what's the next one? You're going to go down to dot 255. Remember this octet here can go from 0 to 255. We're not using 00 is the actual network. Okay? So we have 13, 14, 15 dot, dot 255. We're not done. This is a single network would not doing subnetting yet. So what's the next one? 13, 14, 15 dot one, dot 0. And then you keep going until you reach 255. So you're going to repeat this. Let me just do this here. It's just a lot of address is two to the 16. Lot of address. In repeat this until you reach 255 dot one. Then the next one will be two dot 0, et cetera. Until the last one will be 255. 255. That will be your broadcast address for this range. So this here will be the network address which is reserved. And this here, the last one will be your broadcast address, which is also reserved. Some means your valid range of hosts is right here. That's the number you're obtained here. Okay? That minus2 means we've taken this out of the way, and we've taken this one out of the way, right? Which is not included in the valid range of hosts. So your first host ID will be 01. Your last host ID, there's more, will be as, as you go down, it will be 255 dot 254. That will be the last one. The last two octets. That would be right here, because you add one to this and it becomes 255, 255. Okay? So you can imagine for class, see what the situation is. So that will be your assignment now is to figure out, okay, how many possible networks can I have with a Class C? How many possible hosts per network can I get? And then use a particular example for a particular network? And identify the host range, the valid host range within it. Identify the network address and identify the broadcast address. Okay, So just to help you out, this would be a network address. What will be the broadcast address for this class? A? The broadcasts. There'll be 10 dot 255, 255, 255. Hint, hint. What will be the first valid host? That would be a dot one. So we'd be at 10, 0, 0, 1, what will be the last valid host? There'll be 10 dot 255, 255. That 254. So this would be your possible, which is two to the 24 minus two possible hosts. Okay? All right, so for our next example, we're going to delve into class C.
12. Identify Network and host addresses on a device: Okay, So as promised, this time we're going to investigate how a class C is used using a default mask. And we're going to do an example where we need to identify a particular host within a particular network. Identified that network obviously. And what is the broadcast address for that particular network? So let's do it with an example. So let's say I had 192, 168 dot 10, dot 15 as an IP address. And I've assigned that to some device. Now, one additional piece of information is you need to add a mask. Why? Because we want to make sure that the computer understands what part of this IP address represent the network and what remaining bits are left for identifying a host. So if you're going to use the default mask for class C, Remember this is class C, Okay? So you could use 255, 255 dot, 255 dot 0, right? So that would be the default mask for this class. Could I have used non-default masks? For example, could I have used this one, 255, 255, 255. And the next number would be 128. Now you're going to say, why not one or two or three? Why is it 128? This will not be a default mask to me. Just draw a line here. This is not a default mask. This means here. If I have a class C address, it's got four octets, right? What I'm trying to do here is I'm trying to steal a bit from here and add it to the network identification range of bits. So I am getting into the eighth for the last talk that and taking this bit here, which means everything else here is all ones. Remember, the way a mask works is that on one end you have all ones. And on one end you have all zeros. You move this line this way or that way. It just a matter of adding more ones as you move this way, or adding more zeros as you move that way. So it's the same thing here in this particular one. So this here will not be a default mask, but it's a valid mask. We will have a lesson on other mask other than default mask. Okay, So here we're stealing a bit within that last octet to do this, if we're not using a default mask. Here. If we're using a default mask, all bits in the last octet are reserved to identify the host, so we're not in this scenario. Okay? So this particular mask is called the default mask for class C because it leaves us with the last octet for identifying a host or four possible hosts that we can have. Now let's look at this scenario here. Where does it mean when we add these two together? Well, one thing for sure, it's going to tell us what is the network we're dealing with. So you're going to multiply bit by bit, each one of these, so 255 is basically all one on ones. So this octet here is all eight ones, eight ones, eight ones. You're multiplying ones by 192, you're gonna get 192. You multiplying all ones by 168. Guess what you're gonna get. You're gonna get 168. You multiplying all ones by 10, you're gonna get that. You multiplying 0 by 15, you're going to get 0. This will be the network address. The actual network address. This device. Remember a device is always network and host. So it's a combination of the two. But we're interested now in the actual network. This is this network, so we know this is reserved. And since we're using a default mask, Let's be clear. For this particular host, you have this network, only one network. Even though we have the possibility if we want to have two to the 24 possible networks, but this particular one is a network. So we're not looking at possibilities of networks. This is an actual network. This network, this particular networks out of possible 200, I mean, two-thirds of 24 possible networks that you could get in a class seat. But this one is a particular example. We started out with an actual IP address that was assigned to an actual device. So the key here is to identify which one is our network. So after we identified the network, we want to know the host, right? So possible host will be one dot 2, et cetera, until dot 254. Because the last address we're going to obtain here, dot 168, dot 10, dot 255 would be the broadcast. This is a broadcast address, so special address. So that is why the number of possible hosts, okay, will be two to the eight minus two. And the reason we have that minus 2 is because one is reserved for the network address, the other one is reserved for the broadcast address. So that leaves us with these values right here, possible hosts. But remember for this particular example, we already have a host identified, which is 0.15. So for this particular example within this network, you have host 15 in there. We're not talking about two, we're not talking about one. These are simply possibilities. But in this particular example, the network is 192, 168 dot 10. So that's your network. The host. You identify this way, 192, 168 dot 10, dot 15. So you completely use the whole IP address to say how it's represented. Yes, it is represented as a combination of network and host. But that is your device. That is what you would put in the device plus the subnet mask. To do this. So we're going to do an example using Packet Tracer to set an IP address for a device and assign a default mask to make, to make sure that we obtain a scenario similar to this. Okay, I will see you then for the simulation.
13. Course Project Video Lesson: Welcome back. So now we're ready to conclude this course. We will finish it up with an exercise where I will complete a small network using a class C with a default mask and a class a with a default mask, you, on the other hand, will complete the class B network with its default subnet mask. So let me start with the class C. And we will use a hub as our main connection for all of the devices we will be using. So in our case, we only need two devices. So I'll put the hub here, and this is the hub we will be using. Then let's go ahead and connect to computers. So I'm going to take a computer, put it right here, and we'd take another computer and put it right here. Now I have to decide what IP addresses these devices will have. For the sake of this exercise, I will pick the first available IP address within the valid range of hosts. And the last one. We're gonna do that for all of these examples. Okay, so let's go ahead and pick an IP address for the first one. So we'll go to the Fast Ethernet setting and make sure you're on static IPV4. And notice that the network is 200 dot 56 dot 16. Now the network will be 0. Now this is a device. And since you are using the default subnet mask, then the last octet is used to identify the actual device. And remember, since you are using the default subnet mask, You only have what? One network within this one. So one subnet within this network. Okay? In the next course, we will delve into subnetting, where we will create subnetworks within a network. But in this exercise, we will focus on one subnetwork per network. Thus, we will be using the default subnet masks. And that would be for the class C example, the Class B or the class a, they're all using the default subnet mask as we can see on the screen. Excellent. So I'm going to pick the first one within the range and that would be one. Okay? You can't pick 0 since that will be the network. And you cannot pick 255 since that would be the broadcast. And that's it. That's the setting for the PC 0. Let's pick the last address within this range for PC1. Let's go to config. Let's go to Fast Ethernet. And let's go ahead and enter an IP address that is 200 dot 56 dot 16, dot 250 for not 55. 55 is reserved as the broadcast address. So dot 54. Could I have used dot 53? Could I have used dot 10? Absolutely. I just wanted to use the last one within the valid range. Could have reused that one. No, every IP address within the same network has to be unique. Okay? So the host IP, the hosts section has to be a unique identifier. Okay, so now we're set notice it automatically gives us the default mask, which is good. Now we can go ahead and connect these devices. So we can go from here to here. And then from here to here. Now if you feel ambitious, you're go ahead and use the straight through. We'll do that for the class a example. Okay? So here we are now will have to test if the network works, right? So I'm gonna go over here, go to the desktop and one PC 0, 1. The first things I want to make sure is hasn't been configured properly IP config. So this is a command you would do on a PC, on a laptop at the prompt, in the DOS prompt. And let me make this a little bigger and you can see that, yes, indeed, we do. We did obtain the address as assigned by the administrator plus the appropriate mask for this particular network. Okay, so can we now do a ping the other computer? Pc1? Absolutely. So what was PC1 is address? I picked the last one within the range. So I'm going to go ahead and ping to a 100 dot 56, dot 16 dot to 54. And sure enough, it reaches it. Now what if I ping a device that doesn't exist, that has not been configured. So what if I ping 253? Okay, let's go ahead and see what happens. As you can see, I have not physically configured any end device with that logical address. Okay, So we'll wait for a little bit to timeout and completely figured out that, okay, it's unreachable. And that is because it doesn't exist, as you can see, a 100 percent loss of packets. Now, can we do an RP? Investigate the ARP cache or the ARP table, show ARP minus a just to see. And sure enough, we have 254 in our ARP table. Remember this is PCs URL. Can we do the same thing with PC1? Let's go to PC1. Go to the desktop, run the prompt and do an ARP minus a. And notice I haven't done ping from here. However, I expect 256 dot 16 dot one to be in the ARP table here at PC-1. And sure enough, it's there. And notice what's in the ARP table as a reminder, not only the logical address, but also the physical address. This is how it binds your, IT sees what is your physical address right here within this network. Now, remember, we're using a hub. So what's being transmitted between these devices called a frame. And a frame is a data unit that has a section in it for the source and destination addresses of the devices. And in particular in this case, will be the actual physical addresses of these devices. Okay, So in another course, we will delve into the breakdown of a frame, where we will look at the source and destination sections of the frame, and then will be populated by the physical addresses. It's until you get into the packet, which is inside the frame. Technically speaking, we would see the logical addresses in there of the source and destination. And that would be a layer three artifact. Okay, fantastic. So now let's go ahead and do a class a. Remember, you will be completing our classmate. So the example is fairly straightforward. So I'm going to go to my switch device a year. I'm going to pick a hub. Now, could I use this switch? Absolutely. Could I use a router? No. They're not distinct networks. These devices are within the same network. So a switch could be, would be fine. But for the sake of our example, we want to use up layer 1 device. So let me just pick a hub and put it right here. Okay? We will have other lessons for switching and routing, where we get into more devices than just connecting at layer one or at the physical layer. So let's go ahead and put, took computers here. One. Again, you're going to be doing exactly what I'm doing. But you will do this for class a. And let me go ahead and connect with a straight through. So you can see when you select the actual cable instead of the lightening bolt. When you click here, it will tell you, here are the interfaces available for you. I obviously want the network interface port, Fast Ethernet 0 plug-in RJ 45 in there. That's linked to a Cat 6, Cat 5 or CAT 7 cable. Go here. Connective Fast Ethernet 0, the first available port. You could pick any port by the way, on the hub, OK. As matter of fact, let's do that. So let's go ahead and pick another one. And let's go from here. Now pick Fast Ethernet five, so it doesn't have to be an order as long as it's available. And however, on your computer you will only have one interface, right? So typically you only have one NIC card in your computer with its interface. So we're not done. So we physically connected everything to the network. If you try to ping, nothing will happen. So if we go to our computer here and we go to the desktop and go to run. And if I do an IP config, you will see that it's not configured properly yet. We don't have an IPV4 setup. So we have to make sure that we do that before we actually try to ping anyone. Okay, So remember we're in class a and notice the address for the network is eight dot 0 dot 000, using the default mask for class a. And this tells us we're using one subnet within this network, so you only have one network. So let's use a hub. The first, the first device within the range of available valid host addresses. And then we're going to use the last one. Okay, so that's going to be a really good exercise to see how the range looks like. So for this one will be the first one. So let me go to config, go to Fast Ethernet and set up my first host within the first available IP address that is a valid host. So that would be eight, 0.1. Oops, where's my eight? And let me just type 888.1. Remember your network is 8, so you're gonna go to the last octet and put a one. That's the first one. Now, notice here, if I click here, it automatically sees that you are using a default mask. Perfect. Now let's go ahead and configure the last configured that PC3 to use the last available valid host address. And that would be 8.255.255.254. So don't get carried away and write 255 at the end here. Otherwise that would be the broadcast within that network. So just minus one there and you're good to go. That will be your last valid IP host within that range. So notice we still get the default mask. Fantastic. So now let's double-check and make sure that everything works. And you'll be doing the same thing with class B. So I'm going to go over here, go to the desktop, and run the command ping. And I'm going to ping first if I do IP config, just to see who am I. As you can see, I'm the first host or valid host within that range. And I'm going to go ahead and ping the last one, which has been configured for PC3. So 8.255.255.254. Okay? And sure enough, we are able to connect, as you can see, 0% lost. Okay, so I leave you with this exercise now where you will complete a class B network with two devices. Pick the first one within the valid range and pick the last one within the valid range. If you want to put three or four devices, you're welcome to do so. But just make sure that each one has a unique host IP address that is valid. I will see you again for the next course, which will be subnet walking.