IPv4 Subnet Size Reference Table
Understanding Subnets
A subnet is a logical division of an IP address space. It allows for efficient network management and security. By dividing a network into smaller subnets, you can control which devices can communicate with each other.
Subnet Mask
The subnet mask is a 32-bit binary number that defines the network portion and the host portion of an IP address. The network portion is used to identify the network, while the host portion is used to identify individual devices within the network.
Subnet Size
The size of a subnet is determined by the number of host bits in the subnet mask. A larger number of host bits means a larger subnet size.
Reference Table
Subnet Mask | Number of Network Bits | Number of Host Bits | Maximum Hosts per Subnet |
---|---|---|---|
255.255.255.0 | 24 | 8 | 254 |
255.255.255.128 | 25 | 7 | 126 |
255.255.255.192 | 26 | 6 | 62 |
255.255.255.224 | 27 | 5 | 30 |
255.255.255.240 | 28 | 4 | 14 |
255.255.255.248 | 29 | 3 | 6 |
255.255.255.252 | 30 | 2 | 2 |
255.255.255.254 | 31 | 1 | 0 |
Calculating Subnet Size
To calculate the subnet size, you can use the following formula:
- Maximum hosts per subnet = 2^(number of host bits) - 2
For example, with a subnet mask of 255.255.255.192 (26 bits for the network portion), there are 6 bits for the host portion. Therefore, the maximum number of hosts per subnet is 2^6 - 2 = 62.
Example:
If you have a Class C network with the network address 192.168.1.0 and you want to create a subnet with 30 hosts, you would use a subnet mask of 255.255.255.224. This would give you 4 subnets with 30 hosts each.
Additional Considerations:
- Broadcast address: The broadcast address is the highest address in a subnet and is used to send messages to all devices on the subnet.
- Network address: The network address is the lowest address in a subnet and is used to identify the network.
- Gateway address: The gateway address is the address of the router that connects the subnet to other networks.
By understanding subnet sizes and using the reference table, you can effectively plan and manage your network infrastructure.