mrnx/network

Subnet cheat sheet

Every IPv4 prefix length with netmask, wildcard and host counts, the reserved address ranges, well-known multicast groups and common IPv6 prefix sizes. Click any value to copy it.

IPv4 prefix lengths

PrefixNetmask / wildcardWildcardAddressesUsable hostsIn /24 terms
/00.0.0.0255.255.255.255255.255.255.2554,294,967,2964,294,967,29416,777,216 × /24
/1128.0.0.0127.255.255.255127.255.255.2552,147,483,6482,147,483,6468,388,608 × /24
/2192.0.0.063.255.255.25563.255.255.2551,073,741,8241,073,741,8224,194,304 × /24
/3224.0.0.031.255.255.25531.255.255.255536,870,912536,870,9102,097,152 × /24
/4240.0.0.015.255.255.25515.255.255.255268,435,456268,435,4541,048,576 × /24
/5248.0.0.07.255.255.2557.255.255.255134,217,728134,217,726524,288 × /24
/6252.0.0.03.255.255.2553.255.255.25567,108,86467,108,862262,144 × /24
/7254.0.0.01.255.255.2551.255.255.25533,554,43233,554,430131,072 × /24
/8255.0.0.00.255.255.2550.255.255.25516,777,21616,777,21465,536 × /24
/9255.128.0.00.127.255.2550.127.255.2558,388,6088,388,60632,768 × /24
/10255.192.0.00.63.255.2550.63.255.2554,194,3044,194,30216,384 × /24
/11255.224.0.00.31.255.2550.31.255.2552,097,1522,097,1508,192 × /24
/12255.240.0.00.15.255.2550.15.255.2551,048,5761,048,5744,096 × /24
/13255.248.0.00.7.255.2550.7.255.255524,288524,2862,048 × /24
/14255.252.0.00.3.255.2550.3.255.255262,144262,1421,024 × /24
/15255.254.0.00.1.255.2550.1.255.255131,072131,070512 × /24
/16255.255.0.00.0.255.2550.0.255.25565,53665,534256 × /24
/17255.255.128.00.0.127.2550.0.127.25532,76832,766128 × /24
/18255.255.192.00.0.63.2550.0.63.25516,38416,38264 × /24
/19255.255.224.00.0.31.2550.0.31.2558,1928,19032 × /24
/20255.255.240.00.0.15.2550.0.15.2554,0964,09416 × /24
/21255.255.248.00.0.7.2550.0.7.2552,0482,0468 × /24
/22255.255.252.00.0.3.2550.0.3.2551,0241,0224 × /24
/23255.255.254.00.0.1.2550.0.1.2555125102 × /24
/24255.255.255.00.0.0.2550.0.0.2552562541 per /24
/25255.255.255.1280.0.0.1270.0.0.1271281262 per /24
/26255.255.255.1920.0.0.630.0.0.6364624 per /24
/27255.255.255.2240.0.0.310.0.0.3132308 per /24
/28255.255.255.2400.0.0.150.0.0.15161416 per /24
/29255.255.255.2480.0.0.70.0.0.78632 per /24
/30255.255.255.2520.0.0.30.0.0.34264 per /24
/31255.255.255.2540.0.0.10.0.0.122 p2p128 per /24
/32255.255.255.2550.0.0.00.0.0.011256 per /24

Usable = addresses − 2 (network and broadcast), except /31 (point-to-point, RFC 3021) and /32 (single host).

Reserved IPv4 ranges

RangePurposeDefined in
0.0.0.0/8"This network" · RFC 791RFC 791
10.0.0.0/8Private · RFC 1918RFC 1918
100.64.0.0/10Shared address space (CGNAT) · RFC 6598RFC 6598
127.0.0.0/8Loopback · RFC 1122RFC 1122
169.254.0.0/16Link-local (APIPA) · RFC 3927RFC 3927
172.16.0.0/12Private (172.16.0.0 – 172.31.255.255) · RFC 1918RFC 1918
192.0.0.0/24IETF protocol assignments · RFC 6890RFC 6890
192.0.2.0/24Documentation (TEST-NET-1) · RFC 5737RFC 5737
192.168.0.0/16Private · RFC 1918RFC 1918
198.18.0.0/15Benchmarking · RFC 2544RFC 2544
198.51.100.0/24Documentation (TEST-NET-2) · RFC 5737RFC 5737
203.0.113.0/24Documentation (TEST-NET-3) · RFC 5737RFC 5737
224.0.0.0/4Multicast · RFC 5771RFC 5771
240.0.0.0/4Reserved · RFC 1112RFC 1112
255.255.255.255/32Limited broadcast · RFC 919RFC 919

IPv6 prefix sizes

PrefixTypical useHolds
/32Typical allocation to an ISP / LIR65,536 × /48
/48Typical site (business) assignment65,536 × /64
/56Typical home / small-site assignment256 × /64
/64One LAN segment (SLAAC requires /64)2⁶⁴ addresses
/127Point-to-point link (RFC 6164)2 addresses
/128Single host / loopback1 address

Special IPv6 ranges

RangePurpose
::/128Unspecified
::1/128Loopback
::ffff:0:0/96IPv4-mapped
64:ff9b::/96NAT64 well-known prefix
2000::/3Global unicast
2001:db8::/32Documentation
fc00::/7Unique local (ULA, use fd00::/8)
fe80::/10Link-local
ff00::/8Multicast

Well-known multicast groups

IPv4 / IPv6Used byIPv6
224.0.0.1ff02::1All hostsff02::1
224.0.0.2ff02::2All routers (also HSRPv1, LDP hello)ff02::2
224.0.0.5ff02::5OSPF all routersff02::5
224.0.0.6ff02::6OSPF DR / BDRff02::6
224.0.0.9ff02::9RIPv2 (RIPng)ff02::9
224.0.0.10ff02::aEIGRPff02::a
224.0.0.13ff02::dPIMff02::d
224.0.0.18ff02::12VRRPff02::12
224.0.0.22ff02::16IGMPv3 reports (MLDv2)ff02::16
224.0.0.102ff02::66HSRPv2, GLBP (HSRP for IPv6)ff02::66
224.0.0.251ff02::fbmDNS (Bonjour, AirPlay)ff02::fb
224.0.0.252ff02::1:3LLMNRff02::1:3
224.0.1.1ff0x::101NTPff0x::101
224.0.1.129ff0x::181PTP (IEEE 1588)ff0x::181
239.255.255.250ff02::cSSDP / UPnPff02::c
—ff02::1:2DHCPv6 servers and relaysff02::1:2
—ff02::1:ff00:0/104Solicited-node (neighbour discovery)ff02::1:ff00:0/104
224.0.0.0/24ff02::/16Local network control: never routed, TTL 1ff02::/16
232.0.0.0/8ff3x::/32Source-specific multicast (SSM)ff3x::/32
239.0.0.0/8ff08::/16Administratively scoped (private use)ff08::/16

On the wire an IPv4 group maps to MAC 01:00:5e plus its low 23 bits, so 32 groups share each MAC; an IPv6 group maps to 33:33 plus its low 32 bits. In IPv6, x is the scope: 2 link, 5 site, 8 organisation, e global.

↑↓ move↵ openesc close