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.
| Class | First octet | Leading bits | Default mask | Networks | Hosts per network |
|---|---|---|---|---|---|
| A | 1 – 126 | 0 | 255.0.0.0 (/8) | 126 | 16,777,214 |
| B | 128 – 191 | 10 | 255.255.0.0 (/16) | 16,384 | 65,534 |
| C | 192 – 223 | 110 | 255.255.255.0 (/24) | 2,097,152 | 254 |
| D | 224 – 239 | 1110 | n/a (multicast) | n/a | n/a |
| E | 240 – 255 | 1111 | n/a (reserved) | n/a | n/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.
| Block | Range | Addresses | Class |
|---|---|---|---|
| 10.0.0.0/8 | 10.0.0.0 – 10.255.255.255 | 16,777,216 | A |
| 172.16.0.0/12 | 172.16.0.0 – 172.31.255.255 | 1,048,576 | B |
| 192.168.0.0/16 | 192.168.0.0 – 192.168.255.255 | 65,536 | C |
Other special IPv4 ranges
| Block | Purpose |
|---|---|
| 127.0.0.0/8 | Loopback (localhost) |
| 169.254.0.0/16 | Link-local / APIPA (no DHCP) |
| 100.64.0.0/10 | Carrier-grade NAT (RFC 6598) |
| 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | Documentation examples |
| 198.18.0.0/15 | Network benchmarking |
| 224.0.0.0/4 | Multicast |
| 255.255.255.255 | Limited 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.