Uncategorized

What is IP Address in Networking with Example

In this tutorial, we are going to see What is an IP address in networking with example. On the Internet, computers communicate with each other using the Internet Protocol (IP), which uses numerical addresses, called IP addresses, composed of 4 integers (4 bytes) between 0 and 255 and noted in the form xxx.xxx.xxx.xxx. For example, 192.122.56.10 is an IP address.

These addresses are used by computers on the network to communicate with each other, so each computer on a network has a unique IP address on that network.

ICANN (Internet Corporation for Assigned Names and Numbers, replacing IANA, Internet Assigned Numbers Agency, since 1998) is responsible for assigning public IP addresses, i.e. the IP addresses of computers directly connected to the public Internet.

 

 

What is IP Address in Networking:

An IP address is a 32-bit address, usually written as 4 integers separated by dots. There are actually two parts in the IP address:

  • The numbers on the left designate the network and is called network ID or netID.
  • The numbers on the right designate the computers on this network and is called host ID.

 

Example of IP Address in Networking:


 
 
Consider, we have the following network:
 

 
Let’s consider the network on the left 192.168.1.0. It contains the following computers:

192.168.1.1 to 192.168.1.4

Let’s consider the one on the right 10.10.10.0. It contains the following computers:

10.10.10.1 to 10.10.10.9

In the above example, the networks are denoted 192.168.1 and 10.10.10, then each of the computers in the network is numbered incrementally.

Let’s imagine a network noted 111.0.0.0. The computers on this network can have IP addresses ranging from 111.0.0.1 to 111.255.255.254. It is therefore to assign numbers so that there is an organization in the hierarchy of computers and servers.

Thus, the smaller the number of bits reserved for the network, the more computers it can contain.

Indeed, a network noted 111.0.0.0 can contain computers whose IP address can vary between 111.0.0.1 and 111.255.255.254 (256*256*256-2=16777214 possibilities), while a network noted 192.168 will be able to contain only computers whose IP address will be included between 192.168.0.1 and 192.168.255.254 (256*256-2=65534 possibilities), it is the concept of IP Address Classes.
 

 

Special addresses:

When we cancel the host-id part, i.e. when we replace the bits reserved for the network machines by zeros (for example 192.168.1.0), we get the network address. This address cannot be assigned to any of the computers on the network.

When the netid part is cancelled, i.e. when the bits reserved for the network are replaced by zeros, we get the machine address. This address represents the machine specified by the host-ID that is on the current network.

When all the bits of the host-id part are 1, the address obtained is called the broadcast address. It is a specific address, allowing to send a message to all the machines located on the network specified by the netID.

Instead, when all bits of the netid part are set to 1, the address obtained is the limited broadcast address (multicast).

Finally, the address 127.0.0.1 is called the loopback address, because it refers to the local machine (localhost).
 

Networks Classes:

IP addresses are divided into classes, according to the number of bytes that represent the network.
 

Class A:

In a class A IP address, the first byte represents the network.

The most significant bit (the first bit, the one on the left) is zero, which means that there are 27 (00000000 to 01111111) possibilities of networks, that is 128 possibilities. However, network 0 bits (= 00000000) does not exist and the number 127 is reserved to designate your machine.

The networks available in class A are therefore the networks from 1.0.0.0 to 126.0.0.0 (the last bytes are zeros which indicates that they are networks and not computers!)

The three bytes on the right represent the computers of the network, so the network can contain a number of computers equal to : 224-2 = 16777214 computers.

A class A IP address, in binary, looks like this:
 


 
 

Class B:

In a class B IP address, the first two bytes represent the network.

The first two bits are 1 and 0, which means that there are 214 (10 000000 00000000 to 10 111111 11111111) possible networks, or 16384 possible networks. The networks available in class B are therefore the networks from 128.0.0.0 to 191.255.0.0

The two bytes on the right represent the computers in the network. The network can thus contain a number of computers equal to :
216-21 = 65534 computers.

A class B IP address, in binary, looks like this:
 


 

Class C:

In a Class C IP address, the first three bytes represent the network. The first three bits are 1,1 and 0, which means that there are 221 possible networks, i.e. 2097152. The networks available in class C are therefore the networks from 192.0.0.0 to 223.255.255.0

The right byte represents the computers of the network, the network can thus contain:
28-21 = 254 computers.

A class C IP address, in binary, looks like this:
 


 
 

Allocation of IP addresses

The purpose of classifying IP addresses into three classes A, B and C is to facilitate the search for a computer on the network. Indeed, with this notation it is possible to search first the network that you want to reach and then to search for a computer on it. Thus, the allocation of IP addresses is done according to the size of the network.

Class
Number of possible networks
Maximum number of computers on each network
A 126 16777214
B 16384 65534
C 2097152 254

 

Reserved IP addresses

It often happens in a company or an organization that only one computer is connected to the Internet, and it is through this computer that the other computers in the network access the Internet (this is generally referred to as a proxy or gateway).

In this case, only the computer connected to the Internet needs to reserve an IP address with ICANN. However, the other computers still need an IP address to be able to communicate with each other internally.

Therefore, ICANN has reserved a handful of addresses in each class to allow an IP address to be assigned to computers on a local network connected to the Internet without the risk of creating IP address conflicts on the network of networks. These are the following addresses:

  • Class A private IP addresses: 10.0.0.1 to 10.255.255.254, allowing the creation of large private networks with thousands of computers.
  • Class B private IP addresses: 172.16.0.1 to 172.31.255.254, allowing the creation of medium-sized private networks.
  • Class C private IP addresses: 192.168.0.1 to 192.168.0.254, for setting up small private networks.

 
mcq-networking-question-answerComputer Network MCQ – Questions and Answers – Part 1Networking MCQs questions with answers to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are…Read More

Leave a Reply

Your email address will not be published. Required fields are marked *