Complete Guide to Subnets (Subnetting)
In the world of computer networks, efficiency and organization are essential. This is where the concept of subnets (subnetting) comes in. Dividing a network into smaller parts brings more security, better IP address usage, and easier management.
What is a Subnet?
In the world of computer networks, efficiency and organization are essential. This is where the concept of subnets (subnetting) comes in. Dividing a network into smaller parts brings more security, better IP address usage, and easier management.
IP Addresses and Subnet Mask
In the world of computer networks, efficiency and organization are essential. This is where the concept of subnets (subnetting) comes in. Dividing a network into smaller parts brings more security, better IP address usage, and easier management.
How to calculate quickly
- Convert the prefix to host bits:
host_bits = 32 − prefix. - Addresses in the block:
2^host_bits. Usable hosts:2^host_bits − 2(except /31 and /32). - Step size between subnets:
256 − last_octet_of_mask.
| CIDR | Mask | Usable Hosts |
|---|---|---|
| /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 |
| /31 | 255.255.255.254 | 2 (P2P, special) |
| /32 | 255.255.255.255 | 1 (host) |
Note: In /31, both addresses are usable on point-to-point links; there is no traditional “network”/“broadcast”.
Subnet Calculation Example
Dividing 192.168.0.0/24 into 4 subnets:
| Subnet | Host Range | Broadcast |
|---|---|---|
| 192.168.0.0/26 | 192.168.0.1 – 192.168.0.62 | 192.168.0.63 |
| 192.168.0.64/26 | 192.168.0.65 – 192.168.0.126 | 192.168.0.127 |
| 192.168.0.128/26 | 192.168.0.129 – 192.168.0.190 | 192.168.0.191 |
| 192.168.0.192/26 | 192.168.0.193 – 192.168.0.254 | 192.168.0.255 |
Subnetting Tools
Doing subnetting manually is possible but time-consuming. Use our Subnet Calculator to automatically compute hosts, broadcast, and ranges. You can also try other tools such as the IP Validator or the VLAN page.
IPv6 and Subnets
In IPv6, addresses have 128 bits and the CIDR notation is also used. For host networks, the standard is /64.
Example: a network 2001:db8::/64 supports autoconfiguration (SLAAC) and routing best practices.
Conclusion
Subnetting is an essential concept in computer networks. Understanding masks, CIDR, and host calculations is fundamental for every IT professional. Try the Utinix Subnet Calculator now and practice with your own examples.
Teste seus conhecimentos
Treine redes e informática
Depois de calcular sub-redes, VLANs ou endereços, pratique conceitos de redes no contexto de provas e certificações.