Possible Duplicate:
How does Subnetting Work?

Subnet mask is usually something like 255.255.255.0. And until now, its the field I usually ignore.

I am trying to read the wikipedia entry, but its pretty loaded with jargon.

Can anyone explain in simple terms what a subnet mask is for and how it works?

link|improve this question

60% accept rate
feedback

closed as exact duplicate by jscott, Chris S, pauska, DanBig, coredump Apr 14 '11 at 14:10

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

up vote 3 down vote accepted

Simply put, it tells the OS which part of the IP address refers to the network, and which part refers to a host on that network. If the host needs to send data to an IP address where the network portion of the address differs, then it routes that data through whatever the default gateway/router address happens to be.

So if your subnet mask is 255.255.255.0, then the first three bytes of your IP address are the network, and the fourth byte refers to hosts within that network. If any of those first three bytes are different, the host will send the data through its default gateway (or fail if one isn't configured).

link|improve this answer
feedback

IP && MASK = Network ID
IP && !MASK = Host ID (on that network)

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.