# Protocols, Lesson 4: Internet Protocol classes - Network and host ID

## Learn about the network ID and node ID concept to grasp why classes exist.

### Introduction

Every protocol suite defines some type of addressing that identifies computers and networks. IP addresses are no exception to this rule. There are certain values that an IP address can take; these have been defined by the IEEE committee.

A simple IP address is a lot more than just a number. It tells us the network of which the workstation is part and the node ID.

### IP address classes and structure

When the IEEE committee sat down to sort out the range of numbers that were going to be used by all computers, they came up with five different ranges or, as we call them, "classes" of IP addresses. When someone applies for IP addresses they are given a certain range within a specific class depending on the size of their network. To keep things as simple as possible, let's first have a look at the five different classes:

In the above table, you can see the five classes. Our first class is A and our last is E. The first three classes (A, B and C) are used to identify workstations, routers, switches and other devices, whereas the last two classes (D and E) are reserved for special use.

An IP address consists of 32 Bits, which means it's four Bytes long. The first octet (first eight bits or first byte) of an IP address is enough for us to determine the class to which it belongs. And, depending on the class to which the IP address belongs, we can determine which portion of the IP address is the network ID and which is the node ID.

For example, if I told you that the first octet of an IP address is "168," then, using the above table, you would notice that it falls within the 128-191 range, which makes it a class B IP address.

### Understanding the classes

We are now going to take a closer look at the five classes. Earlier I mentioned that companies are assigned different IP ranges within these classes, depending on the size of their network. For instance, if a company required 1000 IP addresses, it would probably be assigned a range that falls within a class B network rather than a class A or C.

The class A IP addresses were designed for large networks, class B for medium size networks and class C for smaller networks.

### Introducing network ID and node ID concepts

We need to understand the network ID and node ID concept because it will help us to fully understand why classes exist. Putting it as simply as possible, an IP address gives us two pieces of valuable information:

1) It tells us which network the device is part of (network ID).

2) It identifies that unique device within the network (node ID).

Think of the network ID as the suburb you live in and the node ID as your street in that suburb. You can tell exactly where someone is if you have their suburb and street name. In the same way, the network ID tells us to which network a particular computer belongs and the node ID identifies that computer from all the rest that reside in the same network.

The picture below gives you a small example to help you understand the concept: Explanation:

In the above picture, you can see a small network. We have assigned a class C IP range for this network. Remember that class C IP addresses are for small networks. Looking now at Host A, you will see that its IP address is 192.168.0.2. The network ID portion of this IP address is in blue, while the host ID is in orange.

I suppose the next question someone would ask is: How do I figure out which portion of the IP address is the network ID and which is the host ID?

That's what we are going to answer next.

### The network and node ID of each class

The network class helps us determine how the four byte, or 32 bit, IP address is divided between network and node portions.

The table below shows you (in binary) how the Network ID and Node ID changes depending on the class:

Explanation:
The table above might seem confusing at first but it's actually very simple. We will take class A as an example and analyze it so you can understand exactly what is happening here:

Any class A network has a total of 7 bits for the Network ID (bit 8 is always set to 0) and 24 bits for the Host ID. Now all we need to do is calculate how much seven bits is:

2 to the power of 7 = 128 networks and for the hosts : 2 to the power of 24 = 16,777,216 hosts in each network, of which two cannot be used because one is the Network Address and the other is the network broadcast address (see the table towards the end of this page). This is why when we calculate the "valid" hosts in a network we always subtract "2". So if I asked you how many "valid" hosts can you have a on class A network, you should answer 16,777,214 and NOT 16,777,216.

Below you can see all this in one picture:

The same story applies for the other two classes we use, that's class B and class C, the only difference is that the number of networks and hosts changes because the bits assigned to them are different for each class.

Class B networks have 14 bits for the network ID (Bits 15, 16 are set and can't be changed) and 16 bits for the host ID, that means you can have up to '2 to the power of 14' = 16,384 networks and '2 to the power of 16' = 65,536 hosts in each network, of which two cannot be used because one is the network address and the other is the network broadcast address (see the table towards the end of this page). So if I asked you how many "valid" hosts can you have on class B network, you should answer 65,534 and NOT 65,536.

Class C networks have 21 bits for the network ID (Bits 22, 23, 24 are set and can't be changed) and eight bits for the host ID, that means you can have up to '2 to the power of 21' = 2,097,152 Networks and '2 to the power of 8' = 256 hosts in each network, of which two cannot be used because one is the network address and the other is the network broadcast address (see the table towards the end of this page). So if I asked you how many "valid" hosts you can have on class C network, you should answer 254 and NOT 256.

Now, even though we have three classes of IP addresses that we can use, there are some IP addresses that have been reserved for special use. This doesn't mean you can't assign them to a workstation but in the case that you did, it would create serious problems within your network. For this reason it's best to avoid using these IP addresses.

The following table shows the IP addresses that you should avoid using:

Now make sure you keep to the above guidelines because you're going to bump into a lot of problems if you don't!

 IMPORTANT NOTE: It is imperative that every network, regardless of Class and size, has a Network Address (first IP address e.g. 192.168.0.0 for Class C network) and a Broadcast Address (last IP address e.g. 192.168.0.255 for Class C network), as mentioned in the table and explanation diagrams above, which cannot be used. So when calculating available IP addresses in a network, always remember to subtract 2 from the number of IP addresses within that network.

That all pretty much covers this section.

Next, is the subnetting section, and before you proceed, make sure you're comfortable with the new concepts and material we have covered, otherwise subnetting will be very hard to understand.

Click over to Firewall.cx for more articles like this one. You don't have to register or jump through any hoops. All you do is get the networking information you want. Copyright 2004 Firewall.cx.

This was last published in October 2004

## SearchUnifiedCommunications

• ### Microsoft's Nuance buy enriches call center, security products

Analysts expect Microsoft to integrate Nuance voice technology with a wide range of Microsoft products, including Teams and ...

• ### Microsoft update of Teams Rooms for Android falls short

Microsoft has yet to add to Teams Rooms on Android critical features available on the Windows version. Missing features include ...

• ### 5 steps to managing team collaboration apps

Team collaboration apps offer measurable productivity and cost benefits. Follow these five steps to address technical, security ...

## SearchMobileComputing

• ### Chip shortage driving up PC prices, wait times

Businesses pay more for PCs and find it difficult to replace aging ones as the ongoing chip shortage leaves computer makers ...

• ### AR use cases gain ground due to COVID-19, maturing tech

AR technology is growing beyond technical instruction, helped by work-from-home mandates and maturing technology.

• ### Samsung introduces its cheapest A Series 5G phone yet

The Korean smartphone maker announced five additions to its midtier Galaxy A Series, including the A02s, A12, and three 5G phones...

## SearchDataCenter

• ### Programmable processor technology for next-gen data centers

The right processing technology can benefit your data center. Learn about advancements in CPU technologies, recent vendor ...

• ### Data processing units accelerate infrastructure performance

DPUs often run on networking packets to move information in the data center, instead of supporting processing workflows. Get an ...

• ### New Intel Ice Lake processors boost performance, security

Intel launches third-generation Xeon Scalable processors that bolster security, accelerate common data center workloads by 46% on...

## SearchITChannel

• ### IT industry's lack of diversity remains key issue in 2021

The first quarter of 2021 saw almost no changes in the composition of IT leadership teams. Here's how channel partners can change...

• ### How MSPs can build a post-merger integration team

Combining two companies is a complex undertaking, spanning employees, operations and line-of-business applications. An ...

• ### 3 basic cybersecurity measures to protect MSP businesses

Numerous MSP-targeted cyberattacks have driven home the need for improved internal security practices. Here's how MSPs can secure...

Close