cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1574
Views
10
Helpful
5
Replies

subnetting help

scooter817
Level 2
Level 2

Hi

I have a network engineer that asked me this question and I don't really now what to telll him so I wanted to know is someone could help me with this question. I've attached the question in a notepad document.

1 Accepted Solution

Accepted Solutions

Ven Taylor
Level 4
Level 4

The question was:

A site has been assign the following  ip address range 199.47.182.0/24.  The customer would like to break this up  for several additional sites.

Site A needs  100 ip addresses

Site B needs 5 ip addresses

Site C needs 5 ip addreses

Site d needs 5 ip addresses

How would you proceed?

I would do this:

Site A - 199.47.182.0 /25 (Mask 255.255.255.128 = 128 addresses) 

Site B - 199.47.182.128 /28 (Mask 255.255.255.240 = 14 addresses)

Site C - 199.47.182.144 /28 (Mask 255.255.255.240 = 14 addresses)

Site D - 199.47.182.160 /28 (Mask 255.255.255.240 = 14 addresses)

This will allot for the addresses and give you room to grow hosts per site and even leave room for more small sites.

If you want even more room to grow per site (which I recommend) you can use a /27 (255.255.255.224) which will give you 30 hosts per network, but no more room for more networks.

Ven

Ven Taylor

View solution in original post

5 Replies 5

Ven Taylor
Level 4
Level 4

The question was:

A site has been assign the following  ip address range 199.47.182.0/24.  The customer would like to break this up  for several additional sites.

Site A needs  100 ip addresses

Site B needs 5 ip addresses

Site C needs 5 ip addreses

Site d needs 5 ip addresses

How would you proceed?

I would do this:

Site A - 199.47.182.0 /25 (Mask 255.255.255.128 = 128 addresses) 

Site B - 199.47.182.128 /28 (Mask 255.255.255.240 = 14 addresses)

Site C - 199.47.182.144 /28 (Mask 255.255.255.240 = 14 addresses)

Site D - 199.47.182.160 /28 (Mask 255.255.255.240 = 14 addresses)

This will allot for the addresses and give you room to grow hosts per site and even leave room for more small sites.

If you want even more room to grow per site (which I recommend) you can use a /27 (255.255.255.224) which will give you 30 hosts per network, but no more room for more networks.

Ven

Ven Taylor

Thanks a million

Scooter,

On subnet masks and wildcard masks I found the following helpful.

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

Hope this helps you,

Mike

Thanks alot for giving me this example to go by to learn how to properly subnet,I really appreciate all the help and have a great day.

Great help to understand CIDR.

Sent from Cisco Technical Support iPad App