IP subnet
IP Subnet
IP Subnets are boundaries between logical networks in the IP space.
- IPv4 Subnet masks can be written in dotted-decimal (e.g., 255.255.0.0), or in CIDR/slash notation (e.g., /16).
- The first address in a subnet range is reserved for the Network Address, and the last address is reserved for the Broadcast Address
- Therefore, the number of host address is the size of the subnet range minus 2
- It is the opposite of a Wildcard mask.
Shortcuts for Subnet Masks and Network Classes
- **n = prefix multiple of 8 (/0, /8, /16, /24, /32)
- Subnet Masks - Octet Divisions
- 128 - /n+1
- 192 - /n+2
- 224 - /n+3
- 240 - /n+4
- 248 - /n+5
- 252 - /n+6
- 254 - /n+7
- 255 - /n+8
- Subnet Masks - Octet Increments
- 128 - /n+1
- 64 - /n+2
- 32 - /n+3
- 16 - /n+4
- 8 - /n+5
- 4 - /n+6
- 2 - /n+7
- 1 - /n+8
- Network Class Divisions
- FORGET CLASS DIVISIONS; JUST REMEMBER HOW TO DO IT
- Network classes
- Valid Network Class C range is 192.0.0.0 to 223.255.255.0/24
- Valid Network Class B range is 128.0.0.0 to 191.255.0.0/16
- Private range is 172.16.0.0 172.31.0.0 /12
- Class A valid network addresses range from 1.0.0.0 to 126.0.0.0/8
- 0.0.0.0/8 is reserved by RFC to mean "this network"
- Class D addresses range from 224.0.0.0 to 239.255.255.255