Subnet masks

Realistically, there are not 216 machines on a class B network (the physical wire cannot support that many machines)

But, using subnet masks, the class B network can be configured as a class C network.

If your IP address is 169.124.21.118 (that's a class B), you can tell IP to use 169.124.21 as the network number instead of 169.124.

You do that by specifying a mask of 255.255.255.0. The 1's tell the network number. The 0's tell the host number.

So, the subnet mask is used to inform the IP software as to which bits represent the network number and which bits represent the host number.

In a network, all machines must have the same subnet mask. If not, the definition of the network number would vary from one machine to the next, and that would cause the IP software to malfunction.

Note that subnet masks do not have to be contiguous.  The subnet mask can be used to have any bits in the host number act as the network number.

Some more notes on the TCP/IP suite:

The Internet Protocol

The Address Resolution Protocol The Transmission Control Protocol There are several aspects of TCP that applications must be aware: The User Datagram Protocol There are several aspects to UDP that applications must be aware:

The Internet Control Message Protocol

Routing Protocols