Understanding IP Subnetting
A subnet is a division of an IP network (internet protocol suite). The act of dividing a network into at least two separate networks is called subnetting, and routers are devices that allow traffic exchange between subnetworks, serving as a physical boundary.
An IP address is comprised of a network number (routing prefix) and a rest field (host identifier). CIDR is a method used to create unique identifiers for networks, as well as individual devices. For IPv4, networks can also be characterized using a subnet mask, which is expressed in dot-decimal notation.
IPv4 vs IPv6
IPv4 is the most common network addressing architecture used, though the use of IPv6 has been growing since 2006. In IPv4, subnet masks are used to differentiate the network number and host identifier.
In IPv6, the network prefix performs a similar function as the subnet mask in IPv4, with the prefix length representing the number of bits in the address. IPv6 uses 128-bit addresses (compared to 32-bit in IPv4), providing a practically inexhaustible pool of IP addresses.
Key Terms
- Network AddressThe first address in a subnet, used to identify the network itself. Cannot be assigned to a host.
- Broadcast AddressThe last address in a subnet, used to send data to all hosts on the network.
- Usable HostsThe addresses between the network and broadcast addresses that can be assigned to devices.
Typical Subnets for IPv4
| Prefix Size | Network Mask | Usable Hosts per Subnet |
|---|---|---|
| Class A | ||
| /8 | 255.0.0.0 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,574 |
| /13 | 255.248.0.0 | 524,286 |
| /14 | 255.252.0.0 | 262,142 |
| /15 | 255.254.0.0 | 131,070 |
| Class B | ||
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23 | 255.255.254.0 | 510 |
| Class C | ||
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |