Tuesday, July 22, 2014

The Networking Basics You Need to Know in Order to Pass the CCENT Exam – Part 2

Sorry for the delay between posts.  I've been a little under the weather since returning from vacation.  I have also very busy at work.

Part 2 of this series begins with one of the harder skills to master in networking; IP Addressing Resolution and Subnetting.  Ask anyone who has ever studied to take the CCENT or CCNA exams, and they will most likely agree with me.  However, I think that most teachers will over-complicate it by stressing binary conversions, the base2 numbering system that breaks this all down to a series of ones and zeros.  I find that it’s easier and faster to work with IP addressing if you use as little binary as possible.  Why? Because it’s too slow to work with and it’s an extra step that’s just not necessary.  I’ve stressed in my earlier posts that speed is essential when taking the CCENT/CCNA exams. Since IP addressing resolution is prevalent throughout the exams, it only makes sense to learn a few shortcuts.

Please be patient and read the post a couple of times.  When you get it (and you will) you're going to wonder why you thought it was so hard in the past.

Without wasting any more time, here is an explanation of the next basic skill in the series:

Resolving an IP Address – Find the Network, Broadcast, First and Last Host, and Next Network Addresses
A typical question might ask you to find the network address where a given host address resides, or find the useable host address range for a given network. The useable address range does not include the network address (first) or broadcast address (last) for that network. If you are designing an addressing scheme, you will need to know how many networks you can create, and where one networks ends, and another begins.

Let’s look at a typical host address and mask, and then find the network address:
192.168.1.55 /24  or  255.255.255.0  (if you are given the mask in dotted-decimal)

The first thing that you need to know is that the subnet mask is used to filter out the host information and preserve only the network information of the address. The mask is used to show you where the network bits end and the host bits begin, so you can zero out the host bits. When a router looks at the destination address of a packet, it initially only cares about the network address in order to make a decision on where to forward the packet next.
In the example above, /24 means that the first 24 bits of the address (from left to right) are network bits, which should be left as is, and the last eight bits should be changed to zeros (0). Recall that there are 32 bits in an IP v4 address. The dotted-decimal mask, 255.255.255.0  means that all of the bits in the first three octets are set high (or are 1’s), and all of the bits in the last octet are set low (or are 0’s). When evaluating each bit in the host address you would compare it to each matching bit in the subnet mask. Just remember the rhyme: If it’s high, let it ride. If it’s low, let it go. I just made that up (And my English teacher said I would never amount to anything). Here is how that process would look like in binary.



Notice that only the ones (1’s) are left from the first 24 bits.  All of the host bits are changed to zero’s (0’s).  In fact, the first three octets from the host address are exactly the same after applying the mask. Two important shortcuts to learn from all of this are:
  1. If the mask bits are all 1’s in a given octet, then the matching host octet stay’s the same (like in octets 1-3 in the example above)
  2. If the mask bits are all 0’s in a given octet, than the matching host octet changes to all zero’s (like in octet 4)
Important Point: When resolving a host address to a network address, you should always be able to resolve three out the four octets very quickly by using the above shortcuts.

Here are five host addresses followed by the 3 octets that are easily resolved in red:

166.32.114.184   255.255.224.0   ======>  166.32.114.0

168.168.10.65   255.255.255.224   ======>  168.168.10.65

149.90.165.115  /21   ======>  149.90.165.0

126.5.43.153  /15   ======>  126.5.0.0 

150.163.46.151   255.255.128.0   ======>  150.163.46.0
Note: The octet that's left in bold black text would still need to be resolved (coming).

Let’s look at a couple examples where we find the network address from a given host address.
Finding the Network Address - Example 1

Find the network address from the following host address and mask:
172.16.76.125 /18  or  255.255.192.0

Octets 1, 2, and 4 can be resolved with just a glance:  172.16.76.0. Octet 3 still needs resolving.
Here’s the binary depiction. As you can see, writing it out in binary takes a lot more time than using the shortcuts.


To resolve the third octet without binary we use the Jump Number method.  The Jump Number is the decimal value of the last network bit in the subnet mask (see below).  The 18th bit (as in /18) is equal to 64, which means that the network number for that octet will be some increment of 64, starting from zero (0, 64, 128, 192). 

 
 
 
Tip: The host number will always be greater than or equal to the network number for the octet that you are resolving with this method
Since the number in the host address for that octet was 76 and it falls between 64 and 128, the network number is 64 and the network address is 172.16.64.0.  The network number for the unresolved octet will always be an increment of the Jump Number as long as you remember to start counting at 0.
Finding the Network Address - Example 2

Find the network address from the following host address and mask:
188.42.59.45 /21  or  255.255.248.0

Since the network bits end in the third octet again (you can see this better by looking at the dotted-decimal mask) the unresolved octet will be octet 3 again. The three octets that can be resolved at a glance are 1, 2 and 4 or 188.42.59.0
This time the last network bit in the subnet mask is the 21st bit, which is equal to 8.


 
By the way, any time you're given the subnet mask in dotted decimal, you can find the Jump Number just by subtracting the octet value that contains last network bit from 256 (256-248 = 8). In the last example we would subtract 192 from 256 (256-192 = 64).
Back to our example: The jump number that was found is 8. This means that the network number for that octet will be some increment of 8, starting from zero (0, 8, 16, 24, 32, 40, 48, 56, 64, etc.. .). Hint: you can stop counting once you pass the host number for that octet (59).
Since the number in the host address for that octet was 59, which falls between 56 and 64, the network number is 56 and the network address is 172.16.56.0.

I will stop here and we will finish this topic next time. In the meantime, here are several host addresses for you to resolve to network addresses:

200.55.116.97  255.255.255.240

88.65.146.77 /13

145.85.117.252  255.255.224.0

196.145.98.177 /27

166.98.225.77  255.255.252.0

I will post the answers tomorrow. Your comments and questions are welcome.

And the answers are:

200.55.116.97  255.255.255.240   ======>  200.55.116.96  

(First three octets don’t change; Jump# is 16 – 256-240)

88.65.146.77 /13   ====> 88.64.0.0 
(1st octet doesn’t change; Octets 3-4 change to 0; Jump# is 8 – 13th bit = 8)
145.85.117.252  255.255.224.0  ===> 145.85.96.0  

(1st two octets don't change; Octet 4 changes to 0; Jump# is 32 – 256-224)
196.145.98.177 /27   ===>  196.145.98.160
(First three octets don’t change; Jump# is 32 – 27th bit = 32)
166.98.225.77  255.255.252.0   ==>  166.98.224.0 

(1st two octets don't change; Octet 4 changes to 0; Jump# is 4 – 256-252)

Your questions and comments are welcome.

-Jim (rev 7/26/2014) 

1 comment: