What is the difference between IPv4 and IPv6?

Why Interviewers Ask This

This is a classic screening question for Networking roles. Hiring managers ask it early in interviews to gauge your baseline understanding and determine if you can communicate technical concepts clearly.

Answer

IPv4 uses 32-bit addresses (4 billion total) written as dotted decimal (e.g., 192.168.1.1). We are essentially out of public IPv4 addresses — NAT was a workaround. IPv6 uses 128-bit addresses providing ~340 undecillion addresses (enough to assign trillions to every person on Earth), written as colon-separated hex (e.g., 2001:db8::1). Key IPv6 improvements: no NAT needed (every device gets a unique global address), no broadcast (uses multicast/anycast), built-in IPsec, stateless address autoconfiguration (SLAAC) — devices configure themselves without DHCP, simpler header for faster routing, and better support for mobility. IPv6 header has no checksum (handled at transport layer) and no fragmentation at routers. Dual-stack deployment runs both IPv4 and IPv6 simultaneously during the transition.

Pro Tip

This topic has Networking-specific nuances that differ from general programming. Highlighting those nuances in your answer shows expertise rather than generic knowledge.