Rules to Subnetting an IP Address

Nodes on computer networks use IP addresses to identify themselves in data transfer. In most networks, a single router handles traffic from potentially dozens of computers. This can lead to confusion and slowed transfers. Subnetting, however, creates logical subdivisions of a network to streamline data processing. You can designate subnets, but you have to understand the basic concepts behind them for them to work properly.

  1. Binary Octets

    • IP addresses such as 13.5.40.2 are expressed in decimal notation to make them easier to read at the user level, but they're actually a set of four binary octets -- a series of eight bits. The maximum decimal value in a binary octet is 255, or 11111111 in binary. Therefore, 13.5.40.2 is actually 00001101.00000101.00101000.00000010. The first octet determines the class of the IP address, and therefore the number of hosts and subnets you can have.

    Network Classes

    • Networks are assigned one of three classes: class A, class B and class C. These depend on the first number of the IP address. Class A consists of IP addresses from 1.0.0.0 to 127.0.0.0. The 127 range is used for testing. Class B networks have IP addresses from 128.0.0.0 to 191.255.0.0. Class C networks range from 192.0.0.0 to 223.255.255.0. Each of these classes have one, two and three octets, respectively, available for the network address, leaving the remaining octets available for the host address.

    Subnet Mask Equation

    • Each network class has a default subnet mask created by changing all the network octet bit values to 1. A class A default subnet mask is 255.0.0.0, class B is 255.255.0.0 and class C is 255.255.255.0. However, you aren't going to actually use the default mask. You have to calculate remaining octets of the subnet mask based on how many networks and hosts you need. The formula for calculating networks and hosts on a subnet is 2n - 2, where "n" is a power of 2. The subtraction of 2 represents the two IP addresses you can't use: the network address and the broadcast address.

    Example Subnet Mask

    • Assume you have a class C network, with IP address 192.168.1.0, and you want to create six subnets that can handle 30 hosts each. Using the equation to determine the number of networks, 2n - 2 = 6, you get 3. Therefore, you allocate three bits to the network, leaving the rest available as hosts. Count the number of network bits from the left of the octet, convert them to decimal and add them. The three bits 128, 64 and 32 add to 224. Therefore, this subnet mask is 255.255.255.224.

    Network Increments

    • After figuring out the subnet mask, you have to determine the network increments, or where each subnet starts, by adding up the bit values. In the example, the subnet mask is 224. The values of an octet are 128, 64, 32, 16, 8, 4, 2 and 1. Adding 128, 64 and 32 gives you 224, so your network increments will be multiples of 32. Therefore, your first subnet address is 192.168.1.0, the second 192.168.1.32, the third 192.168.1.64 and so on.

Related Searches:

References

Comments

Related Ads

Featured