This site uses advanced css techniques
There are plenty of these netmask references out there, but I prefer my own: hence this Tech Tip. We've never seen anybody use a network larger than a /4 (256M hosts), so we've truncated the table at that point.
|# bits||# hosts|| Usable
|/8||16777216||16777214||255.0.0.0||class A network||0.255.255.255|
|/16||65536||65534||255.255.0.0||class B network||0.0.255.255|
|/24||256||254||255.255.255.0||class C network||0.0.0.255|
|/31||point to point links only|
|/32||1||1||255.255.255.255||single IP address||use host notation|
All devices on a local network have a unique IP address, but each address is inherently divided into two parts, a shared network part, and a unique host part, and this information is used by the TCP/IP stack for routing. When sending traffic to a machine with a different network part, it must be sent through a router for final delivery.
The dividing line between the network and host parts is determined by the subnet mask, and it's often seen in 255.255.255.0 notation. It looks like an IP address, and it uses a "1" bit to select, or "mask" the network part.
In this case, the netmask of 255.255.255.248 represents 29 bits of network and 3 bits of host (totalling 32 bits, of course), and this give 8 possible IP addresses in this range. The first and last of the range are reserved addresses, giving 6 usable addresses that may be assigned to a device.
When creating ACLs for Cisco routers, one specifies networks using a base IP address and what looks like an inverted netmask: rather than set a one bit for each part of the address that's a network, they set a one bit for each part that's a host.
Many consider this quite annoying, as it's one more thing to have to remember.
First published: 2005/07/17