This guide aims to provide a comprehensive overview of IP address subnets, their role in IP networking, and the process of calculating them. It will cover the basics of IP addresses and subnets, how they work together, the use of subnets in IP networks, and a table of typical subnets for IPv4.
An IP (Internet Protocol) address is a unique numerical identifier assigned to devices participating in a computer network that uses the Internet Protocol for communication. The primary function of an IP address is to provide a unique identity to each device on the network and enable communication between them. IP addresses are divided into two versions: IPv4 (32-bit addresses) and IPv6 (128-bit addresses).
A subnet, short for subnetwork, is a smaller network created by dividing a larger IP network into smaller segments. Each subnet consists of a range of IP addresses and has its unique network address, broadcast address, and a range of usable host addresses. The process of creating subnets is called subnetting.
An IP address consists of two parts: the network portion and the host portion. The network portion identifies the larger IP network, while the host portion identifies a specific device within that network. Subnets are created by borrowing bits from the host portion of an IP address to create a new subnet mask. This mask determines the number of subnets and the number of hosts per subnet.
For IPv4 addresses, subnet masks are represented in the same format as IP addresses (four octets separated by periods) and use a series of contiguous '1' bits to identify the network portion and '0' bits for the host portion. In addition, subnet masks can also be denoted using CIDR (Classless Inter-Domain Routing) notation, which specifies the number of '1' bits in the subnet mask, e.g., /24 for a subnet mask of 255.255.255.0.
Subnets play a crucial role in IP networking, offering several benefits, including:
The following table provides a list of typical IPv4 subnets, their subnet masks in both decimal and CIDR notation, and the number of available host addresses for each subnet. Note that the number of host addresses is calculated by subtracting the network and broadcast addresses from the total number of addresses in the subnet.
CIDR Notation | Subnet Mask (Decimal) | Number of Host Addresses |
---|---|---|
/32 | 255.255.255.255 | 1 |
/31 | 255.255.255.254 | 2 |
/30 | 255.255.255.252 | 4 |
/29 | 255.255.255.248 | 8 |
/28 | 255.255.255.240 | 16 |
/27 | 255.255.255.224 | 32 |
/26 | 255.255.255.192 | 64 |
/25 | 255.255.255.128 | 128 |
/24 | 255.255.255.0 | 256 |
/23 | 255.255.254.0 | 512 |
/22 | 255.255.252.0 | 1,024 |
/21 | 255.255.248.0 | 2,048 |
/20 | 255.255.240.0 | 4,096 |
/19 | 255.255.224.0 | 8,192 |
/18 | 255.255.192.0 | 16,384 |
/17 | 255.255.128.0 | 32,768 |
/16 | 255.255.0.0 | 65,536 |
/15 | 255.254.0.0 | 131,072 |
/14 | 255.252.0.0 | 262,144 |
/13 | 255.248.0.0 | 524,288 |
/12 | 255.240.0.0 | 1,048,576 |
/11 | 255.224.0.0 | 2,097,152 |
/10 | 255.192.0.0 | 4,194,304 |
/9 | 255.128.0.0 | 8,388,608 |
/8 | 255.0.0.0 | 16,777,216 |
In conclusion, IP address subnets are an essential part of IP networking, offering benefits such as improved performance, enhanced security, and better network management. Understanding how IP addresses work with subnets and being familiar with typical subnets for IPv4 can help network administrators and IT professionals optimize their network configurations and ensure efficient use of IP address space.