Network Classes

Stavros Gkounis
4 min readAug 20, 2022

--

Not the one we used to take in university!

Computer Network IPv4 Classes

Overview

Hello people, I was refreshing my knowledge in IP Addressing in order to improve my network subnetting skills. But this is a article for another day.

After revising my university notes and conducting some research, I decided to write this article in order to comprehend what I have researched, help others — hope so — and having a quick reference if I need to refresh my knowledge again in the future. I even read RFC 870, I am that kind of sociopath!

I know, I could use notion to keep notes by the fun part is sharing the knowledge with other. Buckle up fellas!

Information Era

Fortunately, we are living in a world where everything is connected, and I am saying fortunately because information is so easy accessible that is a couple key strokes away. If you know the press the right ones!

All of this is accessible over the Internet via World Wide Web (WWW). When browse the web our mind is in auto-pilot and most of the time does not think what is going on behind the scenes or we just do not possess such knowledge.

Without diving into the realm of DNS protocol, practically, when we are browsing www.google.com , DNS comes for the rescue to translate the string to an IP address, just like looking a person into telephone book. That being said, let us explain what this IP address is needed for.

Computer Network(s)

A network, according to the definition providing in Computer Networks book written by Andrew S. Tanenbaum, is a collection of autonomous computers interconnected by a single technology (e.g., copper wire, fiber optics, microwaves, satellite).

Thereafter, we need a way to be able to identify a network and a host inside that network. Imagine it like you want to call someone who lives in Greece, particularly in Thessaloniki, outside the country. You should include the country’s calling code (+30), the zone which identifies Central Macedonia and Florina (23) following by 8 digits. So, you are trying to call the following number +3023XXXXXXXX. If we want to narrow it down further to someone who lives in Thessaloniki city, the you should call a number like this one +30231XXXXXXX.

The same holds true when you are trying to establish a connection to remote computer. You should specify the network address and the host address, that is identifying the network (street or building) you want to send your packet to and the host (street number or floor of a building) which resides in that network.

Example

Let’s take as an example a Class B — we’ll explain later classes — IP address, 176.16.45.230.

Incorporating the above abstract knowledge, 172.16 is the network address which uniquely identifies each network and every host on the same network shares that network address as part of its IP address. The rest of the IP address is used to identify the host in the network, 45.230, and is known as host address.

Are you a zero (0) or a one (1)?

I characterize this question as a cognitive illusion. You can’t and shouldn’t draw conclusions based on one bit. What defines you is the sequence of zeroes and ones but enough with the therapy session!

Computers understand numbers and as a matter of fact only two, 0 and 1. That being said, the above IP address 176.16.45.230, practically is interpreted as 10110000.00010000.00101101.11100110. Now that we have a visual aid, fundamentally, an IP address is a 32-bit information divided into four sections called octets.

Class A

A Class A type IP address has assigned the first octet as network address identification and the remaining octets for host address. So, practically, we have something like this, network.host.host.host.

Funny thing is that the designers of IP address reserved the first bit to be always zero (0), according to RFC 870 (Figure 1). The end result is that we can use only the first 7-bits as network address.

Figure 1: Class A IP Address

On top of that, you should remember that the network address 127 (01111111) cannot be used as is reserved for diagnostics or debugging and is known as the loopback address. Practically, it allows a host to send packets to itself.

Class B

Staying in the same side, in a Class B IP address, the first 2 bytes are assigned to the network address and yet only the last 14 bits can be used because every Class B address starts with 10, according to RFC 870 (Figure 2). So in that case we have network.network.host.host. Do you remember the example above? I promised that we will discuss classes later!

Figure 2: Class B IP Address

Class C

Finally, Class C IP addresses start with 110 leaving 21-bits for network address (Figure 3). So, abstractly, we have something like this, network.network.network.host.

Figure 3: Class C IP Address

Class D & E

Class D and E are reserved for special purposes like multicasting and scientific purposes, respectively.

Just for the record, according to RFC 870, Class D address starts with 111.

--

--

Stavros Gkounis

A cybersecurity researcher who is obsessed improving himself constantly and questioning everything