Networking & Internet
Subnet Mask
Definition
A subnet mask is a 32-bit number that masks an IP address and divides the IP address into a network address and a host address. The subnet mask is made by setting network bits to all "1"s and setting host bits to all "0"s.
Why It Matters
The subnet mask is how a computer determines whether another IP address is on the same local network or on a different network. This tells it whether it can send traffic directly or if it needs to send it to the router (gateway).
Contextual Example
For an IP address of `192.168.1.100` and a subnet mask of `255.255.255.0`, the network portion is `192.168.1` and the host portion is `100`. The computer knows that any other address starting with `192.168.1` is on the local network.
Common Misunderstandings
- Subnetting is the process of dividing a large network into smaller subnetworks, or subnets.
- The subnet mask is a fundamental part of IP configuration, along with the IP address and gateway.