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 188.8.131.52, 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, 184.108.40.206 through 220.127.116.11. For example, if the department of Theoretical Physics has been assigned 18.104.22.168, they will thus use a subnet mask of 255.255.255.0.