Classnotes | UNIX02 | RecentChanges | Preferences When you write a letter to someone, you an address on the envelope specifying the country, state, and Zip Code. In delivering it to its destination: it will be sent to the country indicated, where the national service will dispatch it to the proper state and region.
The advantage of this hierarchical scheme is obvious: wherever you post the letter, the local postmaster knows roughly which direction to forward the letter, but the postmaster doesn't care which way the letter will travel once it reaches its country of destination. IP networks are structured similarly.
A subnet takes responsibility for delivering datagrams to a certain range of IP addresses. It is an extension of the concept of splitting bit fields, as in the A, B, and C classes. However, the network part is now extended to include some bits from the host part. The number of bits that are interpreted as the subnet number is given by the so-called subnet mask, or netmask. This is a 32-bit number too, which specifies the bit mask for the network part of the IP address.
As an example, if we had a university with a class B network number of 18.104.22.168, its netmask would be 255.255.0.0.
Internally in this university, the campus network consists of several smaller networks, such various departments' LANs. So the range of IP addresses is broken up into 254 subnets, 22.214.171.124 through 126.96.36.199. For example, if the department of Theoretical Physics has been assigned 188.8.131.52, they will thus use a subnet mask of 255.255.255.0.