IPv4 and IPv6 are the Internet protocol to identify devices on a network using IP addresses. IPv6 is an upgrade over IPv4 and it fulfills the need of more IP addresses. They are the internet addressing system and the underlying technology that facilitates us to connect our devices to the web.

IPv4 was the first version deployed for production in ARPANET in 1983. Though it is that old, it still routes the majority of the Internet traffic.

IPv4 provides about 4.3 billion addresses which might seem enough but an enormous increase in the number of devices demanding IP addresses have exposed the limitation of Ipv4.

The insufficient and depleting IP address space of IPv4 paved the way for IPv6 to come to the rescue. IPv6 is the successor of IPv4 and is set to replace IPv4 and its limitations.

What is IPv4?

IPv4 is the most commonly deployed version of the Internet Protocol. This connectionless protocol is one of the core protocols of standards-based internetworking methods on the internet.

It is defined and specified in IETF publication RFC 791 and used in the packet-switched link layer of the OSI model.

It is based on the best-effort model which basically means that Ipv4 assures neither delivery nor avoidance of duplicate delivery. These features are taken care of by upper layer transport protocol like TCP or Transmission Control Protocol.

It is very much in use for data communication over various kinds of networks. Moreover, it offers the logical connection between network devices by assigning identification for each device.

Characteristics of IPv4

Lets review some of the characteristics of IPv4.

Address space

It uses 32-bit addresses and offers around 4.3 billion addresses. Some of them are reserved for private networks (approximately 18 million) as well as for multicast addresses (about 270 million).

Representation of addresses is in the dotted decimal format with four octets separated by periods. For example, 130.23.6.1.

In CIDR (Classless Inter-Domain Routing), the address is followed by a slash (/) character and the count of the number of consecutive 1s in routing prefix.

Connectionless

It is a connectionless protocol. No connection is established before sending data packets. It is used in packet switched layer networks like Ethernet.

Best effort

It assures neither delivery nor avoidance of duplicate delivery. These features are taken care of by upper layer transport.

Media independent

It operates independently of the medium carrying the data.

Simplicity and Familiarity

It is simple and easy to remember. It is very common and widely used. Innumerable devices are already using, and there are no compatibility issues.

What are the functions of IPv4?

IPv4 is noted for the following functions.

  • Classful addressing
  • Classless addressing
  • Special address

Are you keen to know them in details? Let’s proceed then!

Classful Addressing

The IPv4 address class is a categorical division of IP addresses in IPv4 based routing. The IP address has two parts – Network ID (Net ID), the most significant portion of the address and the rest of it is called Host ID. This structure provided a maximum of 256 network identifiers which was soon found insufficient.

The entire design was refined in 1981 to overcome these drawbacks. Thus classful networking originated.

Suggested read – Subnet cheat sheet

The revised system has 5 different classes. The characteristics of these classes are as follows:

 

FeaturesCLASS ACLASS BCLASS CCLASS DCLASS E
No of bits for Net ID81624
No of bits for Host ID24168
Range0.0.0.0 to 127.255.255.255128.0.0.0 to 191.255.255.255192.0.0.0 to 223.255.255.255224.0.0.0 to 239.255.255.255240.0.0.0 to 255.255.255.254
Used inLarge organizationsMidsize organizationsSmall organizationsMulticast IP addressesExperimental IP addresses

Different IP address classes are applied to different networks. Some are used for networks behind a router (class A, B, C). Again, some of them are reserved by IETF and Internet Assigned Numbers Authority (IANA) for specific reasons.

Some of them are special to be used for multicasting identical data to all computers on a network or subnet or research purposes (class D, E).

Drawbacks of Classful Addressing

There are some shortcomings of classful addressing. These drawbacks led the way towards CIDR. But before knowing about CIDR, let us look at the cons of classful addressing first.

They are as follows:

  • Many class A and B addresses are wasted.
  • No organization is so small to be allocated a class C block.
  • The range of classes allotted to a company belonged to A, B or C; not D & E.
  • Block of class E addresses was reserved for particular purposes.

Classless Addressing

In 1993, the system of classful addressing was replaced officially by Classless Inter-Domain Routing (CIDR). CIDR permitted repartitioning of any address space to allocate a user or with smaller or larger blocks of addresses.

Internet Assigned Number Authority (IANA) and Regional Internet Registries (RIR) handle its hierarchical structure.

In the classless method, IP can be partitioned as per our need.

  • All IPs should be contiguous.
  • The block size must be a power of 2.
  • First IP address in the block must be evenly divisible by the size of the block.

Special Addresses

IETF and IANA have explicitly kept reserved IP addresses for particular purposes. It can be for maintaining routing tables, multicasting, operation in failure modes, etc.

Some special address blocks and their details are given below.

Address BlockAddress RangeScopeDescription
0.0.0.0/8O.o.o.o – 0.255.255.255softwareCurrent network
127.0.0.0/8127.0.0.0 – 127.255.255.255hostUsed for loopback address to the localhost
169.254.0.0/16169.254.0.0 – 169.254.255.255subnetUsed for link-local address between two hosts on a link when no IP is otherwise specified
192.0.0.0/24192.0.0.0 – 192.0.0.255Private networkIETF protocol assignment
224.0.0.0/4224.0.0.0 – 239.255.255.255InternetIn use for IP multicast
255.255.255.255/32255.255.255.255subnetReserved for limited broadcast destination address

There are many other special address blocks.

What are the benefits of IPv4?

IPv4 has many advantages. They are discussed below.

Widely deployed

It is commonly used. It drives the majority of internet traffic till date. It supports all types of OS and commonly used protocols.

Flexible

Routing is scalable and efficient because addressing is aggregated effectively. Data communication over the network turns specific. It works nicely for companies using multicasting.

Large routing tasks

IPv4 allocation is crucial. It has more than 8.5k routers functioning currently. It facilitates connection of many devices across an extensive network.

If IPv4 was so good, why did Ipv6 come into existence?

The explosive growth of commercial internet and increase in IP-enabled devices led to the shortage of available IP addresses. This behavior is quite natural and bound to happen. The reason is simple.

There are more than 6 billion people in the world. Many people have more than one device connected to the Internet. Therefore, it is not astonishing that the address space is on the verge of depletion.

This fast approach towards the end of availability of address space led to the evolution and implementation of IPv6. IPv6 is the replacement for IPv4 with similar features but more address space and added features.

What is IPv6?

It is an internet layer protocol for packet switching internetworking. It also allows end-to-end datagram transmission across multiple IP networks, much like IPv4. In other words, it enables data communication over a packet switched network.

IETF has made the basic framework for IPv6. Its IETF specification is RFC 2460.

Though IPv4 still regulates the majority of internet traffic, sooner or later everyone has to switch over to IPv6.

It is also called “next generation” because of its extended features and growth through recent large scale deployment. In 2004, Japan and Korea were acknowledged as having the first public deployments of IPv6.

A comparative study between IPv4 and IPv6

IPv4 and IPv6 are similar to each other. But there are few additional features of IPv6 and certain features that differentiate them.

Lets compare them.

FeaturesIPv4IPv6
Network configurationConfigured manually or with DHCP.Provides auto-configuration capabilities.
Network managementMany overlays to deal with increased Internet growth. Requires huge maintenance efforts.Simple and easy to manage, especially for large networks.
Address spaceHas 32-bit address; offers around 4.3 billion addressHas 128-bit address; offers about 670 quadrillion addresses
ConnectivityEnd-to-end connectivity is not achieved due to extensive use of NAT.Direct addressing due to vast address space is possible, hence use of NAT can be omitted.
SecurityDepends on applicationsHas in-built security and end-to-end encryption

What is the importance of IPv6?

IPv6 saved the world when the world as a whole was in the panic of losing address space provided by IPv4. Deployment of IPv6 commenced more than a decade ago, yet the rate is slow.

The essence of IPv6 and its features are depicted through the advantages it offers. Let us proceed pointwise.

Large address space

By this time, I think you know about the details of the address space of IPv6 and the difference with IPv4. So, I will not jump into this again.

Security

IPv6 can run end-to-end encryption. It also provides more secure name resolution. It is done with the help of the SEND (Secure Neighbour Discovery) protocol which decreases the chances of attacks like ARP poisoning, etc.

Stateless and stateful address configuration

IPv6 supports both the above types of configuration and thus simplifies host configuration. By stateful, it refers to address configuration in the presence of a DHCP server.

By stateless, it means the configuration in the absence of a DHCP server.  Hosts on a link can configure themselves automatically with IPv6 addresses for the link. Even in the absence of a router, hosts on the same link can automatically setup themselves with link-local addresses and communicate without manual configuration.

Support for QoS

A flow is a series of packets between a source and a destination. A flow label field in IPv6 header helps in traffic identification.

Thus a router can specially handle packets belonging to a flow. Traffic identification by IPv6 thus provides better support for quality of service (QoS) when the packet payload is encrypted with IPSec.

The new protocol for Neighbouring Node Interaction

The Neighbour Discovery protocol for IPv6 is a series of ICMP for IPv6 messages (ICMPv6) that deal with the interaction between neighboring nodes. This protocol replaces ARP, ICMPv4 Router Discovery and ICMPv4 Redirect messages. It offers efficient multicast and unicast messages with extra functionalities.

Extensibility

On extending the IPv6 headers, new features can be incorporated. In IPv4 the Options field supported only 40 bytes. But in IPv6, the size of IPv6 extension headers depends on the size of the IPv6 packet and so can be large.

Conclusion

The IPv4 to IPv6 transition had commenced since the mid-2000s but yet, the majority of internet traffic is still due to IPv4. The depleting address space of IPv4 has proved that migration to IPv6 is inevitable. But do you wonder why the rate of migration is slow?

It can be due to various reasons.

Modifying designs of an uncountable number of devices on the internet as well as changing hardware for core networks are not the kind of tasks scheduled to be done every day. They require time and money for implementation.

Evolution of NAT (Network address translation) and CIDR extended IPv4 lifetime for some time, and so the need of upgradation to IPv6 slowed down for the time being.

IPv4 is the pillar of next-generation technology. Adoption of IPv6 by the entire world may take time, but the accelerated exhaustion of IPv4 address space has made it unstoppable. Organizations and companies must start preparing for this transition and successfully execute it as fast as possible.

IPv4 and IPv6 are the Internet protocol to identify devices on a network using IP addresses. IPv6 is an upgrade over IPv4 and it fulfills the need for more IP addresses.