Subnetting a Class B...
mattipler
Member Posts: 175
in CCNA & CCENT
Afternoon all.
I've been told by my college tutor not to worry too much about getting subnetting class B network q's on CCNA exams as they tend to be Class C questions... BUT I'd still like to be able to get my head around it and be able to do it. I can subnet class C's but I'm a bit lost as to how to do a class B.
What is the first valid host on the subnetwork that the node 172.24.27.144 255.255.252.0 belongs to?
Answer: 172.24.24.1
If anyone could give me an explanation as to how you'd achieve the displayed answer to question above I'd be very grateful.
Nice one guys.
Matt of England.
I've been told by my college tutor not to worry too much about getting subnetting class B network q's on CCNA exams as they tend to be Class C questions... BUT I'd still like to be able to get my head around it and be able to do it. I can subnet class C's but I'm a bit lost as to how to do a class B.
What is the first valid host on the subnetwork that the node 172.24.27.144 255.255.252.0 belongs to?
Answer: 172.24.24.1
If anyone could give me an explanation as to how you'd achieve the displayed answer to question above I'd be very grateful.
Nice one guys.
Matt of England.
Matt of England
Comments
-
EdTheLad Member Posts: 2,111 ■■■■□□□□□□Matt, i'll leave the tech question to someone else, all i have to say is your college tutor is a disgrace.I shake your hand for pursueing the finer details.At the end of the day its the knowledge that counts,well done for not having the same mentality as your tutor.Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
-
theseman Member Posts: 230Heres how I did this one:
You know the mask, so you can find out the valid network numbers:
11111111.11111111.11111100.0 (255.255.252.0)
Now what I do is ignore the first 2 octets as they are all 1's.. and work on the third :
128 64 32 16 8 4 2 1
1 1 1 1 1 1 0 0
So now we see that the first network would be 172.24.4.0, the second would be 172.24.8.0, 4th 172.24.12.0, 172.24.16.0, 172.24.20.0, and now we are at 172.24.24.0 (the 6th usable subnet - if we are not using subnet 0) Now the 7th network number is 172.24.28.0, which is to high so we now know that our host address is actually in the 172.24.24.0 network. And now you just figure out the first usable host, which is of course 172.24.24.1!!!
edit: sorry about that chart there, each 1 should be underneath its corrosponding placement (1 under 128, 1 under 64.....4 and than the two 0's under 2 and 1!!!) -
Cessation Member Posts: 326Thank you both for the questions and answers!
Although I am not currently working on my CCNA I still have a hard time.
Howcome I forget how to subnet 10 minutes after I learn it every time?
How rediculous isnt itA+, MCP(270,290), CCNA 2008.
Working back on my CCNA and then possibly CCNP. -
Cessation Member Posts: 326theseman wrote:128 64 32 16 8 4 2 1
1 1 1 1 1 1 0 0
So now we see that the first network would be 172.24.4.0, the second would be 172.24.8.0, 4th 172.24.12.0, 172.24.16.0, 172.24.20.0, and now we are at 172.24.24.0 (the 6th usable subnet - if we are not using subnet 0) Now the 7th network number is 172.24.28.0, which is to high so we now know that our host address is actually in the 172.24.24.0 network. And now you just figure out the first usable host, which is of course 172.24.24.1!!!
How do we know the 6th subnet is the usable one?
Is it be cause of the 11111100 ? Is that correct?
That would make it so we jump every 4 ie: 172.24.4.0,172.24.8.0,172.24.8.0,172.24.12.0 right?A+, MCP(270,290), CCNA 2008.
Working back on my CCNA and then possibly CCNP. -
theseman Member Posts: 230Cessation
Yes, that first 1 of the subnet mask indicates the FIRST usable subnet available (unless subnet zero is involved). In this case its in the 4 position. I think you are asking how we know that 172.24.24.0 is the 6th usable.. correct??
Well since we know the first usable is 172.24.4.0, we can find the other usable subnets a couple of ways. You can do a binary count if you are comfortable with binary. You can also take the value of the first network number (the 4) and multiply it by the subnet you are looking for (say someone specifically needed the 6th subnet) then you could do 4*6 = 24.
I am going to go back to the original question for a moment and explain another way to get to the same answer. Which ever one you like better, stick with it. (this new one is a more "proper" way to do it)
The quickest way to arrive at our original answer is to AND the subnet mask and the host IP.
10101100.00011000.00011011.10100000 172.24.27.144
11111111.11111111.11111100.00000000 255.255.252.0
Now to find the network we are on, you AND the two numbers. (Any time you have a 1 in BOTH numbers at the same placement, that number stays a 1, this means you can just bring down the 172.24 since the corrosponding mask bits are all 1s)
The result of our and would be:
10101100.00011000.00011000.0
Converted to dotted-decimal:
172.24.24.0 (This is the network our host is on!!!)
So now just add the 1 as its the first usable host addy!!
Personally I like to AND, but I have found the first way as a nice intro to the process.
Sorry this is so long!! And subnetting is one of those things that some people get right away, and others it takes awhile. The great thing is, once it clicks, you have it! -
mattipler Member Posts: 175Thanks for your answers guys but I just don't get it. I understand the explanation for the previous question I posted on here, thanks for that I really appreciate it. Then I tried the question below and it seems like a completely different ball game! Subnetting class C's I can do without even trying but class B's... AGHHHHHHHH!!!! It's driving me mad. I know I'm unlikely to be asked Class B subnetting questions but I just hate not understanding something and having it get the better of me!!! I just don't understand how it works... I'm starting to question my intelligence here LOL!
Here's one I tried to do and end up no where near the right answer...
Question: What is the first valid host on the subnetwork that the node 172.22.82.185/20 belongs to?
Answer: 172.22.80.1
I'm confused as to how the third octect got from 80 to 82...
Sorry to keep firing these at you guys. I'm sure the penny will drop soon.
Thanks once again for your help.
Cheers
matt of englandMatt of England -
EdTheLad Member Posts: 2,111 ■■■■□□□□□□172.22.82.185/20, /20 =255.255.240.0, 256-240=16
subnets are multiples of 16, i.e. 0,16,32,48,64,80,96.....
Now you have the address 172.22.82.185,looking at the third byte 82 will fall into subnet 80 as its between 80 and 96,so the subnet is
172.22.80.0
Address range is 172.22.80.1 -> 172.22.95.254
172.22.95.255 is the broadcast address.
the next subnet would be
172.22.96.1 -> 172.22.111.254Networking, sometimes i love it, mostly i hate it.Its all about the $$$$ -
mattipler Member Posts: 175Ha ha nailed the fooker!!!
Nice one lads... it's simple when you get your head around it isn't it!!!
Cheers guys... when I've got my CCNA I'll buy you all a beer lol.
Matt of EnglandMatt of England -
borumas Member Posts: 244 ■■■□□□□□□□I guess I got my answer differently, didn't worry about other subnets or anything with a question like that. I just wrote out 172.24.27.144 in binary (actually the only number you need to write in binary is 27 since it is the octet needed, the others in the mask are 255 or 0 so you don't worry about them).
027= 00011011
252=11111100 I AND them together and got 00011000=24
so the subnet that the address belongs to is 172.24.24.0 and the first host would be 172.24.24.1 -
theseman Member Posts: 230borumas' way is indeed correct, if you look at how I did the AND above, we come to the same result, only I did it the long way to show the thinking behind it. It is true that you can totally ignore any octets that have 255 or 0 in them. (255: just use whatever number is in the corrosponding octet, and for 0 the result of the AND is 0.
-
mp3spy Member Posts: 86 ■■□□□□□□□□theseman wrote:Cessation
Yes, that first 1 of the subnet mask indicates the FIRST usable subnet available (unless subnet zero is involved). In this case its in the 4 position. I think you are asking how we know that 172.24.24.0 is the 6th usable.. correct??
Well since we know the first usable is 172.24.4.0, we can find the other usable subnets a couple of ways. You can do a binary count if you are comfortable with binary. You can also take the value of the first network number (the 4) and multiply it by the subnet you are looking for (say someone specifically needed the 6th subnet) then you could do 4*6 = 24.
I am going to go back to the original question for a moment and explain another way to get to the same answer. Which ever one you like better, stick with it. (this new one is a more "proper" way to do it)
The quickest way to arrive at our original answer is to AND the subnet mask and the host IP.
10101100.00011000.00011011.10100000 172.24.27.144
11111111.11111111.11111100.00000000 255.255.252.0
Now to find the network we are on, you AND the two numbers. (Any time you have a 1 in BOTH numbers at the same placement, that number stays a 1, this means you can just bring down the 172.24 since the corrosponding mask bits are all 1s)
The result of our and would be:
10101100.00011000.00011000.0
Converted to dotted-decimal:
172.24.24.0 (This is the network our host is on!!!)
So now just add the 1 as its the first usable host addy!!
Personally I like to AND, but I have found the first way as a nice intro to the process.
Sorry this is so long!! And subnetting is one of those things that some people get right away, and others it takes awhile. The great thing is, once it clicks, you have it!
If subnet zero was ON we WOULD use the first and last subnet correct?Ok CCNA BREAK IS OVER, TIME FOR CCSP!!! -
mp3spy Member Posts: 86 ■■□□□□□□□□ed_the_lad wrote:172.22.82.185/20, /20 =255.255.240.0, 256-240=16
subnets are multiples of 16, i.e. 0,16,32,48,64,80,96.....
Now you have the address 172.22.82.185,looking at the third byte 82 will fall into subnet 80 as its between 80 and 96,so the subnet is
172.22.80.0
Address range is 172.22.80.1 -> 172.22.95.254
172.22.95.255 is the broadcast address.
the next subnet would be
172.22.96.1 -> 172.22.111.254
Yup, Exactly what he said. Get CCNA FASTPASS BOOk, they break it down into those terms exactly. I was so lost before Fast Pass made contact with my brain....
-DOk CCNA BREAK IS OVER, TIME FOR CCSP!!! -
lootitall12345 Member Posts: 3 ■□□□□□□□□□
-
Danman32 Member Posts: 1,243Subnetting for class B is really no different than subnetting for class C.
If the 2nd question was worded thus:
Question: What is the first valid host on the subnetwork that the node 196.22.185.82/28 belongs to?
Would you be able to work this out any better?
In this case, the first network address is still 196.22.185.80, and the first host you add 1, which would make it 196.22.185.81.
The difference is that the least significant bit for the host is on a different octet for class B, than it would be for class C, since the subnet bits have to be in the same octet as the host in class C, but can be different on class B.
What can get hairy is when you have a class B network address, such as 172.16.0.0, but the subnet extends past the third octet into the 4th. Calculating the first host on such a subnet isn't the problem, but answering questions about the available number of hosts or subnets can get fun, since now you are dealing with 16 bits instead of only 8.
But in the questions you presented, you only had to deal with one octet really, which was the third.