Understanding IPv4 Address Classes

In order to support networks of different sizes, address space is divided into different address classes , Class A, B, and C – recognized as classful addressing. Addresses within each class are self-identifying because the boundary between the network-prefix and the host-number is fixed depending on the class to which they belong. Given any classful IP address, its class can be determined from a self-encoding key at the beginning of the network-prefix as shown in Classful IP Addresses.

Figure 2. Classful IP Addresses

Classful IP Addresses


  • Class A (addresses that start with 1 – 126; 8-bit network prefix)

    Class A is reserved for 126 large public networks and very large corporate networks. All of these network numbers have already been assigned. Each Class A network can contain almost 17 million (224-2) hosts.

    Example: 10.4.5.1 (for host 4.5.1 on network number 10.0.0.0).

  • Class B (addresses that start with 128 – 191; 16-bit network prefix)

    Class B can support 16,384 networks and is used by government agencies and very large corporations. Most of the 16,382 possible Class B addresses have already been assigned. Each Class B network can contain up to 65,534 (216-2) hosts.

    Example: 172.16.5.1 (host 5.1 on network number 172.16.0.0).

  • Class C (addresses that start with 192 – 223; 24-bit network prefix)

    Class C is intended for most users around the world. There are several million possible Class C networks. Each Class C network can contain up to 254 (28 -2) hosts.

    Example: 192.139.25.1 (host 1 on network number 192.139.25.0).

  • Class D (addresses that start with 224 - 239)

    Hosts can use Class D addresses to multicast messages to a specific group of nodes.

  • Class E (addresses that start with 240 - 255)

Class E is reserved for future use.

Special Address Considerations

There are several special IP addressing rules and considerations:

  • Network 127.x.x.x is reserved for loopback testing and can be used by any host.

  • When a host number of all 0s (in binary) is specified, a reference is made to the network (or subnetwork) itself. For example, 192.27.42.0 refers to Class C network 192.27.42.

  • When a network number of all 0s (in binary) is specified, a reference is made to the network itself. For example, 0.0.0.22 refers to host 22 on “this” network.

  • A host number of all 1s (in binary) is used as a broadcast address within a given network or subnetwork.