Online admissions open for the SEO, web development and networking & cybersecurity courses. Enquire for the next batch.

IPv4 vs IPv6: Differences, Notation and Dual Stack

6 min read Updated By the SkillNewton team

What is the difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses written in dotted decimal, such as 192.168.1.10, which allows about 4.3 billion addresses. IPv6 uses 128-bit addresses written in hexadecimal, such as 2001:db8::10, giving an address space large enough for every device to have a globally unique address. IPv6 also changes how hosts configure themselves, drops broadcast and replaces ARP with Neighbor Discovery.

The two protocols side by side

Both protocols do the same job at the internet layer: they put a source and destination address on every packet so routers can forward it. The differences lie in address size, header design and the supporting protocols around them. Most networks in 2026 run both at once, so you need to read and troubleshoot each.

FeatureIPv4IPv6
Address length32 bits128 bits
NotationDotted decimal: 203.0.113.25Hexadecimal groups: 2001:db8:85a3::8a2e:370:7334
HeaderVariable, 20 to 60 bytes, with a checksumFixed 40-byte base header, no header checksum, optional extension headers
Address resolutionARP broadcastsNeighbor Discovery Protocol (NDP) over ICMPv6 multicast
BroadcastYesNo; multicast and anycast replace it
Automatic configurationDHCPSLAAC, DHCPv6 or both
FragmentationRouters or the sender can fragmentOnly the sender fragments; routers rely on path MTU discovery
Typical LAN sizeVaries, often /24/64 for almost every LAN

The TCP/IP suite treats both as interchangeable internet-layer protocols, so TCP, UDP, HTTP and DNS work the same on top of either.

Reading and shortening IPv6 addresses

An IPv6 address is eight groups of 16 bits, each written as four hexadecimal digits and separated by colons. Two rules shorten it, and RFC 5952 recommends lowercase letters and the shortest form.

  1. Drop leading zeros inside each group: 0db8 becomes db8 and 0000 becomes 0.
  2. Replace one run of two or more consecutive all-zero groups with ::. Use it only once per address, or the reader cannot tell how many groups each :: hides.
  3. If two zero runs are equally long, compress the first one; if they differ, compress the longer one.
Full:        2001:0db8:0000:0000:0000:0000:0000:0001
Shortened:   2001:db8::1

Full:        2001:0db8:0000:0001:0000:0000:0000:0005
Shortened:   2001:db8:0:1::5          (the longer zero run is compressed)

Invalid:     2001:db8::1::5           (two :: are ambiguous)

The prefix length works exactly as in IPv4 CIDR. In 2001:db8:abcd:12::25/64, the first 64 bits identify the network and the last 64 bits, the interface ID, identify the host. The addressing ideas carry over from the IPv4 addressing guide; only the size and notation change.

Address types you will meet

TypeIPv4IPv6
Loopback127.0.0.1::1
Link-local169.254.0.0/16, only when DHCP failsfe80::/10, always present on every IPv6 interface
Private or local10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16Unique local addresses, fc00::/7 (fd00::/8 in practice)
GlobalPublic unicast addressesGlobal unicast, currently allocated from 2000::/3
Documentation192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/242001:db8::/32
One-to-manyBroadcast and multicastMulticast only, ff00::/8, for example ff02::1 for all nodes on the link

Why link-local matters

Every IPv6 interface creates a link-local address starting with fe80:: as soon as it comes up. Routers send their advertisements from link-local addresses, and hosts use them for Neighbor Discovery, so IPv6 on a link works even before any global address exists. Because the same fe80:: prefix exists on every interface, you must add a zone ID when you ping one, such as ping fe80::1%eth0 on Linux.

NAT versus end-to-end addressing

IPv4 survived address exhaustion largely through NAT: hundreds of private devices share one public address, and many mobile and broadband providers add a second layer called carrier-grade NAT. NAT works, but it breaks the original end-to-end model. Inbound connections need port forwarding, some protocols need helpers, and logs show one public address for many users.

IPv6 restores end-to-end addressing. An ISP typically delegates a prefix such as a /56 or /48 to a customer router, which carves out a /64 for each LAN, and every device gets a globally routable address. That does not mean every device is exposed. A stateful firewall on the router should still block unsolicited inbound traffic by default; the security now comes from filtering rather than from address translation, as covered in network security fundamentals.

How IPv6 hosts get addresses: SLAAC and DHCPv6

Routers on an IPv6 link send Router Advertisements (RAs) that announce the prefix and flags telling hosts how to configure themselves.

  • SLAAC (stateless address autoconfiguration): the host takes the advertised /64 prefix and generates its own interface ID. Modern systems use stable random IDs or temporary privacy addresses rather than building the ID from the MAC address.
  • Stateless DHCPv6: the host builds its address with SLAAC but asks a DHCPv6 server for extras such as DNS servers (the RA "O" flag).
  • Stateful DHCPv6: a DHCPv6 server assigns the address itself and keeps a record (the RA "M" flag). Android devices do not support stateful DHCPv6, so most networks keep SLAAC enabled.

Note that the default gateway always comes from the Router Advertisement, never from DHCPv6. If hosts have IPv6 addresses but no route out, check that RAs are reaching them. IPv4 configuration is covered in the guide on how DHCP assigns addresses.

Dual stack and transition methods

In a dual-stack network every host and router runs IPv4 and IPv6 side by side. When a name resolves to both an A record and an AAAA record, clients use the Happy Eyeballs algorithm (RFC 8305): they try IPv6 first and fall back to IPv4 quickly if it stalls, so users rarely notice a broken path.

  • NAT64 with DNS64: lets IPv6-only clients reach IPv4-only servers by synthesising IPv6 addresses for them.
  • 464XLAT: builds on NAT64 so that applications needing IPv4 still work on IPv6-only mobile networks.
  • Tunnels: carry IPv6 inside IPv4, or the reverse, across networks that support only one protocol.
ip -6 addr show            # IPv6 addresses, including fe80:: link-local
ip -6 route                # IPv6 routes; the default route points to a fe80:: router
ping -6 -c 4 ::1           # test the IPv6 stack locally
dig AAAA example.com +short
curl -6 -I https://example.com   # force an IPv6 connection
ipconfig                   # Windows: lists IPv4 and IPv6 addresses together

Practical exercise: audit IPv6 on your own network

Use your own laptop and home or lab router for this task.

  1. Run ip -6 addr show (or ipconfig on Windows) and list every IPv6 address with its prefix length and scope.
  2. Identify the link-local address and, if present, any global and temporary addresses.
  3. Run ip -6 route and note which fe80:: address your default route uses.
  4. Write the full, unshortened form of one global address, then shorten it again by hand using the two rules.
  5. Query dig A and dig AAAA for a site you use, then try curl -4 and curl -6 to see which works.

You are done when you can say whether your network is IPv4-only, IPv6-only or dual stack and how its IPv6 addresses were assigned. Labs like this are part of the Networking Foundation course.

Common mistakes

  • Using :: twice in one address, which makes it impossible to expand.
  • Assuming IPv6 needs NAT for security, instead of configuring a stateful firewall.
  • Disabling IPv6 to fix a problem without finding the cause, which hides faults that return later.
  • Writing firewall rules for IPv4 only and leaving IPv6 services unfiltered.
  • Pinging a link-local address without a zone ID such as %eth0.
  • Expecting DHCPv6 to supply the default gateway, when it always comes from Router Advertisements.

Frequently asked questions

Is IPv6 faster than IPv4?

Not inherently. Speed depends on the path and the network equipment. Avoiding NAT can simplify some paths, but you should not expect a measurable speed change just from switching protocols.

Why is there no IPv5?

Version number 5 was used by an experimental streaming protocol, so the next generation of IP was numbered 6.

Do I still need to learn IPv4?

Yes. Most networks are dual stack and many devices, services and exam questions still rely on IPv4, including IPv4 subnetting.

Can a device have several IPv6 addresses?

Yes, and it usually does: a link-local address, one or more global addresses and often temporary privacy addresses that change over time.

Want to Learn This Properly?

The Networking & Cybersecurity: Foundation & Practical Implementation (Online) turns guides like this into practised skills, with projects on real websites.

WhatsApp Call Us Now

Free counselling

Send an Enquiry

Tell us which course you are interested in. We reply by email or phone with the next batch and how to enrol.

Protected by reCAPTCHA. Google Privacy and Terms apply.

We reply by email or phone within working hours. No spam.