Subnet Mask
To identify which portion is the address and which portion is the host
For example,
- subnet
255.255.0.0
can be present as:11111111.11111111.00000000.00000000
in binary. The1111..
part is the address part where as the000...
are the host part.- This can also be called
/16
since we have16
1
. - So when there is an ip in here, for example
192.168.2.1
, we know that the192.168
cannot be changed (Since the subnet is255
), what can be changes is the2
and1
- Which can result to
2^16 available hosts = 65356 - 2 = 65354
(we cannot use Broadcast address and Network address)
- Which can result to
- Similarly,
255.255.255.0
can be present as:11111111.11111111.11111111.00000000
or/24
since we have24
1
.- Now the available hosts are just
2^8 = 256 - 2 = 254