The Difference Between IPv4 vs IPv6:
This tutorial will explain more about IPv4 and IPv6 along with their differences. The Internet has become a global system for the network which is fulfilling the need for billions of subscribers worldwide and this has happened because of the wide acceptability of the Internet protocol.
The IPv4 version of the internet protocol has a 32-bit addressing space of about 4.3 billion IP addresses.
But due to the prompt use of the Internet, wireless technology, and the implementation of LTE technology, the range of IP addresses is exhausted to a great extent.
To overcome this shortage of the IP pool, Internet protocol version 6 (IPv6) which enhances the address capabilities of IPv4 by deploying 128 bits addressing instead of 32 bits, was introduced. Thereby, rationally formulating an utmost infinite pool of IP addresses.
Also, IPv6 is supposed to provide several enhancements with reference to security, routing addresses, auto configurations, mobility, and QoS.
In this tutorial, we will explore the detailed architecture and various applications of IPv4 vs IPv6 protocols along with their significance in IT and communication sector.
What You Will Learn:
Difference Between IPV4 Vs IPV6
|1)||It stands for Internet Protocol version 4.||It stands for Internet Protocol version 6.|
|2)||It is having 32-bit addressing space which implies that 2^32 = 4.3 billion devices can be connected with it.||It is having a 128-bit addressing scheme which implies that it supports 2^128 devices which is itself a very huge number and can serve users in many more years to come.|
|3)||It is a numeric addressing method. For example, the IP address to allocated user will be like 22.214.171.124||It is alpha-numeric based addressing scheme and for example, the IP address of a host will be like 1280:0db2:26c4:0000:0000:7a2e:0450:8550|
|4)||IPV4 supports manual and the DHCP configuration method and it doesn’t support the feature of auto configuration.||The IPV6 has the feature of auto-configuration and the IPV6 hosts can itself configure themselves to the IPV6 network using ICMPv6 messages.|
|5)||It supports the broadcast addressing scheme as the data packet is sent to all the host devices available in the network.||It supports multicast features as the single packet data can be sent to multiple destination hosts at a time.|
|6)||The IPV4 doesn’t support any security protocols for the secure transmission of data between hosts.||All the sessions of IPV6 are first authenticated by using the various security protocols like IPSec etc. then the communication between the hosts on a secure network will initiate.|
|7)||The IPV4 header length is variable and thus routing process is bit complex as compared to IPV6.||The IPV6 header has a fixed header length of 40 bytes thus offers a simplified routing process.|
|8)||The checksum error is detected and computed in IPV4.||The checksum error is not computed in IPV6.|
|9)||It doesn’t support any IP host mobility function.||It supports the IP host mobility feature which enables the moving node to temporarily change its location in a network with maintaining the ongoing connections at the same time.|
|10)||The quality of service QoS feature is not very efficient.||It is having an in-built QoS feature and is very efficient.|
What Is IPv4
The Internet Protocol version 4 is working at the Internet layer of the TCP/IP model and is accountable for recognizing the hosts given upon the IP addresses and to route the data packet accordingly in the network or among various networks.
Most of the elements of the Internet use IPv4 addressing scheme. An IPv4 address has a 32-bit addressing space, which means 2^32 = 4.3 billion devices.
- Version: The IPv4 has version number 4.
- Header length: It shows the size of the header.
- DSCP: It stands for a differentiated services code field and is deployed for constructing packets.
- Total length: It denotes the size of the header plus the size of the data packet.
- Identification: If the data packet is fragmented for the period of transmission, the field is used to allocate each, and the same number so that it helps in constructing the original data packet.
- Flags: It is used to denote the fragmentation procedure.
- Fragment offset: It indicates the fragment number and source host which uses them for re-arranging the fragmented data in the correct order.
- Time to leave: To elude the chances of looping in the network, each packet is transmitted with some TTL value set, which indicates the number of hops that it can go across. At every hop, the TTL value is degraded by 1 and when it attains zero, then the packet is abandoned.
- Protocol: It denotes the protocol that it is using for transmitting data. TCP has protocol number 6 and UDP has protocol number 17.
- Header Checksum: This field is used for error detection.
- Source IP address: It saves the IP address of the source end host. The length is 32-bit.
- Destination IP address: It saves the IP address of the destination host. The length is 32-bit.
IPv4 Addressing Modes
There are three kinds of Addressing Modes:
(i) Unicast Addressing Mode: In this mode, the sender can send the IP packet only to one destined end host. The IP address of the destination host is contained in the 32-bit destination address IP field of the header.
(ii) Broadcast Addressing Mode: In this mode, the data packet is broadcast or sent to all the host’s end devices present in the network. The broadcast IP address is 255.255.255.255. When the receiver host analyzes this address, then all will entertain the data packets.
(iii) Multicast Addressing Mode: In this mode, the source host can send packets, not to all, but more than one which means several destination hosts. The host determines the destination address for delivery from the destination header field which is having a special range of network addresses that are allowed to deliver the data packet.
Hierarchical Addressing Scheme:
The 32-bit IP address contains the IP address information of the network, the sub-networks and the hosts connected with it. This permits, the IP address scheme to be hierarchical as it can serve several sub-networks and in turn the hosts.
Please remember, as told in the previous tutorial on IP addressing and subnetting, the Network address consists of IP address and subnet mask. All five classes of a subnet are applicable here and are used as described in the tutorial.
Private IP addresses in IPv4:
Each class of the IP has some of the IP range reserved for private IP addresses. These can be deployed within a network like the LAN network of an office but can’t be used to route traffic on the Internet. Thus network devices like routers and switches will drop packets of this below-mentioned range during transmission.
|IP Range||Subnet mask|
|10.0.0.0 to 10.255.255.255||255.0.0.0|
|172.16.0.0 to 172.31.255.255||255.240.0.0|
|192.168.0.0 to 192.168.255.255||255.255.0.0|
We can’t waste this huge range of IP addresses just to be used for Intranet. Thus IP translation process which is known as NAT is used to convert these into public IPs, so that can it be used for communication with the far end.
Loopback IP addresses in IPv4:
The range of the IP from 127.0.0.0 to 127.255.255.255 is reserved for loopback purposes which means host node self-addressing. The loopback IP has a big significance in the client-server communication model.
It is used for testing the proper connectivity between two nodes. For Example, A client and a server within the same system. If the destination address of the host in a system is set as the loopback address, then the system sends it back to itself and there is not any requirement of NIC.
By ping 127.0.0.1 or any IP of the loopback IP range, it has been cleared that the connectivity is established between two systems in a network and they are working properly.
Packet Flow In IPv4
All the devices in the IPv4 environment are allocated with a set of distinctive logical IP addresses. When an end device wants to transmit any data to the remote end device in a network, then it firstly acquires the IP address by sending a request to the DHCP server.
The DHCP server acknowledges the request and in response, it sends all necessary information like IP address, subnet address, gateway, DNS, etc., to the requesting host device.
Now when the user at the source point wants to open a web page like google which denotes the domain name only, then the computer is not having the intelligence of communication with servers having a domain name.
Thus it will send a DNS query to the DNS server which stores the IP address against each of the domain names in it, in order to acquire the IP address respective to the requested web site. In response, the DNS server gives the desired IP address.
If the destination IP address is of the same network, then it will deliver the data accordingly. But if the destination IP is of some another network then the request will go to the gateway router or to the proxy server in order to get the packet routed to the destination.
As the computers work on the MAC address level, the host computer will send the ARP request to obtain the MAC address of the gateway router. The gateway router in response gives back the MAC address. Thus the source host will send a data packet to the gateway.
In this way, the IP address routes the data logically, but the MAC address delivers the data in the system at the physical level.
Need For A New IP Version
Following are some of the key points for which we need a new IP version:
- The address space provided by IPv4 is limited to 4.3 billion users, which is exhausted due to an increase in the use of the Internet these days.
- IPv4 doesn’t provide a secure mode of transmission.
- IPv4 doesn’t support auto-configuration features.
- QoS feature is not up to the mark.
What Is IPv6
IPv6 provisions a straightforward and long-term solution to address the space problem. The addresses defined in IPv6 are huge. IPv6 allows the network devices, big organizations, and even each and every person in the world to connect to each router, switch, and end device to be connected directly to the global Internet.
Features of IPv6
The Advanced features are as follows:
(i) A large number of Addresses: The main reason for designing IPv6 is the shortage of addresses in IPv4. IPv6 has 128-bit addressing. This address space supports a total of 2^128 (nearby 3.4*10^38) addresses, which is potentially enough to connect to an enormous number of devices in many more years to come.
(ii) Address Auto-configuration: IPv6 hosts can automatically configure themselves when connected with an IPv6 network by using ICMPv6 messages. This is in stark contrast to IPv4 networks where a network administrator has to manually configure the hosts.
When an IPv6 network adapter card is triggered, it allocates itself an IP address on the basis of a standard prefix appended to its MAC address. This enables the device to communicate on the internal network and seek out any servers that it is allowed to communicate with.
These might use DHCPv6, AAAA, or other mechanisms to download the gateway addresses, security settings, policy attributes, and other services.
(iii) Multicast: The capability of sending a single packet data to several destination hosts is one of the IPv6 specifications.
(iv) Mandatory security in network Layer: IPv4 was build up when security was not an uppermost concern. Authenticating protocols like Internet protocol security (IPsec) is a part of IPv6 based protocol suite. All conforming IPv6 sessions can, therefore, be authenticated.
(v) Simplified Router processing: To generalize the routing process, the headers have been redesigned and made smaller in IPv6 for fast processing.
In IPv4, the header length is variable but in IPv6 it is fixed to 40 bytes. Optional functions have been moved to separate the extension headers. TTL is replaced by a hop limit. The checksum is not computed.
On the way, routers do not fragment the packets as path MTU discovery is done by the originating router.
(vi) IP Host Mobility: During the past decades, the Internet was working in a pull mode where the users request information from the Internet. But over the years, the scenario has been changed, now push applications like stock alerts, live news, sports updates, multimedia messages, etc., are emerging where ISP’s have to push these services to a user.
But then the ISPs need to reach the user always using the same network identifier, irrespective of the point of attachment to the network. IP host mobility is designed for this need.
Mobile IPV6 enables a mobile node to arbitrarily change its location on an IP network while maintaining the existing connections.
One of the extension headers is the mobility header, which is used for implementing this function in IPv6.
Some of the practical uses of MIPv6 are as follows:
- Enterprise Mobility: Courier services like a Blue dart or public transportation like UBER, OLA cab, etc., use this for their respective jobs.
- Globally reachable home networks: In IPv6, the minimum size given to a user is /64. With this addressing space, a user can create a home network connecting to various devices like cameras, AC, and other equipment. These can be accessed and managed through the Internet. When a family moves from one place to another, then the whole network can move using IP mobility.
- Internet-enabled Transport (buses, trucks, and cabs): Inter-vehicular communication can be easily done using MIPv6. The vehicles can organize themselves into a mesh network and relay the packet information amongst themselves, while they all are moving.
(vii) Flow Lebel QoS: All the differential services and integrated services, quality of service attributes from IPv4 are carried over into IPv6. In addition, IPv6 exclusively has a 20-byte flow label field. This is developed to provide a rich set of QoS attributes for the growing IPv6 world.
The IPv6 header is of 40 bytes and consists of the following fields:
- Version: It is of 4 bits and contains the version of IP which is 6.
- Traffic class: It is of 8 bits and denotes the type of service used for routing packets.
- Flow label: It is of 20 bits. It is used to ensure the sequential flow of traffic. The source device labels the sequences to the data packets so that it is easier for the router to route the packets in sequence. This field is very helpful in real-time streaming.
- Payload length: It is of 16 bits. This field will pass on the information to a router about how much data a particular packet can carry in its payload.
- Next header: This field is of 8 bits and it denotes the presence of an extension header and if it doesn’t exist then it denotes the upper-layer PDU.
- Hop limit: This is of 8 bits and is used to prohibit the data packet to loop in infinity in the system. This works similarly to TTL as in the IPv4 header. At each hop, the value of the hop limit is degraded to 1 and when it reaches zero, the packet is disowned.
- Source address: It is of 128 bits and denotes the address of the source host of the network.
- Destination address: It is also of 128 bits and denotes the address of the receiver host of the packet of the network.
- Extension headers: The IPv6 fixed header consists of only those fields which carry a piece of essential information and elude those which are not used on a regular basis. Such information is set in between the fixed header and upper-layer header and is known as extension headers. Each extension header has some value and is assigned a task.
The details are listed in the below table:
|Extension header||Next header Value||Explanation|
|Hop by hop options header||0||For transit network devices|
|Routing header||43||Having methodology to make routing decisions|
|Fragment header||44||Consists of fragmented data packets parameters|
|Destination options header||60||For the destined devices|
|Authentication header||51||For security purpose and carries authentication information|
|Encapsulating security payload header||50||Encryption information|
IPv6 Addressing Modes
IPv6 offers many addressing modes that are the same as defined in IPv4 and a new mode i.e. anycast addressing mode is introduced.
Let’s understand with the help of an Example.
www.softwaretestinghelp.com web server is located on all the continents. Suppose all the servers are allocated the same IPv6 anycast IP address, when a user from India, searches for the site then the DNS directed to the server is physically present in India itself.
Similarly, if a user from New York, wants to reach the same site then the DNS again will direct it to the server locally present in America. Thus the nearest is used with an appropriate routing cost.
The address structure of IPv6 is 128 bits and is split into 8 hexadecimal blocks each of 16 bits and is separated by a colon symbol.
For Example, the address structure will be like this:
Global Unicast Address:
The above image shows the global unicast addresses in the IPv6 scheme that is divided into various sub-parts, each denoting some information about the network.
The auto-configured address in IPv6 is called as a Link-local address. The 16 bits of the starting is kept as a fixed address, FE80, and the next 48 bits are put as zero.
Thus the structure will look as shown in the below figure:
These are used for internal communication within the IPv6 host devices for broadcast only.
This is globally exceptional and always starts with FD. It is used for native or regional area communications.
The address specifications are shown below in the figure:
Scope for IPv6 Addresses:
Global unicast addresses are used for routing over the internet, while the other two are used at the organization and local level only.
Live Examples Of Applications Of IPv6
Logistics and Supply chain in Indian Railways: The Indian railways is the best example of India’s largest logistics and supply chain network as it consists of the transportation of millions of goods and parcels which travel through several states of the country every day.
Due to the exhausted IP addresses of IPv4, it has become difficult to build the expanding supply chain by using IPv4. The large address space and auto-configuration features of IPv6 will help in tracking and running status of wagons, bogies, and parcels in the system. With the help of this, the end-user can also track the status of their goods.
The database of logistics can be maintained through the online system and can be monitored 24*7 and thereby helps in reducing the cases of late delivery and stolen or lost goods.
Intelligent Transport System: India is still struggling with managing the traffic system in various cities and the situation is even worse in metropolitan cities.
To overcome this, we need real-time monitoring and management of the traffic system. Especially, the need for the common men is to get easy access to public service vehicles like public buses, school vans, ambulance, and fire brigades.
IPv6 provisions the ITS features like mobile IPv6, large address space, and enhanced security model which is required for the implementation of ITS.
The ambulances, school vans, and fire brigade can be equipped with bio-sensors, wireless phones, and video cameras, which make it easy to locate and monitor these vehicles and for the end-users, it becomes simple to access them for their use.
The IPv6 platform enables the system with real-time monitoring of traffic and their management by commissioning the various sensors and monitoring software at the peak point of the traffic and thereby provisions the real-time view of the traffic conditions.
(i) Emergency healthcare: IPv6 is one such technology that can bring a revolutionary change in the industry of Telemedicine and emergency health care.
The Internet is such a platform that can connect all over the world on a single network. Through the enhanced features of IPv6 and 4G LTE technology (which is IP based mobile connectivity for voice, data, and multimedia) we can provide a patient with online and real-time medical support on an emergency basis.
In fact, government hospitals like AIMS and SGPGI are implementing it and they perform many health treatments in collaboration with the overseas doctors connected through video-conferencing by seeking online support for providing an enhanced healthcare facility.
The hospitals can also maintain a record of their expensive health equipment by equipping them with bio-sensors.
(ii) IPTV: Internet protocol television is the fastest growing technology in the market.
Through the features of IPv6 like mobile IPv6, auto-configuration, and large address space, apart from just watching all the channels of Television, we can also watch online movies, videos, songs, online sports, and online gaming.
By using the feature of multi-casting of IPv6, we can watch online TV and real-time streaming videos. We need not subscribe to all the channels and we can select from the IPTV set-top box, whatever channel we need to watch.
As IPTV needs a very high-speed Internet for provisioning the above services, IPv6 is the best suitable platform for implementing it. JIO TV, JIO CINEMA, JIO MUSIC are all examples of IPTV streaming and the MobiTV of the US is managing all the services related to video streaming and TV of the JIO company in India.
During the beginning of the Internet, IPv4 was widely used everywhere but due to the increase in the use of the Internet for several purposes apart from organizations to a home network and mobile phones, the address space is exhausted.
Therefore, IPv6 technology which has an infinite address capability with advanced features like auto-configuration and mobility, etc was introduced.
In this tutorial, we have studied the various features of both IPv4 and IPv6 addressing schemes with the help of live examples and various diagrams. Meanwhile, the transition of IPv6 from IPv4 is not very easy, and still many organizations are using the IPv4 technique and are in the transition phase.
Thus it is necessary to understand the features and working mode of both the IPv4 vs IPv6 addressing schemes.