Need help with VLSM and Subnetting class B

Unanswered Question
Jan 13th, 2012

Hey Folks,

I am having a real issue in Subnetting VLSM in Class B. I recently took a quiz on Class B and I had no idea on how to do it. I can subnet class C with no issues but once I get into class B I get lost.

Do you folks know where I can find some worksheets that I can practice with  ?

Example Question I need to work on.

With IP 160.60.0.0./16  VLSM the following sites plus serial links

Location 1 1000 hosts

Location 2 500 hosts

location 3 100 hosts

Location 4 60  hosts

location 5 50 hosts

location 6 20 hosts

Please advise.

Patrick

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 1 (1 ratings)
Oleksandr Nesterov Wed, 01/18/2012 - 13:35

Hi

Let's take an example:

192.168.30.0 /26

You  know that address that starts from 192 is in class C and standard mask  for it is 24. Address mask always describes which part of address  describes network (26 is a number of bits in IP address that describes  network portion).  Also you know that for class C first 3 octets  describe network and last octet describes a host.

Each octet has 8 bits. Since we have mask 24, 24/8 = 3 - octets describes network - 192.168.30

The  last octet describes host and for it we have 8 bits. But in your  example we have mask 26 - so seems like we will have 26 bits that  describes network 24 of them are turned into  192.168.30 and two of them  we have to take from last octet:

192.168.30.(00)000000 - first 3  octets are in decimal form and last one int binary. And in the brackets  network address shown - subnetwork

If we will change 2 bits in the brackets we will get following addresses:

192.168.30.(00)000000 - 192.168.30.0

192.168.30.(01)000000 - 192.168.30.64

192.168.30.(10)000000 - 192.168.30.128

192.168.30.(11)000000 - 192.168.30.192

These are subnetworks within the network 192.168.30.  - and here class separation is not applicable.

And within this subnetworks you will have addresses for hosts (6 bits left for hosts). For example:

In the network 192.168.30.0 host addresses will be:

192.168.30.(00)000001 - 192.168.30.1  =  192.168.30.(0) + 1 

192.168.30.(00)000010 - 192.168.30.2  =  192.168.30.(0) + 2 

192.168.30.(00)000011 - 192.168.30.3  =  192.168.30.(0) + 3 

192.168.30.(00)000100 - 192.168.30.4  =  192.168.30.(0) + 4 

192.168.30.(00)000101 - 192.168.30.5  =  192.168.30.(0) + 5 

192.168.30.(00)000111 - 192.168.30.6  =  192.168.30.(0) + 6 

……

192.168.30.(00)111110 - 192.168.30.62  =  192.168.30.(0) + 62 

192.168.30.(00)111111 - 192.168.30.63  =  192.168.30.(0) + 63   - broadcast

In the network 192.168.30.128 host addresses will be

192.168.30.(10)000001 - 192.168.30.129  =  192.168.30.(128) + 1 

192.168.30.(10)000010 - 192.168.30.130 = 192.168.30.(128) + 2

192.168.30.(10)000011 - 192.168.30.131 = 192.168.30.(128) + 3

192.168.30.(10)000100 - 192.168.30.132 = 192.168.30.(128) + 4

……

192.168.30.(10)111110 - 192.168.30.190 = 192.168.30.(128) + 62

192.168.30.(10)111111 - 192.168.30.191 = 192.168.30.(128) + 63 - broadcast

Also  you probably know that address where host portion is all-zero is a  network address , and address with all-ones in host portion is used for  broadcast.

NOTE:

Important thing - you MUST be familiar with binary mathematics - it will follow you in ALL network technologies.

Cisco_Learning_... Wed, 02/22/2012 - 15:40

Friendly Reminder: Effective this Friday, February 24th, at 5:00 p.m. (PT) all new discussion thread requests will be redirected to the Cisco Learning Network.  We encourage you now to go there to create any new discussion thread or document regarding Certifications and/or Training topics.  You may also refer to our jointly created FAQ.

burleyman Thu, 02/23/2012 - 04:34

Patrick,

Read through this and see if this helps.

In subnetting the only thing you really need to memorize is…..

Mask - 128….192….224….240….248….252….254….255

And remember the number 256

Learn that and everything else is easy…..

Now let’s learn how to find the number of IP addresses for a subnet mask or CIDR notation.

Let’s say you want to know how many IP address you have given a subnet mask.

Mask – 255.255.255.224

Take 224 and subtract that from 256…. So 256 – 224 is 32, so that means you have 32 IP addresses available for the mask of 255.255.255.224. Now to find the assignable addresses you subtract 2 (one for the broadcast address and one for the network address) so you have 30 assignable IP addresses. Simple right?

Now let’s say they give you this mask, /29, well here is where that little memorization comes in. So let’s convert that to dotted decimal…. 255.255.255.248

Take 248 and subtract that from 256….. So 256 – 248 is 8, so that means you have 8 IP addresses available for the mask of 255.255.255.248 or /29, which in turn means there are 6 assignable IP addresses after you subtract the broadcast and network IP addresses. Easy right?

Done right? No! What if you see something like this?

255.255.240.0…… Now what! Well we just have to do one more thing.

Let’s use that .240. 0 and pretend the .0 does not exist so just think .240, now from the above work figure out the number of IP addresses for .240 which we would get by subtracting that from 256, remember? So 256 – 240 is 16. Now here is the “one more thing” you need to do. Take that 16 and multiply it by 256 (we use 256 because we are one octet up). So 256*16 is 4,096, and there you have the number of IP address available for the mask of 255.255.240.0 and just subtract the broadcast and network addresses and you have 4,094 assignable IP addresses.

Done right? No! What if you see something like this?

255.192.0.0……Now what! Well we just have to do two more things.

Let’s use that .192.0. 0 and pretend the .0.0 does not exist so just think .192, now from the above work, figure out the number of IP addresses for .192 which we would get by subtracting that from 256, remember? So 256 – 192 is 64. Now here is the “two more things” you need to do. First take 256*256 (we do 256 twice because we are 2 octets up) which is 65,536 now take 65,536 and multiply it by the 64. So 65,536*64 is 4,194,304, and there you have the number of IP address available for the mask of 255.192.0.0 and just subtract the broadcast and network addresses and you have 4,194,302 assignable IP addresses.

Done right? No! Last but not least, what if you see something like this?

248.0.0.0……Now what! Well we just have to do three more things.

For this we have to use 248.0.0.0 and then pretend the .0.0.0 does not exist so just think .248, now from the above work, figure out the number of IP addresses for .248 which we would get by subtracting that from 256, So 256 – 248 is 8. Now here is the “three more things” you need to do. First take 256*256 then take that result and multiply it by 256 (we do 256 three times because we are 3 octets up) which 256*256 is 65,536 now take 65,536 and multiply it by 256 and you get 16,777,216. Now you take 16,777,216 and multiply it by 8 from above and you get 134,217,728 and there you have the number of IP address available for the mask of 248.0.0.0 and just subtract the broadcast and network addresses and you have 134,217,728 assignable IP addresses.

Please say we are done now….my head hurts! Yes that should cover everything you need to find the number of IP addresses for a given mask. Now, thankfully you probably will not see any masks like the last example or the one previous either in real life or on any exams, at least not CCNA or CCNP. I gave those just to show how you can do it if someone decides to test your knowledge.

Now you say, well that is all well and good but what about wildcard masks! Easy I say!....well easy for “normal” wildcard masks. What you need to remember is wildcard masks are not just the inverse of subnet masks, they are and entity of their own.

For “normal” or inverse subnet masks just remember this, substitute all 255’s with 0’s and all 0’s with 255’s.

We will use the above four examples.

Example 1:

255.255.255.224 with 32 IP Addresses. To find the wildcard mask remember replace the 255’s with 0’s, now take the number of IP addresses and subtract 1 and place that where the 224 is. So you would get, 0.0.0.31, and there is your wildcard mask.

Example 2:

255.255.240.0 with 16 IP addresses. Remember substitute all 255’s with 0’s and all 0’s with 255’s so you have this 0.0.?.255 and the ? would be 16 – 1 which is 15. So you get a wildcard mask of 0.0.15.255, not bad right.

Example 3:

255.192.0.0 with 64 IP addresses. Now with the substitutions and subtract 1 from the IP addresses you get a wildcard mask of 0.63.255.255, you’re getting it, one more to go.

Example 4:

248.0.0.0 with 8 IP addresses. Again with the substitutions and subtract 1 from the IP addresses you get a wildcard mask of 7.255.255.255, now you got it, wildcard masking made easy.

Now, for the not so normal wildcard masks. Did you know this is a valid wildcard mask, 64.16.0.3

To look up more on these wildcard masks I found a good explanation at http://inetpro.org/wiki/wildcard_masks

Actions

This Discussion