Home > Networking Tips > > Protocols, Lesson 8: Subnetting analysis
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Protocols, Lesson 8: Subnetting analysis


Firewall.cx
10.11.2004
Rating: -4.90- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


We have already covered subnetting in some depth, but there is still much to learn. We are going to explain the available subnet masks and analyze a class C network using a specific subnet mask. It's all pretty simple, as long as you understand the logic behind it.

Understanding and analyzing different subnet masks

OK, so we know what a subnet mask is, but we haven't spoken (yet) about the different values they take, and the guidelines we need when we use them. That's what we are going to do here.

You cannot take any subnet mask you like and apply it to a computer or any other device, because depending on the random subnet mask you choose, it will either create a lot of routing and communication problems, or it won't be accepted at all by the device you're trying to configure.

For this reason, we'll look at the various subnet masks so you know exactly what you need to use, and how to use it. Most important, we are going to make sure we understand WHY you need to choose specific subnet masks depending on your needs. Most people simply use a standard subnet mask without understanding what that does. This is not the case for the visitors to this site.

Let's first have a look at the most common subnet masks, and then I'll show you where the numbers come from:

Common subnet masks

In order to keep this place tidy, we are going to see the common subnet masks for each class. Looking at each class's subnet mask is possibly the best and easiest way to learn them.

 

Numer of bits

Class A

Class B

Class C

         0 (default mask)

255.0.0.0 (default_mask)

255.255.0.0 (default_mask)

255.255.255.0 (default_mask)

         1

255.128.0.0 (default +1)

255.255.128.0 (default+1)

255.255.255.128 (default+1)

         2

255.192.0.0 (default+2)

255.255.192.0 (default+2)

255.255.255.192 (default+2)

         3

255.224.0.0 (default+3)

255.255.224.0 (default+3)

255.255.255.224 (default+3)

         4

255.240.0.0 (default+4)

255.255.240.0 (default+4)

255.255.255.240 (default+4)

         5

255.248.0.0 (default+5)

255.255.248.0 (default+5)

255.255.255.248 (default+5)

         6

255.252.0.0 (default+6)

255.255.252.0 (default+6)

255.255.255.252 (default+6)

         7

255.254.0.0 (default+7)

255.255.254.0 (default+7)

255.255.255.254 (default+7) * Only 1 Host per subnet

         8

255.255.0.0 (default+8)

255.255.255.0 (default+8)

255.255.255.255 (default+8) * Reserved for Broadcasts


The above table might seem confusing at first, but don't despair! It's simple; really, you just need to look at it in a different way!

The trick to understanding the pattern of the above table is to think of it in the following way: Each class has its default subnet mask, which I have noted using the green color, and all we are doing is borrowing a bit at a time (starting from 1, all the way to 8) from the host ID portion of each class. I have used various colors to show you the decimal numbers that we get each time we borrow a bit from the host ID portion. If you can't understand how these decimal numbers work out, then you should read up on the Binary & IP page.

Each time we borrow a bit from the Host ID, we split the network into a different number of networks. For example, when we borrowed three bits in the class C network, we ended up partitioning the network into eight smaller networks. Let's take a look at a detailed example (which we will break into three parts) so we can fully understand all the above.

We are going to do an analysis using the class C network and three bits which we took from the host ID. The analysis will take place once we convert our decimal numbers to binary, something that's essential for this type of work. We will see how we get eight networks from such a configuration and their ranges!


In this first part, we can see clearly where the eight networks come from. The rule applies to all types of subnets, no matter what class they are. Simply take the subnet bits and place them into the power of two and you get your networks.

Now, that was the easy part. The second part is slightly more complicated and I need you focused so you don't get mixed up!

At first the diagram below seems quite complex, so try to follow me as we go through it:


The IP address and subnet mask is show in binary format. We focus on the last octet which contains all the information we are after. Now, the last octet has two parts, the subnet ID and host ID. When we want to calculate the subnets and hosts, we deal with them one at a time. Once that's done, we put the subnet ID and host ID portion together so we can get the last octet's decimal number.

We know we have eight networks (or subnets) and, by simply counting or incrementing our binary value by one each time, we get to see all the networks available. So we start off with 000 and finish at 111. On the right hand side I have also put the equivalent decimal number for each network.

Next we take the host ID portion, where the first available host is 0 0001 (1 in Decimal), because the 0 0000 (0 in Decimal) value is reserved as it is the network address (see IP classes page), and the last value which is 1 1111 (31 in decimal) is used as a broadcast address for each subnet (see Broadcast page).

Note:
I've given a formula in the IP classes page that allows you to calculate the available hosts, that's exactly what we are doing here for each subnet. This formula is :2 to the power of X -2. Where X is the number of bits we have in the host ID field, which for our example is 5. When we apply this formula, we get 2 to the power of 5 - 2 = 30 Valid (usable) IP addresses. If you're wondering why we subtract 2, it's because one is used for the Network Address of that subnet and the other for the Broadcast Address of that subnet. This shouldn't be new news to anyone :)

Summing up, these are the ranges for each subnet in our new network:





I hope the example didn't confuse you too much; the above example is one of the simplest type, which is why I chose a class C network, they are the easiest to work with.

If you did find it somewhat difficult, try to read over it slowly. After a few times, you will get to understand it. These things do need time to sink in!

Return to the introduction or continue to Lesson 9.



Click over to Firewall.cx for more articles like this one. You don't have to register or jump through any hoops. All you do is get the networking information you want. Copyright 2004 Firewall.cx.

Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Network Administration
Why is access denied to my Active Directory (AD) users and computers?
What network loss testing tools/methods calculate dropped packets from a PC?
Network user management
Do I have to disable DHCP on my router to create a DHCP server?
What preventative maintenance procedures for network devices exist?
Top 10 reasons why computers do not have network access to each other
Troubleshooting -- 'Network Know-How' Chapter 17
How server virtualization improves efficiency in a client-server model
Understand Windows tracert output to troubleshoot network connectivity
Why would a computer show drive letters for discs that don't exist?
Network Administration Research

IP Networking
What is the definition of ATM (Asynchronous Transfer Mode)?
Do I have to disable DHCP on my router to create a DHCP server?
Windows Server 2008 IP routing configuration: Static and dynamic RIPv2
What is IP?
Connect your LAN to the Internet using static or dynamic NAT
Using tracert and TTL to troubleshoot network connectivity problems
Test your TCP/IP protocol stack to troubleshoot network connectivity
IP addressing and subnetting explained
Checking IP configuration to troubleshoot Windows network connectivity
Does IPv6 abandon TCP/IP fragmentation?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
availability  (SearchNetworking.com)
carrier detect  (SearchNetworking.com)
fiber jumper  (SearchNetworking.com)
layer 2  (SearchNetworking.com)
MAE  (SearchNetworking.com)
Network layer  (SearchNetworking.com)
networking  (SearchNetworking.com)
OSI  (SearchNetworking.com)
patch cord  (SearchNetworking.com)
staggered quadrature phase-shift keying  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Networking Solutions for Business

Alcatel-Lucent Network Business Communications Solutions

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts