Subnetting Example

In network 131.108.0.0, suppose that you want to perform eight-bit masking of the class B network. Recall that the first two bytes cannot be altered in a class B network. Therefore, to perform subnet masking, you must borrow bits from the third byte and use it completely.

As mentioned earlier, subnet masking is performed by borrowing bits from the host portion of the assigned network address, which assigns more routable network addresses within the assigned network address. For subnet masking, you would perform a logical AND operation between the network number and the mask assigned, as shown here:

For eight-bit masking, you can further divide the network into smaller segments to produce the following:

All zeros and all ones signify the broadcast address so that they usually cannot be assigned as the subnet, but Cisco Systems does allow subnet zero to be used as a subnet address. To enable the subnet zero as an IP subnet, you must use the ip subnet zero command:

ip subnet zero

This should be done carefully to ensure that there are no old hosts that do not understand subnet zero as the broadcast address. Cisco leaves the choice to the network administrator. If the administrator is sure that all hosts in the network do not treat subnet zero as the broadcast address, this additional subnet can be used on the network.

Subnetting is completed between the network number and the subnet mask by a logical AND operation:

131.108.0.0 255.255.255.0

When a logical AND is performed between the network numbers, the third byte is advertised as the network portion. Recall that anything ANDed with one yields the same number. If you assign an IP address of 131.108.1.1 to an interface, the result, after performing the logical aNd with the mask, is 131.108.1.0—anything ANDed with zero yields zero.

Subnetting is performed to assign addresses to different segments of networks, as well as to isolate the broadcast domains. It also provides more flexibility to a network.

On the host portion of each subnet, there is a maximum of 254 hosts. Remember, however, that there are eight bits left for the host portion because the network was subnetted after borrowing eight bits from the assigned class B network address. Because eight bits are left for the host portion, there are 256-2 addresses left for each host per subnet. You cannot use all zeros and all ones in an address, which disqualifies two addresses out of the 256 host addresses.

Was this article helpful?

0 0

Post a comment