Recent Changes - Search:

Classes

FinalExam

Troubleshooting

edit SideBar

Netmask

Netmask

Your netmask, or subnet mask, tells you what IP addresses are local to your IP address. Local addresses share your subnet, like the 152.2.145 subnet. Although your IP address must be unique, your netmask certainly is not.

To determine the range of addresses that are local, you mask your IP address with your netmask. In binary, a 1 means that the binary digit must match; a 0 means it can be either a 0 or a 1. So the lowest possible local address has all zeroes where possible, while the highest has all ones where the netmask allows a choice. That lowest possible address is reserved to represent this network. That highest possible address is also reserved, as the broadcast address for this network. No network node may use these addresses.

0this
1all

A one in the binary netmask means that the corresponding binary digit in your IP address must match the digit in that position in another address for the other address to be local. A netmask zero means the binary digit in that position doesn't have to match.

1must matchnetwork bits/(count) in CIDR notation
0no requirementhost bits232-count local addresses

If you're the visual type, imagine the netmask is a stencil. Place the stencil over your IP address, and then push a paint roller over it. The zeroes let the paint block out binary digits, but the ones don't let enough paint through to obscure your address. Ones must match, zeroes free choice.

o o o • • •

Simple Example

152.002.145.034 is my IP address
255.255.000.000 is my netmask (a classic Class B)
---------------
152.002.***.***

The range of local addresses is from 152.2.0.0 to 152.2.255.255. The address 152.2.0.0 represents this network; 152.2.0.0/16 represents the network and its netmask at the same time (/16 means 16 ones in the netmask in CIDR notation).

Example

10011000.00000010.10010001.00100010 is 152.2.145.34 in binary
11111111.11100000.00000000.00000000 is 255.224.0.0 in binary
-----------------------------------
10011000.000*****.********.********

10011000.00000000.00000000.00000000 is the lowest possible address, or 152.0.0.0. This network is 152.0.0.0/11.

10011000.00011111.11111111.11111111 is the highest possible address, or 152.31.255.255 as the broadcast address to reach all nodes on the 152/11 network.

Edit - History - Print - Recent Changes - Search
Page last modified on January 28, 2009, at 01:29 PM EST