IP Subnet Calculator
A comprehensive tool and guide to mastering IP network subnetting.
Interactive Guide to IP Subnetting
Subnetting Deep Dive
What is an IP Address?
An IP (Internet Protocol) address is a unique numerical label assigned to each device connected to a computer network. An IPv4 address, like 192.168.1.1
, is a 32-bit number, typically expressed as four 8-bit numbers (octets) in decimal format.
What is a Subnet Mask?
A subnet mask is a 32-bit number that divides an IP address into two parts: the network address and the host address. It specifies which part of the address refers to the network and which part refers to the host. For example, a mask of 255.255.255.0
indicates that the first three octets identify the network.
What is CIDR Notation?
CIDR (Classless Inter-Domain Routing) notation is a compact way to represent a subnet mask. It's written as a forward slash followed by a number, like /24
. The number indicates how many bits (from left to right) are part of the network portion of the address. A /24
is equivalent to 255.255.255.0
.
Why is Subnetting Important?
Subnetting is the process of dividing a single large network into multiple smaller, more manageable networks, or "subnets". This is crucial for several reasons:
- Improved Security: By segmenting a network, you can contain security threats. If one subnet is compromised, the others remain protected. You can control traffic flow between subnets using access control lists (ACLs).
- Better Performance: Subnetting reduces network broadcast traffic. Broadcasts are sent to all hosts within a network. In a smaller subnet, there are fewer hosts, so broadcast traffic is localized, reducing overall network congestion and improving performance for everyone.
- Simplified Administration: Managing a large, flat network is complex. Subnetting allows for logical grouping of devices (e.g., by department or physical location), making troubleshooting and administration much easier.
How to Calculate a Subnet Manually
Let's calculate the details for 192.168.10.135 /27
.
- Determine the Subnet Mask: A /27 means 27 bits are '1's. In binary, this is
11111111.11111111.11111111.11100000
. Converted to decimal, this is255.255.255.224
. - Find the Network Address: Convert the IP and mask to binary and perform a bitwise AND operation. The result is the network address. More simply, find the "block size". Since the last octet of the mask is 224, the block size is 256 - 224 = 32. The subnets will be 192.168.10.0, 192.168.10.32, 192.168.10.64, 192.168.10.96, 192.168.10.128, etc. Our IP (135) falls into the
192.168.10.128
network. - Find the Broadcast Address: This is the last IP in the subnet. Since the next subnet starts at .160, our broadcast address is
192.168.10.159
. - Determine the Host Range: The usable host range is from one IP after the network address to one IP before the broadcast address. So,
192.168.10.129
to192.168.10.158
.
CIDR Quick Reference
CIDR | Subnet Mask | Usable Hosts |
---|