VPN Simplifier

How Does IP Addressing Work?

Here are the cold hard facts: An IP address is a 32-bit binary address. This 32-bit address is subdivided into four 8-bit segments called octets. Since only a fraction of people work with 32-bit binary addresses or even 8-bit binary octets (math and computer types), the IP address is almost always expressed in what's called the "dotted decimal" format.

What's that? Well, if you go to the "WhatIsMyIPAddress.com" home page to check out your IP address, you'll see it in dotted-decimal format.

In dotted decimal format, each octet is given as an equivalent decimal number. The four decimal values (4x8 = 32 bits) are then separated with periods. Eight binary bits can represent any whole number from zero to 255, so the segments of a dotted decimal addresses are decimal numbers with a range from 0 — 255.

Two Parts Make One Whole

Every IP address (even though it looks to be in four parts) is broken down into two segments...but those segments aren't equal. Part of the IP address is used for "network ID, and the rest of the address is used for the "host ID." The host ID would identify your network connection, for example.

Why are the segments not equal? Because address allotted to the network ID varies, depending on the address. Most IP addresses fall into the following address classes:

  • Class A addresses: The first 8 bits of the IP address are used for the network ID. The final 24 bits are used for the host ID.
  • Class B addresses: The first 16 bits of the IP address are used for the network ID. The final 16 bits are for the host ID.
  • Class C addresses: The first 24 bits of the IP address are used for the network ID. The final 8 bits are for the host ID.

Address Class and Network Type

More bits lead to more combinations. As a math-minded person might guess, the Class A format provides a small number of possible network IDs and a huge number of possible host IDs for each network.

A Class A network can support approximately 224 hosts, which works out to 16,777,216 hosts. A Class C network can support, on the other hand, can provide host IDs for only a small number of hosts (approximately 28 hosts, or 256), but many more combinations of network IDs are available in the Class C format.

You might be wondering how a computer or router knows whether to interpret an IP address as a Class A, Class B or Class C address. The designers of TCP/IP wrote the address rules in way that the address class is obvious for the address itself. The first few bits of the binary address specify whether the address should be interpreted as a Class A, B or C address: Here's how that works:

  • If the 32-bit binary address starts with a 0 bit, the address is a Class A address
  • If the 32-bit binary address starts with the bits 19, the address is a Class B address
  • If the 32-bit binary address starts with the bits 110, the address is a Class C address

The simple table below shows the address ranges for Class A, B and C networks. Note that some addresses ranges are listed as "excluded." That's because certain IP address in each class are reserved for special uses (and a different IP address class) are therefore are not assigned to the Address Classes.)

Address Ranges: Class A, B and C networks:

Address Class Binary Address
Must Begin With
First Term of Dotted
Decimal Address Must Be
Excluded Addresses
A 0 0 — 127 to to
B 10 128 — 191 to
C 110 192 — 223 to

"Okay, Class. Line up by size."

In theory, only 127 Class A networks can exist on the Internet. (It's all somewhat heady, and complicated, math stuff, so don't bust your brain trying to figure out why.) However each of those networks can have about 17 million hosts. Only a few very large organizations are Class A networks.

Class B networks are good-sized networks. They are in more numbers that Class A, but the networks themselves are not as large as Class A networks are. A Class B network can have about 65,000 hosts (computers) connected to it. Most large companies and universities would fall into the size of network.

Not to be left out, Class C networks are plentiful—there are more than 2 million of them. They're the most common and they're a lot smaller, one Class C network can support no more than 254 hosts; most networks that connect to the Internet are Class C.