Computer Network Tutorial

Difference B/W Articles

Computer Network Practice

Addressing in Computer Network

Computer Network Addressing: In this tutorial, we will learn about the addressing and its types along with the Subnet masks and the Classes of IP addresses. By Mahima Rao Last updated : May 04, 2023

What is Addressing in Computer Network?

In Computer Network, an addressing or a network address is a unique address that is used to uniquely identify each computer (host) connected in a network.

Addressing in Computer Network

The following are the two types of computer network addressing:

  1. Hardware Addressing
  2. Logical Addressing

1. Hardware Addressing

Hosts are uniquely identified in the local area network with the help of a hardware address. If you look at the OSI model, then the hardware addressing is done at layer 2 (Data link layer). Hardware address is also called MAC (Media Access Control) address. MAC address is hard-coded on the network interface cards (NIC).

MAC address size is 48 bits. A MAC address is represented in hexadecimal form. An example of this is being given below.

Example: 06: 5f: 39: ac: dd: 2c

The first 6 digits of the MAC address are identified by the manufacturer of the NIC (Network Interface Card). These early 6 bits are also called the OUI (Organizational Unique Identifier). The remaining 6 digits host is used to uniquely identify the network. These last 6 digits are called the host id.

There is a decrease in the MAC address, so that you can not identify the network. If you want to identify which host is in the network then you will see its IP address. IP addresses are explained in logical addressing.

2. Logical Addressing

According to the OSI model, logical addressing is used in the network layer. Through logical address, you uniquely identify a host in the entire network. Logical addresses also separate a network from another network. Logical addresses are not fixed and they can be changed too. Logical addresses are called IP addresses.

The IP address size is 32 bit. An IP address is divided into 2 parts. The first part is the network ID from which it is identified that what is the host's network. The second part is the host ID from which the host is uniquely identified.

Internet Protocol (IP) is responsible for logical addressing. Internet protocol performs 2 tasks. First logical addressing and second routing. A packet is forwarded through the routing to the right network.

Internet protocol provides 2 types of addressing. An IPV4 addressing and the second IPV6 addressing are done.

In the IPV4 addressing, 32 bit addresses are assigned. This type of IP address consists of four octets of 8 bits.

Subnet Mask

As we told you earlier, one part of the IP address tells the network and the second part tells the host. The subnet mask is meant to tell which part of the entire IP address represents the network and which host represents. Its subnet mask is connected with every IP address which can be seen by looking at which network and which host the IP address is.

Before reading about the subnet mask, you must learn to decimal to binary and binary to decimal conversion.


IP Address: 192 10. 2 . 1 
subnet mask: 255 255 0. 0 

IP (Binary): 11000000: 00001010: 00000010: 00000001 
Subnet mask: 11111111: 11111111: 00000000: 00000000

See the example above given the subnet mask with the IP address. 255 in the subnet mask means network octet and 0 means host octet. In this example, 192.10 is the network part that represents the network. And 2.1 is the host part that represents the host.

If you look at the binary form then the network is represented by part 1 and the host part is represented by 0.

Classes of an IP Address

IPV4 addresses have been divided into multiple classes. What type of IP address is it you can tell by viewing the range of the first octet of the IP address. Let's know about these classes in detail.

1. Class A

Class A has a network range of 1 to 127 and this class has a default subnet mask This means that the only first octet in the IP addresses of this class shows the network and the remaining 3 octets show hosts. This class has 127 networks and every network has 16777214 hosts.

2. Class B

The network range of class B is 128 to 191. The IP address of this class is the default subnet mask This class represents the first 2 octet network in IP addresses and defines the last 2 octet hosts. There are 16384 networks in this class and 65534 hosts are in every network.

3. Class C

The network range of Class C is 192 to 223. The default subnet mask of IP addresses of this class is This class represents the first 3 octet network in IP addresses and represents the last one octet host. This class has 2097152 networks and 254 hosts are in every network.

4. Class D

Class D is reserved for the multicast network. There is no subnet mask for the addresses of this class.

Comments and Discussions!

Load comments ↻

Copyright © 2024 www.includehelp.com. All rights reserved.