Skip to content

Reference · IPv4

IP address classes & private ranges.

The five IPv4 address classes with their ranges and default masks, plus the private IP ranges and special-purpose blocks every network engineer should know.

IP address classes table

Before 1993, IPv4 addresses were divided into fixed classes determined by the first octet. The class set the default network size and subnet mask. The system was replaced by CIDR, but the classes remain a staple of networking courses and a handy way to describe address ranges.

ClassFirst octetLeading bitsDefault maskNetworksHosts per network
A1 – 1260255.0.0.0 (/8)12616,777,214
B128 – 19110255.255.0.0 (/16)16,38465,534
C192 – 223110255.255.255.0 (/24)2,097,152254
D224 – 2391110n/a (multicast)n/an/a
E240 – 2551111n/a (reserved)n/an/a

Class A, B and C in detail

Class A: 1.0.0.0 – 126.255.255.255

One octet for the network and three for hosts. Designed for very large organisations; each network holds more than 16 million hosts. 127.0.0.0/8 is reserved for loopback.

Class B: 128.0.0.0 – 191.255.255.255

Two octets for the network and two for hosts: 65,534 hosts per network, aimed at medium to large organisations.

Class C: 192.0.0.0 – 223.255.255.255

Three octets for the network and one for hosts: 254 hosts per network, the typical small office or home LAN.

Class D and E

Class D (224.0.0.0 – 239.255.255.255) is used for multicast, such as OSPF (224.0.0.5) and mDNS (224.0.0.251). Class E (240.0.0.0 – 255.255.255.255) is reserved for experimental use and is not routable on the Internet.

Private IP ranges (RFC 1918)

Three blocks are reserved for use inside private networks. Routers on the public Internet discard traffic to these addresses, so many organisations can reuse them behind NAT.

BlockRangeAddressesClass
10.0.0.0/810.0.0.0 – 10.255.255.25516,777,216A
172.16.0.0/12172.16.0.0 – 172.31.255.2551,048,576B
192.168.0.0/16192.168.0.0 – 192.168.255.25565,536C

Other special IPv4 ranges

BlockPurpose
127.0.0.0/8Loopback (localhost)
169.254.0.0/16Link-local / APIPA (no DHCP)
100.64.0.0/10Carrier-grade NAT (RFC 6598)
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24Documentation examples
198.18.0.0/15Network benchmarking
224.0.0.0/4Multicast
255.255.255.255Limited broadcast

Find the class and type of any address

Paste an address into the IP subnet calculator or the IP address check to see its class, scope (private, public, loopback…) and binary form. To learn how masks relate to classes, read the subnet mask calculator guide and subnetting explained.

Frequently asked questions

What are the IP address classes?

IPv4 originally defined five classes: A (1–126), B (128–191), C (192–223), D (224–239, multicast) and E (240–255, reserved). Classes A–C are for unicast hosts; D is multicast; E is experimental.

What are the default subnet masks of class A, B and C?

Class A is 255.0.0.0 (/8), class B is 255.255.0.0 (/16) and class C is 255.255.255.0 (/24).

What are the private IP ranges?

The RFC 1918 private ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Addresses in these blocks are not routable on the public Internet.

Are IP address classes still used?

Not for allocation. Classful addressing was replaced by CIDR in 1993, but class terminology still appears in exams, documentation and default mask behaviour of some older devices.

Why is 127.0.0.0 missing from class A?

127.0.0.0/8 is reserved for loopback (localhost), so the usable class A range is 1.0.0.0 – 126.255.255.255.