The importance of the subnet mask

From Understanding the Network, a Practical Guide to Internetworking, by Michael J. Martin, New Riders. How important is a correct subnet mask in an IP address? If the subnet mask isn't correct, then all sorts of problems ensue. Configuring a correct IP subnet mask is vital for good network routing performance. Imagine that a gateway is connected to three different IP networks. When the gateway receives an IP datagram, it looks at the...

network address portion of the datagram's destination address and then looks to see if it knows how to reach that network. It performs this lookup by comparing the datagram's IP address to a table of networks it knows how to reach. This table is known as a routing table. The routing table is created using the IP addresses and masks of its connected interfaces. The router uses the mask to determine the network address of its connected interfaces and then places the network address in the table. If the destination address matches one of the networks to which it is connected, the datagram is forwarded through the corresponding gateway interface. If the datagram is not destined for one of the networks to which the router is connected, the packet is forwarded to another gateway, or discarded. This same process is performed by the end-stations. When an end-station creates an IP datagram, it takes the destination address of the datagram, compares it to its own address, and then uses its subnet mask to see if the network addresses match. The datagram is either forwarded on the destination or is sent to the gateway. The subnet mask is clearly important and will cause problems if not set correctly. For more on Understanding the Network, a Practical Guide to Internetworking, go to

This was first published in September 2000

Dig deeper on Network Design




1 comment


Forgot Password?


Your password has been sent to: