Tools / Engineering & scale / Vol III

IPv4 / IPv6 Subnet Calculator

Enter a CIDR or an address + netmask and get the full breakdown — network, broadcast, first / last usable, mask in every form ACL syntax expects, address type (RFC 1918 private, CGN, link-local, documentation, ULA, ...), and a subdivision table for splitting the parent into halves, quarters, eighths, sixteenths.

Input

Accepts: 192.168.1.0/24 (CIDR), 192.168.1.0 255.255.255.0 (dotted netmask), 192.168.1.42/24 (any host in the subnet), 2001:db8::/32 (IPv6 CIDR), fe80::1 (bare IPv6 — treated as /128).

Result

IPv4
192.168.1.0/24
Private (RFC 1918 — 192.168.0.0/16)

Network

Mask

Address breakdown

Subdivision

Splits the parent prefix into smaller equal-sized subnets. IPv4 splits to /N+1 / /N+2 / /N+3 / /N+4 (halves through sixteenths). IPv6 takes the same four steps and is most useful for carving a /48 site allocation into per-floor or per-VLAN /52 / /56 / /60 / /64 blocks.

#NetworkFirst usableLast usableBroadcast / endHosts

Reading the prefix

/N is host bits, not address bits

The number after the slash is the count of network bits — everything to its left is the subnet prefix; everything to its right is host space. /24 = 24 network bits + 8 host bits = 256 addresses (254 usable). The trick for fast host-count math: 2(32 − N) total, minus 2 for network and broadcast (except /31 and /32).

/31 = point-to-point

RFC 3021 lets you use both addresses in a /31 for point-to-point links — no network or broadcast reserved. Almost every modern router supports it; halves the IP burn on transit links. /30 remains common for backward compat with gear that predates RFC 3021.

RFC 1918 private space

Three reserved blocks for private use: 10.0.0.0/8 (~16M addresses), 172.16.0.0/12 (~1M), 192.168.0.0/16 (~65k). Not routable on the public internet — NAT translates them at the edge. The calculator tags the address type so you know whether a paste is private, public, or one of the special-use blocks below.

RFC 6598 — Carrier-Grade NAT

100.64.0.0/10 is reserved for the CGN inside a service-provider network — a private-but-not-RFC-1918 block so SPs can NAT subscribers without colliding with their LAN. If your VoIP traffic traverses CGN, the local Contact / Via addresses won't survive NAT — needs an SBC or ICE.

RFC 5737 documentation

192.0.2.0/24 (TEST-NET-1), 198.51.100.0/24 (TEST-NET-2), 203.0.113.0/24 (TEST-NET-3) — explicitly reserved for documentation and examples. Safe to use in books, configs, packet captures. Vol I and the pcap library exclusively use these.

IPv6 — /64 is the unit

IPv6 assumes a /64 per LAN: SLAAC, IID derivation, and a lot of host-stack behavior all expect that prefix length. The standard hierarchy: an ISP delegates a /48 to a site → split into /56 per-floor or /52 per-region → each LAN is a /64. The subdivision table below shows those steps for any IPv6 input.

IPv6 special prefixes

fe80::/10 = link-local (auto-configured per interface), fc00::/7 = ULA (RFC 4193, IPv6 equivalent of RFC 1918), 2001:db8::/32 = documentation, ff00::/8 = multicast, ::1/128 = loopback, 2002::/16 = 6to4 (deprecated), 2001::/32 = Teredo (deprecated).

Wildcard masks (for ACLs)

Cisco IOS ACLs and route-maps take a wildcard mask — the bitwise inverse of the netmask. /24's wildcard is 0.0.0.255. The calculator shows both inline so you can paste straight into either syntax without flipping the bits by hand.