Limitations of IPv4
- Due to address class allocation practices, public IPv4 addresses are becoming scarce. Because of this, it forces deployment of network address translator to share a public IPv4 address among several private addresses. But, NAT adds complexity and also becomes barrier for applications.
- IPv4 works with flat routing infrastructure in which individual address prefixes were assigned and each prefix became a new route in the routing table.
- IPv4 must be configured either manually or through DHCP.
- It do not have built-in security and rely upon Ipsec for security.
- Due to lack of infrastructure, communication with IPv4 mobile node are inefficient.
IPv6 as replacement of IPv4
- IPv6 addresses are 128 bits long, creating a huge amount of address space.
- It uses hierarchical routing infrastructure. It results in relatively few routing entries in the routing table.
- It is automatically configure with the host’s IPv6 address.
- It supports for Ipsec protocol headers is required. IPv6 packets are not required to be protected with Authentication header (AH) or Encapsulating Security Payload (ESP).
- It is capable of supporting mobility more efficiently.
- IP header contains many fields used by routers to forward the packet from network to network to a final destination.
- Payload represents information to be delivered to the receiver by the sender.
- The basic packet structure is:
| Header | Payload |
Header Structure
The header structure of IPv4 and IPv6 are shown in given figure:

Header Structure Comparison
- IPv6 header is simpler than IPv4 header.
- IPv6 header size is bigger than that of IPv4.
- The source and destination addresses are 32 bit in IPv4 header while 128 bit in IPv6 header.
- IPv4 header is of variable size with minimum of 20 byte in length. IPv6 header is of fixed size with 40 byte in length.
Dual Stack Router:
- A router can be installed with both IPv4 and IPv6 address configured on its interfaces pointing to the network of relevant IP scheme.
- It is capable of communicating with both types of network.
- It provides a medium for the hosts to access a server without changing their respective IP versions.
- IPv6 is not supported on all of the IPv4 devices.

Tunneling:
- Tunneling provides a solution where user data can pass through a non supported IP version.
- Two remote IPv4 networks can communicate via a tunnel where the transit network is on IPv6.
- Two remote IPv6 networks can communicate via a tunnel where the transit network is on IPv4.

NAT Protocol Translation:
- It is the important method of transition to IPv6 by means of a Network Address Translation – Protocol Translation (NAT – PT) enabled device.
- With the help of NAT – PT device, actual translation can take place between IPv4 and IPv6 packets and vice versa.
- When IPv4 host sends a request packet to IPv6 server, NAT – PT device strips down IPv4 packet, removes IPv4 header and adds IPv6 header and passes it through the Internet.
- When a response from IPv6 server comes for the IPv4 host, the router does the reverse action.

Comparisons:
- Dual stack allows IPv4 and Ipv6 to coexist in the same devices and networks.
- Tunneling allows transport of IPv6 traffic over the existing IPv4 infrastructure.
- Translation allows IPv6 only nodes to communicate with IPv4 only nodes.