Networking: TCP/IP Classes
This article requires an understanding of binary mathematics. I recommend you refer to
Binary Basics under the
PC Operations,
File Basics Menu prior to reading this section.
IP Addressing and Subnetting
Every host in a TCP/IP network must have a unique IP address so it is identifiable within the network. IP addresses are typically written as four octets separated by full stops, such as 136.186.51.13.
The four octets each equate to one byte or 8 binary digits (bits). Each octet, therefore, can represent a value in the range of 0 to 255.
There are three types of IP address:
- Unicast IP addresses target a single device. Host to host applications such as TELNET, FTP or HTTP typically use unicast addressing
- Broadcast IP addresses target all the hosts on a given network. Broadcasts can be used by routers, for example, to advertise route table data
- Multicast IP addresses target a set of hosts which belong to a multicast group. Interactive conferencing network imaging are situations where multicasting can be used
IP Address Classes
Address classes are used by routers when forwarding IP datagrams. When a datagram is analysed by a router, the router will first determine the class of the destination address. Identification of the class determines the destination network address, and this allows a routing decision to be made.
IP addresses consist of three portions:
The first portion, or initial bit sequence, identifies the Address Class of the network. There are five Address Classes - Class A, B, C, D and E.
The second portion identifies the Network ID
The last portion identifies the ID of the host within the specified network
Class A addresses must have 0 as the first bit of the address. The next seven bits of the IP address represent the network address, and the last 24 bits identify the host. Therefore in a Class A address, the first 8 bits means that there are less than 128 networks. The remaining 24 bits indicate that a Class A network can support millions of hosts.

As a rule, all IP addresses that begin with an octet in the range of 1 - 126 are Class A addresses.
Class B addresses are identified by an initial bit sequence of 10. The next 14 bits identify the network and the last 16 bits identify the host. This means that there are thousands of Class B networks and each Class B network can contain thousands of hosts.

All IP addresses that begin with an octet in the range of 128 - 191 are Class B addresses.
Class C addresses are identified by an initial bit sequence of 110. The next 21 bits are the network address, while the last 8 bits identify the host. This means there are millions of Class C networks, but each Class C network is composed of fewer than 254 hosts.

All IP addresses that begin with an octet in the range of 192 - 223 are Class C addresses.
There are also Class D and Class E IP addresses, but these shouldn't be used as they are reserved for multicasting (Class D) and for experimentation and testing (Class E). IP addresses that begin with an octet in the range of 224 - 254 are Class D and E addresses.