Sign in with
Sign up | Sign in
Your question

What is a Subnet Mask?

Tags:
  • Subnet
  • Networking
Last response: in Networking
Share
September 17, 2014 6:30:37 PM

I am trying to learn a lot of networking but for some reason nothing I read online describes this to me in an understandable form.

More about : subnet mask

September 17, 2014 6:45:58 PM

Think of it like a filter on which IP address are directly accessible at the IP layer. With 255.255.255.0 -- only the last octet is directly accessible to the host. To get to a network with routeable IP address different than the host's first three octets, the IP stack has to rely on outside routing. You could have a mask of 255.255.0.0, and the last two octets of address space are directly accessible. MOST of the time a class C mask (255.255.255.0) on a host with network hardware handling the routing.
m
0
l
September 17, 2014 6:49:58 PM

Netmasks is the old school version of prefix length:
Prefix notation: 12.0.0.0/8
Netmask equivalent: 255.0.0.0

The /8 in prefix notation is simply the number of 1s padding the leftmost bits of the netmask. If you have a netmask of 255.255.0.0, the equivalent prefix length is /16.
m
0
l
Related resources
September 17, 2014 7:10:17 PM

http://en.wikipedia.org/wiki/Subnetwork

http://www.webopedia.com/TERM/S/subnet_mask.html

http://compnetworking.about.com/od/workingwithipaddress...

I like THIS definition best:
"A mask is used to determine what subnet an IP address belongs to. An IP address has two components, the network address and the host address. For example, consider the IP address 150.215.017.009. Assuming this is part of a Class B network, the first two numbers (150.215) represent the Class B network address, and the second two numbers (017.009) identify a particular host on this network."
m
0
l
September 17, 2014 7:47:49 PM

Oh, so does it kind of describe the values each decimal can reach in an IP? Sorry I am still somewhat confused :p 

Maybe a better question would be what a subnet is?
m
0
l
September 18, 2014 6:05:43 AM

turkey3_scratch said:
Maybe a better question would be what a subnet is?

The subnet/netmask defines which part of the IP is part of the network address (net block) and which part is considered a local address within that net block.

Computers and routers use that to determine if an address is local ("on-net") or requires routing through other networks. The "network address" is used to check routing tables and decide where to forward that non-local traffic to.
m
0
l
!