
Subnet Masks
Subnet Masks 관련
Another way to express the network prefix is by using a subnet mask, like so:
255.255.0.0
When converted to binary, 255
in decimal equals eight 1
s in binary – so all bits are on. So if you translate this mask into binary, you get:
11111111 11111111 00000000 00000000
In other words, 16
bits are on, which means a network prefix of 16
bits. Both conventions (CIDR notation and subnet masks) are used very frequently.

(Source:
BriefVid
)With CIDR, an address can reside in different networks given different network prefixes, or subnet masks. If you consider the same example address with a different prefix, say that of 8
bits – both additional addresses would belong to the same network, as they all share the first 8
bits – 200
.
How would you present a network prefix of 8
bits as a subnet mask? You need the first 8
bits to be on, so that means 255
in decimal, and the remaining bits are off, resulting in this subnet mask:
255.0.0.0

(Source:
BriefVid
)What happens if you use a network prefix of 24
bits? First, how would you express that as a subnet mask? You need 24
bits to be on, so that is 3 times 8 bits to be on, resulting in:
255.255.255.0

(Source:
BriefVid
)Now, neither of the additional addresses reside within the same network as the example address, as they don't share its network ID of 200.8.3
.

(Source:
BriefVid
)Note that network prefixes do not have to represent full bytes. For example, you can use a network prefix of 12
bits, or 11
bits, or 22
bits. When the prefix length isn't a multiple of 8
, the subnet mask will have a value other than 0
or 255
in one of its positions.
This addresses the issue regarding the startup company. If a startup has 300
employees, they'd need to get a 23
-bits network ID, leaving 9
bits for hosts within their networks. This means 2^9, or 512
addresses, which should be sufficient.