Subnet Mask
This is foundational knowledge, I must understand how this works.
#TODO: move notes from ECE358 to here.
- A subnet mask is a 32-bit number created by setting host bits to all 0s and setting network bits to all 1s
- The subnet mask separates the IP address into the network and host addresses
What is the point of this?
Subnetting enables an organization to conceal network complexity and reduce network traffic by adding subnets without a new network number.
Resources
- Subnet Mask - Explained
- https://avinetworks.com/glossary/subnet-mask/
- https://www.computernetworkingnotes.com/networking-tutorials/ip-address-network-address-and-host-address-explained.html
Every device has an IP address with two pieces:
- Network address (server address)
- Host address (client address)
-
The subnet mask of 255.255.0.0 can be written as (
/16
), since the first 16 bits are used -
Subnet masks should consist of contiguous bits, and left to right? I guess?
-
Subnet masks must start with a continuous block of 1s followed by 0s, without interruption.
-
0.255.255.255 is not a valid subnet mask
-
255.255.0.255 is not valid either
Why split into 2 parts?
Easier to manage. Break a large network into subnetworks. Large broadcast traffic when so many computers are connected. So a network needs to be broken down. Traffic is reduced through routers.
IP addresses are either configured by a DHCP Server or manually configured (static IP addresses).
The subnet mask splits the IP address into the host and network addresses, thereby defining which part of the IP address belongs to the device and which part belongs to the network.