Wednesday, May 26, 2010

Subnet Mask

Subnet Mask with an IP address allows you to identify the network part and host part of the address. Expression of Subnet Mask is similar to IP address, four binary octets is shown by dotted decimal. Bits representing network and host are split by its corresponding bits in Subnet Mask. The network bits are represented by the 1s in the mask and the node bits are represented by the 0s. The length of network part is equal to the number of contiguous one-bits in the subnet mask.
For example, using an IP address with subnet mask, we get:
10000010.00000101.00000101.00011001      130. 5 . 5 . 25   Class B IP Address
11111111.11111111.11111111.00000000      255.255.255. 0    Subnet Mask
--------------------------------------------------------
10000010.00000101.00000101.00000000      130. 5 . 5 . 0    Network Address
Though 24 contiguous one-bits are in subnet mask, the length of the network part in this IP address is 24. So network address is 130.5.5.0

Default subnet masks:
Class A - 255.0.0.0 - 11111111.00000000.00000000.00000000
Class B - 255.255.0.0 - 11111111.11111111.00000000.00000000
Class C - 255.255.255.0 - 11111111.11111111.11111111.00000000

No comments:

Post a Comment