Hello everyone, this is Halla with Information Leak again. This time we’re going to do a tutorial on CIDR. That’s a class list inter-domain routing and some networking and some submitting, very simple stuff, somebody asked if it would be a test and as you’ve seen in a class apparently they don’t have a clue so they ask me and I got an email to explain it and I felt like this is probably the easiest if not coolest way to do it. So let's begin, shall we?
If I remember it correctly it’s F, look at this. Anyway here we go, so this a quick side to some of that review. Let's begin, first of all, what’s an IP? Well, it’s four octets, eight bits per octet, total of 32 bits in the numbers in each octant range from zero to 255.
Why not 256, you ask? Because zero is a number therefore there are 256 really if you count to zero, moving on. Subnet mask with the subnet mask, subnet mask is 32 bits from zero to 255, I should say and what it does is it distinguishes between the network address and the node address meaning its let's you know from the IP address subnet mask. It tells you what part of the address is the network address and what part of the address is the computers the host address. We’ll get into that in just a minute, okay so a lot of people are saying just that.
So here we go that’s an IP address, 192.168.122.5 you can see in the last octet the five the subnet mask is different, okay. Everything else is 255, 255, 255, 192. What does that mean when you look at that? Well. very simple it means that the network is actually flowing into the last octet a little bit, if you saw a 255, 255, 255, zero that would mean that it’s on the 122 network and every other thing in the last octet can just be use as a host from one to 255. Simple but this shows that there is some stuff going on so let's get into that. It’s binary time as we said earlier. Each octet is eight bits. These are eight bits one, two, three, four, five, six, seven, eight very simple. How to remember numbers even easier, start from one and double it go eight characters one, two, four, eight, 16, 32, 64, 128 in that order, title them.
Simple, very, no problems, okay, when you got that moving on. So this is how it works very simply let's say you wanted to find the number three. At decimal three and binary how do you that? Well it’s very easy, you start from the left and you say is this smaller—can this goes into three, you know, does this fit like physically fit into the number three is three greater than it is now. No, no, no, no, yes, three is greater than two so we’ll knock that off and we've used two out of the three so we need one more and as luck would have it there is one left so that’s three. Now that might not have been a good explanation so we’ll do several examples, check this one out.
This is 31 no, no, no 32 is too big 31, 16, plus eight plus four plus two plus one, 31 make a little more sense travelling with time seven, four plus two plus one is seven. See how this works, wonderful now you can do binary. Let's move on. CIRD is a slash notation just like this right here, okay so using the same stupid IP address we pick out of the hat basically before. Now we’re using the 26 CIRD notation.
This is basically the subnet mask written in with the IP address, okay. That means this, okay. How did I get that? I’ll show you, what is this 26? We got to figure out what this number is first, so as I said before each as we know, each octet is eight bits. This is bits, okay.
So what you would do is, how do I go back, previous, oh look at that. So what we do is, eight plus eight plus 24, 25, 26 okay so that means were dealing with this octet and we’re two bits into it, okay. Let's get into that, so we’re going to get it on already. This is what is going to be ask on the exams as far I understand it, the network the IP is in. The next to it network or list of the networks, the subnet mask, the broadcast address and the valid host range, okay we’re going to go into this right now and go over each one. It’s going to be much, it’s easy.
The network the IP is in, here’s the question okay, 192.168.122.5/26 what network is this in? Well 26 eight plus eight plus eight plus two is 26 so we know that we’re two bits into this octet, okay, which means all right let's write it out. These are all the bits in the octet so were two in which would be 128-64 so that would be 64 okay. So that means that we can go in order that means the networks are going in order in multiples of 64 starting at zero. So it goes zero-64-128-192 okay so being that, this number is not more than 64 or 64 is greater than this number. We know that this network is the zero network because five is greater than zero therefore and less than 64 it fits between this numbers you see, so that’s five is in the zero network, okay.
If this number was a 73 it would fit between user be in the 64 network and if this number was a 129 it would be in the 128 network. And if was 199 it would be in the 192 network, you understand. So that’s how you find out what the thing is in, what network that IP address is in, you add up the bits in the CIRD notation, you say “Okay, there is two in this octet one, two it goes in 64. This is a five so therefore this is the zero network”.
Moving on that also look at that, do we rule or what, we know the network is going to be 64 and the next one is going to be 128 and we got a list. It’s fantastic you can't beat it. Okay we just killed two birds at one stone. Now then let's figure out the subnet mask just as easy take the same example okay. We know it’s in the zero network. We know the next network is 64. We know that the network is going multiples of 64 therefore we take 64 and subtract it from 256 we come up with a 192. What does this mean? This means that those are the bits that are left in the last octet. Anyway you end up with 192 that would be a subnet mask, all that means is we used the first two bits. That’s all it means.
It means the first two bits of the last octet are also part of the network address that’s what that means. Okay, so let’s review again real quick. You know how many bits you're in because it is you subtract that from 256. You pop it in that right at the right octet according to them you know the bits and the CIRD and that’s it, you're done. Moving on, the broadcast address, okay here’s the same equation. We know that this IP is in the zero network and we know that the next network is going to be 64, so the broadcast is going to be one last than the next network which is 63, that’s it.
The easiest way to think of it, broadcast address one last than the next network, done moving on, the valid host ranges. This are the valid addresses you can give to computers within a network, okay, so this are the computer IP addresses, this is the meat and potatoes right here. This is important stuff, okay, same problem. We know it’s the zero network. We know that the broadcast is 63. I didn’t bother running 64 because were talking about the zero network.
Okay so the zero network, the broadcast to 63, so how do we figure this out. Well, it’s very simple, the first address that you can't use zero and can't use 63 but you can use everything in between so therefore the valid host ranges would be from one to 62, for the zero network that’s it, very simple. We can do this and that’s how it’s done. Hope the lesson went well, hope you—I explain it well and until next time. This is Halla from Information Leak signing off, take care.
Transcription by:
Scribe4you Transcription Services