networkdojo.net presents: How to Subnet – Part 1 (the primer)

Before we get into the meat of this critical matter of subnetting we have to cover a few bases.  I want to move forward assuming you understand a few basic things.   We’ll be dealing with IPv4 addresses, I will call them simply IP addresses… Although I am referring to IPv4 addresses.  IPv6 (the one that looks like a MAC address) is out of scope in everything I write in this post.

Audience:  Those who don’t get subnetting but have a need to learn to subnet.

Here are some fundamental truths you must learn:

++ An IP address can be anything in the range of  0.0.0.0  and 255.255.255.255 ,  0.0.256.0 is not a valid address.  Why not 256? It cannot be represented in the 8 bits that compose the 3rd octet.

You call the value between the periods “octets”.  For IP 1.2.3.4  …  1 is in the 1st octet, 2 in the 2nd, 3 in the 3rd  and 4 in the fourth.

Each octet is composed of eight bits (bit locations, which could be on or off.

_ _ _ _ _ _ _ _ . _ _ _ _ _ _ _ _. _ _ _ _ _ _ _ _. _ _ _ _ _ _ _ _     This is the 4 octects of an IP address represented by the bit locations, each underscore represents a bit location.

There are 32 bits, 8+8+8+8.

You MUST learn the powers of 2, this is elementary and absolute.  for the higher one it helps to remember that 2^10 to the tenth starts with 10.  Every power is twice the previous one, or half of the next one.


. __    __    __    __      __   __  __   __  .     The eight underscores of one octet (8 bits).  You must absolutely without fail learn the value of each bit location.   The left-most bit of an octet is worth 128, this is true for every octet.

128  64     32    16       8     4     2     1           <– These are the values of the specific bit locations.  These values are the same for each bit location.
2^7         –>             –>                 2^0

Here’s a few examples of how you would represent decimal numbers in binary bits (of one octet).

1 =
0      0       0      0        0       0     0     1
__    __    __    __      __   __   __   __
128  64     32    16       8     4     2      1  

2 =
0      0       0      0        0       0     1     0
__    __    __    __      __   __   __   __
128  64     32    16       8     4     2      1  

12 =
0      0       0      0          1     1      0    0
__     __     __    __      __   __   __   __
 128  64     32    16       8     4     2      1  

240 =
1      1       1      1           0     0      0    0
__    __      __    __      __   __   __   __
128  64     32    16       8     4     2      1  

255 =          (all bits on)
1      1       1      1            1     1      1    1
__    __      __    __      __   __   __   __
128  64     32    16       8     4     2      1  

Learning to work with binary numbers (converting a regular decimal number to binary, and binary numbers back to decimal) is a fundamental skill for subnetting.

This skilled must be honed through practice… try the cisco binary game.  Play this game until you’re dreaming in binary.  🙂    You can download the binary game on your iPhone.

A little bit of memorization here goes a long way.  Memorize the additions of the bits from left to right.  192  224  240  248  248  252  254  255.

128+64 = 192
192+32 = 224
224+16 = 240
240+8= 248
248+4=252

Later it will make perfect sense why memorizing these additions is essential.    Once you’ve committed these to memory, and are dominating the Cisco Binary game you can graduate to ‘How to subnet – Part 2’.   As a bonus you can feel confident because no one in their right mind will call you a weaksauce binary noob.  If they do – they are gravely mistaken.

Look deep within your soul… if you feel are ready, click here for Part 2.

Later peeps.

~

Gabe @ networkdojo.net

Advertisements