top of page
Writer's pictureThe Tech Platform

IP Address : IPV4 and IPV6


IP (Internet Protocol)

An IP address is assigned to each device connected to a network. Each device uses an IP address for communication. It also behaves as an identifier as this address is used to identify the device on a network. It defines the technical format of the packets. Mainly, both the networks, i.e., IP and TCP, are combined together, so together, they are referred to as a TCP/IP. It creates a virtual connection between the source and the destination.


An IP address consists of three parts:

  1. Network Address: A network address is any logical or physical address that uniquely distinguishes a network node or device over a computer or telecommunications network. It is a numeric/symbolic number or address that is assigned to any device that seeks access to or is part of a network.

  2. Host Address: This Address assign to each host. It uniquely identifies this machine on your network. Note that for each host on your network, the network part of the address will be the same, but the host part must be different.

  3. Subnet number: This is the nonobligatory part of IP Address. Local networks that have massive numbers of hosts are divided into subnets and subnet numbers are appointed to that.


How Host Address Works:

In computer networks, IP addresses are assigned on interfaces. An interface connects a computer or a networking device to the network. In a computer network, all interfaces must be configured with unique IP addresses. If two or more interfaces are configured with the same IP address, the network will not work.


Let's understand it through an example.


In a computer network, four computers named C1, C2, C3, and C4 are connected. All computers are configured with the same IP address. The configured IP address is 4.4.4.4/8. C1 sends a data packet to C4. Since the IP address of C4 is 4.4.4.4/8, C1 sets the destination address in the packet to 4.4.4.4/8.


The packet reaches C2, C3, and C4. They check the destination address of the packet to know whether the packet is intended for them. Since the destination address of the packet matches with the IP address configured on their interfaces, they all assume that the packet is intended for them, and they all process it.


After processing, C2 and C3 realize that the packet is not intended for them and they discard the packet. C4 accepts the packet. If C4 sends a reply packet, the reply packet will also follow the same path and will be processed by C2 and C3 unnecessarily.


The following image shows this example.


In a busy network where interfaces process millions of packets per second, an overlap of IP addresses can bring the entire network down. To avoid such a situation, computer networks use a unique IP address on each interface.


Let's take our example network again and make all IP addresses unique. To make all IP addresses unique, change their host addresses. For example, you can set the new IP addresses of C1, C2, C3, and C4 to 4.4.4.1/8, 4.4.4.2/8, 4.4.4.3/8, and 4.4.4.4/8, respectively.


After this change, when C1 sends packets to C4 and the packet reaches C2, C3, and C4, only C4 processes the packet. C2 and C3 immediately discard the packet because the destination address of the packet and the IP address of their interfaces are different.


The following image shows how a host address works in the network.


If all interfaces are configured with unique IP addresses, they can access each other easily.


How Network Address Works:

Just as a host address provides a unique identity to the interface in a subnet, a network address provides a unique identity to the subnet in the network. A network address is the common address of all interfaces that belong to a specific subnet.


Let's take an example to understand how network addresses work.


In a network, four subnets are connected. Network addresses of these subnets are 1.1.1, 2.2.2, 3.3.3, and 4.4.4. Each subnet contains 6 PCs. Host addresses of PC1, PC2, PC3, PC4, PC5, and PC6 are .1, .2, .3, .4, .5, and .6, respectively.


In IP addresses, network addresses are always written before host addresses. If we write the network address before the host address of a PC, we will get the IP address of that PC. The following image shows this process in our example network.



Hosts or PCs of different subnets cannot communicate or exchange data directly. To connect different subnets, routers are used. Routers are networking devices that connect different subnets or networks. Routers store the network addresses of all available subnets in their routing tables.


If a computer wants to send a data packet to a computer that belongs to another subnet, it sends the data packet to the gateway router. A gateway router is the router that connects the subnet to other subnets of the network. The gateway router forwards the data packet to the router that is connected to the destination subnet or know how to reach the destination subnet. To forward data packets, routers use only network addresses.


Let's understand it through our example. Our example network is divided into four subnets. To connect these subnets, four routers: R1, R2, R3, and R4 are used. R1, R2, R3, and R4 are connected to the first subnet (1.1.1.0/8), second subnet (2.2.2.0/8), third subnet (3.3.3.0/8), and the fourth subnet (4.4.4.0/8), respectively.


Now suppose, PC1 of the first subnet sends a data packet to PC6 of the fourth subnet. PC1 sets destination IP address in the packet to 4.4.4.6/8. In this IP address, 4.4.4 is the network address and .6 is the host address. The packet reaches R1. R1 checks its routing table and forwards the packet to R2. R2 follows the same procedure and forwards the packet to R3. R3 forwards the packet to R4 and R4 forwards the packet to the local network of the fourth subnet. The local network of the fourth subnet uses the host address of the packet to find the PC6.


The following image shows this procedure.







Types of IP Address:

There are two types of IP addresses:


1. IPV4

IPv4 addresses are 32 bits in length. These bits are divided into four equal sections. Sections are separated by periods and written in a sequence. In measurement, 8 bits are equal to one byte or an octet. In simple words, an IP address consists of four bytes or octets separated by periods.


The following image shows how bits are arranged in IPv4 addresses.

Advantages of IPv4

  • IPv4 security permits encryption to keep up privacy and security.

  • IPV4 network allocation is significant and presently has quite 85000 practical routers.

  • It becomes easy to attach multiple devices across an outsized network while not NAT.

  • This is a model of communication so provides quality service also as economical knowledge transfer.

  • IPV4 addresses are redefined and permit flawless encoding.

  • Routing is a lot of scalable and economical as a result of addressing is collective more effectively.

  • Data communication across the network becomes a lot of specific in multicast organizations.


2. IPV6

IPv6 addresses are 128 bits in length. These bits are divided into eight equal sections. Sections are separated by colons (:) and written in a sequence. IPv6 addresses are written in hexadecimal notation.


The following image shows how bits are arranged in IPv6 addresses.



Advantages of IPV6:

  1. No more NAT (Network Address Translation)

  2. Auto-configuration

  3. No more private address collisions

  4. Better multicast routing

  5. Simpler header format

  6. Simplified, more efficient routing

  7. True quality of service (QoS), also called "flow labeling"

  8. Built-in authentication and privacy support

  9. Flexible options and extensions

  10. Easier administration (no more DHCP)



Difference Between IPV4 and IPV6

IPV4

IPV6

32-bit address length

128-bit address length

It can generate 4.29×109 address space

Address space of IPv6 is quite large it can produce 3.4×1038 address space

Address representation of IPv4 is in decimal

Address Representation of IPv6 is in hexadecimal

It has broadcast Message Transmission Scheme

In IPv6 multicast and anycast message transmission scheme is available

In IPv4 Encryption and Authentication facility not provided

In IPv6 Encryption and Authentication are provided

IPv4 has a header of 20-60 bytes.

IPv6 has header of 40 bytes fixed

In IPv4 checksum field is available

In IPv6 checksum field is not available

Fragmentation performed by Sender and forwarding routers

fragmentation performed only by the sender

The Security feature is dependent on application

IPSEC is an inbuilt security feature in the IPv6 protocol


Resource: Computernetworkingnotes.com , Tutorialpoint


The Tech Platform

0 comments

Comments


bottom of page