Click on IP for Whois details. Sometimes you just need to know.

Applying TCP/IP CIDR

 

Recently I received the following question from someone trying to work out a subnetting exercise for a class.

QUESTION

My project needs 6 subnets but each department has different numbers of host. I have to reserve extra hosts for future growth.

(click image for larger)

 

 

Here is a picture of the topology (click image for larger):

I’m stuck at this part… So what are the IP’s, subnet mask, & network address?

ANSWER

The easy answer that most people go with is to turn a class A network staring in the 10x.x.x (a.k.a. /8) range into a class C (a.k.a. /24) with 254 per network. For example a /24 such as this would do the trick:

(click image for larger)

But looking at your network it appears to me someone wants you to understand how Classless Inter-Domain Routing (CIDR a.k.a. Suppernetting) works where you combine 2 subnets into one. Using a 6 step approach to subnetting lets first get the easy part out of the way. 

 

1) How Many Sub-Networks Do You Need?

6 (as shown in the image)

 

2) How Many Bits Did You Have To Use?

If you double up by counting bit places you need to use 3 bits 2, 4, 8. You need 6 but you actually get 8.

(click image for larger)

 

3) What Is Your Subnet Mask?

You have 2 extra subnets which will come into play later. Adding the place values up 128+64+32=224. Your mask is 224 for all these subnets below.

(click image for larger)

4) What Is Your Block-Size?

The block size is always the lowest number in the mask, in this case 32. It also happens to be the total number of hosts you can have per subnet -2. So each of the above subnets will get 30 hosts, this is how you know you have enough possible hosts to accommodate the exercise.

(click image for larger)

 

All of the below will accommodate 30 hosts except the last 2 subnets

(click image for larger)

 

5) What Are Your Subnets?

Because you need to combine 4 subnets into 2 larger subnets, for the sake of conversation lets first lay out what the subnets are and then we will figure out which can merged into 1 subnet.

Our first subnet is 0 + your block size and you continue adding your block size to each answer until you have reached the mask itself.

(click image for larger)

Before moving onto step 6 we need to do some CIDER, unfortunately you have to look at subnets in binary to be able to determine which can be retracted and merged most easily. This is the stickiest part of subnetting. You’re going to take 4 of your 224 subnets with 30 hosts each and turn pull them back into a 192 subnet with 62 hosts per subnet merging them into two subnets. In order to retract a subnet into a larger block of hosts you need to make sure the mask in binary is identical for the 2 merging subnets. It's the only way to keep the hosts in one subnet.

Here is how it would look in binary, you could do this in the other subnets as well but for the sake of this I picked the first 2 and the last 2.

(click image for larger)

 

Here is your graphic back with the scenario applied

(click image for larger)

 

6) What Are The Number Of Hosts And IP Ranges For Each Subnet?
You cant use the subnets itself (0, 32, 64, 96, 128, etc.) and you can't use the broadcast or last host in the range (31, 63, 96, 126, etc.) so your ranges would look like:

Your first subnet is 0 and 32 subnets merged into a 62 host range using a 192 mask, your host ranges are 1-62
The next 32 start at the 64 subnet and are 65-94
The next 32 start at the 96 subnet and are 97-126
The next 32 start at the 128 subnet and are 129-158
The next 32 start at the 160 subnet and are 161-190
The last subnet is 192 and 224 and are 32 subnets merged into a 62 host range using a 192 mask, your host ranges are 193-254

The two 192's can be applied to:
Manufacturing dep 40 host Future: 52 total
Marketing dep 30 host Future: 36 total

Some wonder why you can't use the first or last IP address in each subnet. With the exception of the 1st octet you technically can in the network side of the IP address, the 2 n-2 applies to the host side where routers use 0 or the broadcast (255) in the routing tables. I think the easiest way to think of it in the physical world is to look at the 0 and broadcast (255) IP's each as a side in a cubical wall separating host computers inside each subdivided/subnetted area. Each wall of course has two sides, the same is true with TCP/IP walls except each wall of a subdivided/subnetted area is a wall of zero's (such as .0000) or a wall of ones (such as .1111) and the computer hosts fit in between.

Hope that helps

Leave a Reply

You must be logged in to post a comment.