70-240 in 15 minutes a week: Implementing, Managing, and Troubleshooting Network Protocols and Services Page 6
1 and 1 = 1
1 and 0 = 0
0 and 0 = 0
In our example, this would give us:
|IP||10011100 00010001 00101010 00000110|
|SM||11111111 11111111 11110000 00000000|
|AND||10011100 00010001 00100000 00000000|
After we convert our ANDed address back to decimal we get 22.214.171.124. This is the network ID that our host falls onto.
Stay with me here. We know that our mask is 255.255.240.0 (or /20). So, we know that the last 12 bits represent the hosts on this network. The network bits are in black below, the host bits in red. We already know that a host ID cannot be all zeros or all ones in binary. So, when I'm calculating the range of valid IPs on this subnet/network, I can't have either of these values. This leaves me with:
|Network ID||10011100 00010001 00100000 00000000|
|First Valid Host ID||10011100 00010001 00100000 00000001|
|Last Valid Host ID||10011100 00010001 00101111 11111110|
Note that the first valid host ID sets all host bits to zero except the last (called the least-significant bit), and the last valid host ID sets all host bits to one, except the last. What did I lose? Two addresses - the host ID being all zeros (which defines the network) and the host ID being all ones (the broadcast address, which is not valid for a host). These are the same 2 addresses that I subtract when trying to find how many hosts I can have per subnet. If I convert my ranges above to decimal, I end up with a range of:
126.96.36.199 to 188.8.131.52
The truth of the matter is that you won't necessarily have time to 'do the math' for every question that comes at you during the exam, so you'll need a way to quickly determine what ranges of hosts are valid on a subnet given a certain mask. For this purpose, I am providing the chart below. You can use this chart to quickly determine the valid ranges of IP addresses on a subnet based on the mask value, and where the next range starts. Please do not use this chart as a crutch if you don't understand how to determine valid ranges as we went through above. This is meant as a shortcut for those who already understand.
How the chart works is simple. Let's say I've been given a host ID of 184.108.40.206 with a mask of 255.255.248.0, and I want to quickly determine the range of host IP addresses valid on the same subnet as this host. This address is subnetted into the third octet based on the mask, so we take the third octet value (248) and plug it into the chart above. The Network value that corresponds to 248 is 8. As such, that means that every new subnet starts at a multiple of 8 in the third octet. For example:
220.127.116.11 subnet0 range = 18.104.22.168 to 22.214.171.124 *
126.96.36.199 subnet1 range = 188.8.131.52 to 184.108.40.206
220.127.116.11 subnet2 range = 18.104.22.168 to 22.214.171.124
126.96.36.199 subnet 3 range = 188.8.131.52 to 184.108.40.206
220.127.116.11 subnet 4 range = 18.104.22.168 to 22.214.171.124
126.96.36.199 subnet10 range = 188.8.131.52 to 184.108.40.206
220.127.116.11 subnet30 range = 18.104.22.168 to 22.214.171.124
126.96.36.199 subnet31 range = 188.8.131.52 to 184.108.40.206 *
* Although these ranges were usually omitted in a classful IP addressing system, they are totally valid under CIDR. Often these ranges are still omitted, however, due to the fact that some older equipment may not reference the ranges properly.
Note that our host is on subnet10, the range in red above. The same rules as always still apply, so be careful. The host ID cannot be all 0's or 1's. As another example, if the address had been 220.127.116.11/14, the subnet mask would be 255.252.0.0, making the range of addresses on the same subnet as this host everything on subnet 18.104.22.168, since new ranges start in multiples of 4. That would make the valid range:
22.214.171.124 to 126.96.36.199
If you go back to the ANDing process, and calculate the first and last host IDs in binary, you'll see that we've come up with the same answer, only much more quickly!
As I mentioned from the outset, this section was not meant to be a complete explanation of designing a subnetting scheme for a network. Instead, we learned how to define valid ranges of addresses based on a host ID and mask value, both in binary and using the shortcut method. For the purpose of 70-240, you will need to be able to troubleshoot IP addressing, and that's what I've focused on above. Once you can calculate valid ranges, you can then determine which host IDs are local and remote, and which hosts are capable of communicating properly. Only hosts that fall into the same range should be on the same subnet. You also now know that the problem may be the address or the subnet mask values of the hosts in question!
Want to practice your subnetting skills? Try my free subnetting practice exams.
Still looking for a short second opinion on subnetting? Click here.
How about a more comprehensive third opinion? Click here.
Wow. Welcome to the end of article 7. I know this has been a longer ride than usual, unless you already understood subnetting - then maybe a little shorter. That does it for the Windows 2000 Profession material. Next week I'll begin with a look at the Windows 2000 Server portion of the exam, topic to be determined. In the meantime, I have a very important announcement to make. I have teamed up with CDI Corporate Education to provide a very valuable free contest. One lucky winner will receive 6 months free unlimited access to the 70-240.com website, which carries a value of approximately $600 US. It includes a whole range of free online courses, practice exams, mentoring, and so forth. Interested in joining the contest? Please visit my website to enter. The prize will be given away on April 16, 2001 - plenty of time to make great use of those 6 months! As always, I look forward to your feedback, so please email me with any questions or comments. In the meantime, good luck with your studies, and good luck in the contest!
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...