What is the Difference Between IPv4 vs IPv6?

A comparison between IPv4 and IPv6.

IPv6 vs IPv4

In our Bunny Academy article about IPv4, we used the analogy of IPv4 being similar to how mail is routed. Using the same analogy for IPv6, the IP packet headers (how you package and address the mail) differ between IPv4 and IPv6 packets. Thus, the two protocols are not compatible and require Network Address Translation (NAT) to translate IPv4 addresses into IPv6 addresses that can be sent across an IPv6 network, and vice versa.

IPv6 was designed to fix the issues with IPv4. The biggest drawback of IPv4 is that it doesn’t provide enough addresses for every device on the internet. Other than additional addresses, IPv6 improves upon IPv4 in several ways:

  • Adds support for hierarchical address allocation, which allows for route aggregation across the internet and limits routing table expansion.
  • Simplifies and expands multicast addressing.
  • Takes into account device mobility, security, and configuration.

Increased security

IPv6 has built-in Internet Protocol Security (IPsec) that offers confidentiality, authentication, and data integrity, surpassing IPv4 in terms of security.

Internet Protocol Security (IPsec) secures data transmission over a network by encrypting and authenticating IP packets. It was originally developed for IPv6 but it was later added to IPv4. IPsec supports the Authentication Header (AH) and the Encapsulating Security Payload header (ESP) added as IPv6 extension headers.

Also, the increased IP space offered by IPv6 improves security through obscurity—bots and other malicious software will have a much harder time scanning random addresses for vulnerabilities.

Fragmentation in IPv4 caused security vulnerabilities. Hence, IPv6 does not allow routers to perform fragmentation. Hosts must perform path maximum transmission unit (MTU) discovery before sending datagrams, ensuring an end-to-end fragmentation process for packets no larger than the default MTU of 1280 bytes. Fragmentation relies on the IPv6 extension headers. If the packet size is greater than the MTU, the router discards the packet and notifies the host through an ICMPv6 packet — Packet Too Big message. The source host fragments the packet according to the MTU and resends it.

Better performance

Despite being twice as large as the IPv4 header, IPv6 is optimized for faster processing and the packet header has fewer fields. Rarely used fields in the IPv4 header were moved to optional header extensions in IPv6.

For example, IPv4 used checksum verification to detect errors. This step is unnecessary in IPv6 since most error detection is already handled outside of the IP protocol. Routers no longer must calculate the checksum for every packet.

Since IPv6 has enough addresses for every networked device and doesn’t require NAT, Quality of Service improves, and peer-to-peer networks become easier to manage. Mobile users can connect directly to servers via IPv6, skipping the hops in between for much better performance.

Cost

IPv4 addresses are more expensive due to high demand and limited supply. With the abundance of IPv6 addresses, the cost per address is greatly reduced.

Extensibility

The core IPv6 packet header has header extensions that offer the opportunity to extend the protocol in the future without affecting the core packet structure. This wasn’t the case with IPv4.

Multicasting

The IPv6 specification accounts for multicasting. IPv4 also supports multicasting using reserved addresses between 224.0.0.0 and 239.255.255.255. IPv6 multicast addresses use the prefix ff00::/8. While IPv6 doesn’t implement a traditional broadcast transmission in a local network, it can use the multicast group at address ff02::1 to get the same effect.

Stateless address autoconfiguration (SLAAC)

By default, IPv6 hosts use Stateless Address Autoconfiguration (SLAAC) to automatically configure their interfaces without any device tracking which address is assigned to which node. Every interface gets a self-generated link-local address. When it connects to a network, a router performs conflict resolution and provides network prefixes via router advertisements. Each host can also configure additional stateful addresses via Dynamic Host Configuration Protocol version 6 (DHCPv6).

Although IPv6 removes the need for NAT, a stable, unique, and globally addressable IP address enables tracking of a device across a network, which poses privacy concerns for mobile devices. To address these privacy concerns, SLAAC generates and provides temporary, random, unstable addresses. After a week, devices ignore traffic to old addresses.

Conclusion

In short, IPv6 has a larger address space, supports stateless configuration, and is set up to allow header expansion without requiring protocol changes. Many features of IPv6 have also been reengineered to function with IPv4 addresses, but many IPv6 features – such as SLAAC – are possible due to the increased address space of IPv6.

Because IPv4 and IPv6 differ significantly, NAT is required for these versions of the Internet Protocol to communicate together.

Did you find this article helpful?

0 out of 0 Bunnies found this article helpful

Glossary

IP Address

A unique location on the internet represented by an alphanumeric address. The two current standards are IPv4 and IPv6.

Nat

Network Address Translation. A method of connecting IP networks with incompatible addresses.

Prove your Knowledge.
Earn a bunny diploma.

Test your knowledge in our Junior and Master Quizes to see where you stand. Prove your mastery by getting A+ and recieving a diploma.

Start the QuizBunny with a diploma.