Divide and conquer your network performance

Friday May 26th 2000 by Brien M. Posey

The more nodes you add, the slower your network becomes. Dividing your network into subnets can win the performance battle--and it isn't as difficult as you may think.

If your network started out small, you may find that as you add more nodes, performance suffers due to the number of TCP/IP broadcasts across the network. One solution to such a problem is to divide your network into multiple subnets. In this article, I'll explain and define why using multiple subnets may benefit your network's performance.

Why add subnets?

"By isolating each subnet from the rest of the network via a router, you greatly reduce the number of TCP/IP broadcasts flowing across any one portion of the network. "

An IP address is composed of a network number and a computer number. The two numbers are differentiated by looking at the subnet mask. A subnet mask of indicates that the first two numbers of the IP address are the network number and the last two are the computer number.

Any time a computer that's running TCP/IP needs to send a packet, it looks at the destination address of the packet. If the network number is the same as the PC's own network number, the request is sent as a broadcast across the network so the destination PC may receive it. Otherwise, the request is sent to the default gateway, which is usually a router.

The problem with having large numbers of PCs on a single subnet is that any packet sent within the network is broadcast to all the client--and ignored by all except the recipient PC. As a result, a high number of collisions will take place on the network. A collision occurs when two PCs try to send information at the same time. When a collision occurs, both packets are destroyed, and both PCs must resend their packets. Needless to say, this process of sending and resending really slows things down.

A solution to this problem is to divide the network into multiple subnets, each separated by a router. By doing so, all the network traffic will stay within its own designated subnet unless the traffic is specifically intended for another subnet. By isolating each subnet from the rest of the network via a router, you greatly reduce the number of TCP/IP broadcasts flowing across any one portion of the network.

Establishing subnets

"As subnets increase, the number of total IP addresses in each subnet decreases. "

The idea behind adding subnets sounds simple, but many network administrators become confused when they need to subdivide their existing subnets. However, as I'll explain, the process isn't as difficult as it may sound. Defining your new subnets is a three-step process:

1. Take the number of segments in your network and convert it to a binary number.

2. Count the number of bits required to represent the number of segments in binary form.

3. Write down a 1 for each bit required to represent the number of segments in binary form, followed by 0s until you have a total of eight digits. Convert the eight-digit binary number into decimal format to reveal your subnet mask.

For example, suppose you have six physical segments. The binary number for 6 is 110, which takes three bits to represent. Therefore, you use three 1s followed by five 0s to get the binary number 11100000, which converts to 224. Therefore, in a Class B network, the subnet mask would be

Once you've calculated your subnet mask, you need to calculate the IP addresses that will be valid for each segment on your network. Keep in mind that the greater the number of physical segments, the lower the number of available IP addresses in each segment. To calculate the valid IP addresses for each segment, take the binary number used to calculate the subnet mask and represent the bits that are currently occupied by 1s using every possible combination. For example, following are the various combinations of the first three bits of the number 11100000:

00000000 = 0
00100000 = 32
01000000 = 64
01100000 = 96
10000000 = 128
10100000 = 160
11000000 = 192
11100000 = 224

Now, ignore the first and last numbers on your list, because TCP/IP doesn't allow you to use all 0s or all 1s for this purpose. You can now build a list of valid IP addresses based on the numbers you've just compiled. For example, using the Class B address that we've been working with, the valid IP address ranges for each subnet would be as follows:

a.b.32.1      to     a.b.63.254
a.b.64.1      to     a.b.95.254
a.b.96.1      to     a.b.127.254
a.b.128.1     to     a.b.159.254
a.b.160.1     to     a.b.191.254
a.b.192.1     to     a.b.223.254

As you can see, by using this method, you have produced six ranges of IP addresses--one range for each subnet on your network. As I mentioned earlier, though, keep in mind that the more physical segments you use, the fewer valid IP addresses you'll have available. In the example, you would have a total of 2,097,150 possible IP addresses. However, if you made 254 network segments out of the same Class B network, you'd have a mere 65,534 valid IP addresses.

I should also point out that although I used a Class B address in the examples, the same principle also applies to Class A and Class C addresses. If you're lucky enough to have a Class A or B range of IP addresses, you aren't limited to using a single octet to define the subnet mask. As you may recall, the subnet mask was defined by representing the number of segments in reverse binary form and calculating the decimal equivalent. However, if you have an excessive number of segments, you can use more than one octet to represent this number. By using this method, you can dramatically increase the number of subnets on your network. Keep in mind that as subnets increase, the number of total IP addresses in each subnet decreases. //

Brien M. Posey is an MCSE who works as a freelance writer and as the Director of Information Systems for a national chain of health care facilities. His past experience includes working as a network engineer for the Department of Defense. Because of the extremely high volume of e-mail that Brien receives, it's impossible for him to respond to every message, although he does read them all.

Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved