turn a CIDR block into an IP range
CIDR block to start and end IP, and an IP range back to CIDR.
Enter an IP address and a mask to get the network address, broadcast address, usable host range, and host count. This subnet calculator also splits a network into smaller subnets.
10.20.0.0/14, into this field./26), a netmask (255.255.255.192), or a wildcard mask (0.0.0.63). The results update as you type.An IPv4 address is 32 bits. The prefix length p says how many of them, counted from the left, name the network. The other 32 − p bits number the hosts inside it.
255.255.255.192.0.0.0.63. Cisco ACLs and OSPF use this form.Two prefixes are special. A /31 has 2 usable addresses and no broadcast (RFC 3021, for point-to-point links). A /32 is a single host.
192.168.1.130/26: network 192.168.1.128, broadcast 192.168.1.191, hosts 192.168.1.129 to 192.168.1.190, 62 usable hosts, mask 255.255.255.192.10.0.0.0/8: 16,777,216 addresses and 16,777,214 usable hosts, class A, private (RFC 1918).172.16.5.4 with mask 255.255.240.0: that is /20, so the network is 172.16.0.0 and the broadcast is 172.16.15.255, with 4,094 usable hosts.192.168.1.0/24 into 4 subnets gives four /26 networks: .0, .64, .128, and .192, each with 62 hosts.| Prefix | Netmask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (RFC 3021) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
255.0.255.0 is rejected.010, are rejected, because some systems read them as octal.254. A /24 has 256 addresses, and two of them are reserved: the network address (.0) and the broadcast address (.255).
They are bit-for-bit opposites. The subnet mask 255.255.255.0 marks the network bits with ones; the wildcard mask 0.0.0.255 marks the host bits with ones. Routers use the wildcard form in access lists and OSPF.
RFC 3021 lets point-to-point links drop the network and broadcast addresses, because only two devices are on the link. That saves two addresses on every router link compared with a /30.
Do a bitwise AND of the address and the mask. For 192.168.1.130 with mask 255.255.255.192, the last octet is 130 AND 192 = 128, so the network is 192.168.1.128.
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 (RFC 1918). 100.64.0.0/10 is shared address space for carrier-grade NAT. The calculator names the range an address belongs to.
Often used together with the IPv4 Subnet Calculator.
CIDR block to start and end IP, and an IP range back to CIDR.
First and last address, size, and type of any IPv6 prefix.
IPv4 to decimal, hex, octal, binary, and IPv4-mapped IPv6.