simply put, a subnet mask is an indicator to separate subnetwork and its host.
for an example, you have a class A network: 1.0.0.0
the default mask is 255.0.0.0
which means, the first octet (8 bits) is the network bits and the next 3 octets are (24 bits) host bits.
the network bits u cannot control. the host bits however, u can manupulate them to suit your need.
given the fact u have 24 bits -> 2^24 - 2 = number of hosts in a network.
but seriously, who has 16777214 PCs hooked up on their LAN? Not only LAN has its host limit but too many packet collision would make the network fail all the time.
To rectify the possible problem, you need to create subnetworks.
Simply put, subnetwork is network within a network.
with the network address 1.0.0.0, if one needs around 253 additional networks you would use the 2nd octets.
with that, each subnet still have 2^16-2 host available.
1.0.0.0 -> mask -> 255.0.0.0
1.0.0.0 -> 253 network = subnet mask -> 255.255.0.0
given the subnet mask 255.255.0.0
"255" portion is the network portion (whereas all binary bits equal to "1")
"0" portion is the host portion (whereas all binary bits equal to "0").
the network and subnet portion is masked out by using the binary value "1" to its network bit.
i hope i have made this clear.
Microbyte
![[medal] [medal] [medal]](/data/assets/smilies/medal.gif)
![[medal] [medal] [medal]](/data/assets/smilies/medal.gif)
![[medal] [medal] [medal]](/data/assets/smilies/medal.gif)
![[medal] [medal] [medal]](/data/assets/smilies/medal.gif)