Meditations on Custom Subnets

(Please note: No one but me is supposed to enjoy, remotely fathom, or even read this post.  This one is just for me, because it’s a study guide I wrote up for what I am currently studying in computer certification, and I figure I might want to refer to it at work, so the Informatubes is a good a place as any to post it.  Thus warned, we continue with a clear conscience….)

Custom Subnetting

Subnetting is fucking simp! Just start here:

1. You have to know how many addresses and how many subnets you are looking for.  This will be given in the test question, or will be obvious given your network needs in the real world.  The whole point of this, after all, is to accommodate the addition of future network segments over a period of time, so it should be pretty obvious what your needs are given your expectations of the number of addresses you will need, number of departments in the company, total number of computers, etc.

2. Identify your parameters by asking two questions:

a.)  How many hosts needed? When calculating hosts, always add one to the number of hosts needed, then convert that number to binary.  Now you know how many bit positions you will need for the host and network portion of the address.

b. ) How many subnets? Just like when calculating hosts, finding the number of bit positions for a subnet is done by taking the number of subnets required, subtracting one and converting to binary.

3.  Now that you know your number of bit positions, you can then apply them to make the subnet mask.  The subnet mask, of course, applies across all subnets.  That is kind of the point.  Yes, Juniper, this number is kinda superfluous.  But I’m too lazy efficiency-conscious to change it.

4.  Figuring the maximum number of host IDs: input 2 into the calculator and use the “power of” button in scientific mode to calculate against the number of bit positions you have.  For example, if you had 11 bit positions for host ID, you would input 2 (xy) 11 = 2048.  Remember:  you cannot have all zeros or all ones for a host ID, so the correct number of host IDs would actually be 2048 – 2, or 2046

5. Figuring the maximum number of subnets: (same as above) 2 (xy) 5 = 32.  You don’t have to subtract for this value, therefore the correct number is just as listed: 32.

6. Figuring the Subnet IDs (network addresses per each subnet):  The way you figure this out is hard to write down but easy to do.   You have to take the last bit position of your subnet ID, convert it to decimal, then use that number as the multiple for all your subnets.   A table is the best way to show this.

Example 1:

Custom Subnet Mask

also written as


Maximum Hosts Per Subnet 8190
Maximum Subnets 8
Subnet IDs – default network ID, our starting point.

(last bit position of subnet address *above in purple* converts to decimal 32, so the subnet IDs are as follows)

And so on…

Host ID Ranges – – –

And so on…

7. Figuring Host ID ranges:  For most address classes, this is extremely easy.  Starts with 1 and ends at 254 (see above for example), excepting 0 and 255 because you cannot have all ones or all zeros in your host addresses, due to standard IP addressing rules.


Figuring the Host IDs range is very easy except in the case of doing a Class-C address range.  Bonus: it’s also nearly impossible to explain in any coherent way!  So um, here’s another table.

Example 2:

Custom Subnet Mask (class C)

Maximum Hosts Per Subnet 14
Maximum Subnets 16
Subnet IDs

And so on…

Host ID Ranges|1111 = 15

(incorrect, as all ones not allowed in the Host ID portion of the address, even though it looks fine in decimal)|1110 = 14

(correct, because it obeys the exclusion of all ones)

The first Host ID for the next Subnet is also a bit different:|0000 = 16

(incorrect, as all zeros not allowed in the Host ID|0001 = 17

(correct, because it obeys the exclusion of all zeros) – – – –

And so on…


0 Responses to “Meditations on Custom Subnets”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

March 2010
« Feb   Apr »

Currently Reading:

Burning in Water, Drowning in Flame - Charles Bukowski

Currently Listening:

Mr. Bungle - California

Why, yes, I am cool as a cucumber in a bowl of hot sauce.

You lika de juice????

%d bloggers like this: