Every network exam covers both IP versions, and the questions fall into a handful of patterns: compare the two, identify an IPv6 address type from its prefix, shorten or expand an address, and pick the right coexistence technology. This guide gives you the comparison, the address types, the compression rules with worked examples, and the traps, aimed at CompTIA Network+ and Cisco CCNA. All the IPv6 examples use the 2001:db8::/32 range reserved for documentation (RFC 3849), so they are valid but belong to no real network.
IPv4 vs IPv6 comparison table
The core difference is address size: IPv4 uses 32-bit addresses written in dotted decimal, while IPv6 uses 128-bit addresses written in hexadecimal. IPv6 also has a simpler fixed header, no broadcast, no router fragmentation and built-in autoconfiguration. The table lines the two up feature by feature.
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits (4,294,967,296 addresses) | 128 bits (about 3.4 x 10^38 addresses) |
| Notation | Dotted decimal: 192.0.2.10 | Colon-separated hex: 2001:db8::a |
| Header | 20 to 60 bytes (variable with options) | Fixed 40 bytes; options in extension headers |
| Header checksum | Yes, recalculated at each hop | None (left to link layer and transport) |
| Fragmentation | Source and routers may fragment | Source only; routers never fragment |
| Broadcast | Yes | No; multicast and anycast instead |
| Address resolution | ARP | Neighbor Discovery (ICMPv6, RFC 4861) |
| Configuration | Manual or DHCP | SLAAC, DHCPv6 or manual |
| NAT | Widely used to conserve addresses | Not needed for conservation; NAT64 for coexistence |
| IPsec | Optional add-on | Originally mandatory to support; later node requirements relaxed it to a recommendation |
| Subnet mask | Mask or prefix length | Prefix length only; /64 is the standard LAN subnet |
| Defined in | RFC 791 | RFC 8200 (obsoletes RFC 2460) |
On the IPsec row, be careful: many study guides state flatly that IPv6 “has IPsec built in”. That reflects the original requirement that every IPv6 node support it; current guidance (RFC 8504) is less strict, and in practice IPsec is something you configure in both protocols. For the exam, the safe reading is that IPv6 was designed with IPsec support in mind. Check your exam objectives for the wording they use.
Why was IPv6 created?
IPv4's 32-bit space was too small for a world of billions of devices. Classless addressing (see subnetting explained) and NAT (see what is NAT) extended its life by years, but IPv6 fixes the shortage at the root. The extra bits also simplify design: a standard /64 for every LAN means no one has to shrink subnets to save addresses, and every device can have a globally unique address, which restores the end-to-end model that NAT broke. IPv6 also cleans up the protocol: a simpler header, no router fragmentation, and neighbor discovery that replaces ARP.
IPv6 is not backward compatible with IPv4. An IPv6-only host cannot talk directly to an IPv4-only host; that is why coexistence mechanisms exist, as covered below.
How do the IPv4 and IPv6 headers differ?
IPv4 headers vary from 20 to 60 bytes because of optional fields and carry twelve basic fields, including a header checksum that every router must recompute because TTL changes at each hop. The IPv6 header is a fixed 40 bytes with eight fields, and it drops the checksum, the header length field and the fragmentation fields.
| IPv4 field | IPv6 equivalent |
|---|---|
| Version (4) | Version (6) |
| DSCP / ECN (type of service) | Traffic Class |
| Not present | Flow Label (20 bits, identifies a flow) |
| Total Length | Payload Length |
| Protocol | Next Header (may point to an extension header) |
| TTL | Hop Limit |
| Source and destination address (32 bits each) | Source and destination address (128 bits each) |
| IHL, Identification, Flags, Fragment Offset, Header Checksum, Options | Removed from the base header (fragmentation and options move to extension headers) |
Exam rule of thumb: TTL becomes Hop Limit, Protocol becomes Next Header, and there is no header checksum in IPv6. The simpler, fixed-size header is easier for hardware to process. Because routers never fragment, hosts discover the path MTU, and IPv6 requires links to support at least 1280 bytes.
What are the IPv6 address types?
IPv6 has three kinds of address: unicast (one device), multicast (a group) and anycast (the nearest of several). Unicast splits into global (2000::/3), link-local (fe80::/10) and unique local (fc00::/7). There is no broadcast. The table gives the prefix, scope and an example for each type.
| Type | Prefix | Scope and use | Example |
|---|---|---|---|
| Global unicast | 2000::/3 (currently allocated from this block) | Public, routable on the internet; the IPv6 counterpart of a public IPv4 address | 2001:db8:acad:10::1 |
| Link-local unicast | fe80::/10 | Valid only on the local link; auto-created on every IPv6 interface; used by Neighbor Discovery and routing protocol next hops | fe80::202:b3ff:fe1e:8329 |
| Unique local (ULA) | fc00::/7 (in practice fd00::/8) | Private addressing inside an organization; not routed on the internet | fd12:3456:789a:1::1 |
| Multicast | ff00::/8 | One-to-many; replaces broadcast. ff02::1 is all nodes, ff02::2 is all routers on the link | ff02::1 |
| Anycast | Taken from unicast space | The same address on several devices; the packet goes to the nearest one | Configured, not a separate range |
| Loopback | ::1/128 | The local host, like 127.0.0.1 | ::1 |
| Unspecified | ::/128 | Source address used before a host has one (for example during duplicate address detection) | :: |
Recognition shortcuts: starts with 2 or 3 means global unicast; fe80 through febf means link-local; fc or fd means unique local; ff means multicast. Every IPv6 interface normally has a link-local address in addition to any global address, which is why a single interface shows multiple IPv6 addresses. The 2001:db8::/32 prefix used here is a documentation range and is never assigned for real use.
The IPv4 equivalents of these ideas are covered in private IP address ranges: ULA corresponds to RFC 1918, link-local corresponds to APIPA 169.254.0.0/16 and loopback to 127.0.0.0/8.
How do I shorten (compress) an IPv6 address?
Shorten an IPv6 address by dropping leading zeros in every group, then replacing one run of consecutive all-zero groups with a double colon (::). The double colon may be used only once per address. Apply the two rules in this order:
- Drop leading zeros in each group. 0db8 becomes db8, 0042 becomes 42, 0000 becomes 0. Only leading zeros; trailing zeros are significant (ff00 stays ff00).
- Replace one run of consecutive all-zero groups with ::. It can be used only once per address. If there are two runs, compress the longest; if they are equal length, compress the first (RFC 5952).
| Full address | Compressed | Note |
|---|---|---|
| 2001:0db8:0000:0000:0000:ff00:0042:8329 | 2001:db8::ff00:42:8329 | Leading zeros dropped, three zero groups become :: |
| fe80:0000:0000:0000:0202:b3ff:fe1e:8329 | fe80::202:b3ff:fe1e:8329 | Link-local; the last 64 bits are the interface identifier |
| 2001:0db8:0001:0000:0000:0000:0000:0001 | 2001:db8:1::1 | The long run of four zero groups is replaced |
| 2001:0db8:0000:0000:0001:0000:0000:0001 | 2001:db8::1:0:0:1 | Two equal runs: compress the first, keep the second as 0:0 |
| ff02:0000:0000:0000:0000:0000:0000:0001 | ff02::1 | All-nodes multicast |
| 0000:0000:0000:0000:0000:0000:0000:0001 | ::1 | Loopback |
To expand an address, reverse the process: restore leading zeros so that each group has four digits, then replace :: with enough zero groups to reach eight groups in total. Count the groups that are present, subtract from 8, and that is how many zero groups the :: stands for. For 2001:db8:1::1 there are three explicit groups on the left, plus one on the right, so :: stands for 8 - 4 = 4 groups.
Prefix length works like CIDR in IPv4: 2001:db8:acad:10::/64 means the first 64 bits are the network prefix. A typical LAN is a /64: 64 bits of network and 64 bits of interface identifier. That alignment is required for SLAAC to work, so do not subnet below /64 on a LAN that uses SLAAC. For the binary side of prefix lengths see our subnetting guide and VLSM explained.
Practice what you just read
Drill IPv6 address types and compression in free practice mode: 30 questions per session, no signup needed.
Check yourself
Check 1. Compress 2001:0db8:0000:0000:0000:ff00:0042:8329.
2001:db8::ff00:42:8329. Drop the leading zeros in each group, then replace the single run of three all-zero groups with ::.
Check 2. An IPv6 address starts with fe80. What type is it, and can a router forward it off the local link?
It is a link-local unicast address (fe80::/10). It is only valid on the local link, and routers never forward packets with a link-local source or destination to another link.
Check 3. Does IPv6 have a broadcast address?
No. IPv6 replaces broadcast with multicast (for example ff02::1, all nodes on the link) and adds anycast. ARP is replaced by Neighbor Discovery, which uses ICMPv6 and multicast.
How do SLAAC, DHCPv6 and Neighbor Discovery work?
Neighbor Discovery (NDP), defined in RFC 4861, uses ICMPv6 messages for the jobs ARP did in IPv4, plus router discovery. The four messages worth knowing are Router Solicitation (RS, host asks for routers), Router Advertisement (RA, router announces prefix and settings), Neighbor Solicitation (NS, “who has this address?”) and Neighbor Advertisement (NA, the answer). NS messages go to a solicited-node multicast address rather than to everyone, which is quieter than an ARP broadcast.
SLAAC (RFC 4862) lets a host build its own address: the router advertises a /64 prefix, the host appends a 64-bit interface identifier and checks for duplicates with Duplicate Address Detection. The identifier is generated from the MAC address (EUI-64) or, more often now, randomized for privacy (temporary addresses, RFC 8981, which replaced RFC 4941). DHCPv6 (RFC 8415) is the stateful option, where a server tracks leases; the RA flags tell the host which to use. Three combinations show up in exams:
| Mode | Address from | Other settings (DNS) from |
|---|---|---|
| SLAAC only | Prefix in RA plus self-generated identifier | Not provided by this mode (or via RA options) |
| SLAAC plus stateless DHCPv6 | SLAAC | DHCPv6 server |
| Stateful DHCPv6 | DHCPv6 server | DHCPv6 server |
A minimal Cisco IOS setup to make an interface IPv6-capable and advertise a prefix looks like this:
R1(config)# ipv6 unicast-routing
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ipv6 address 2001:db8:acad:10::1/64
R1(config-if)# no shutdown
R1# show ipv6 interface briefipv6 unicast-routing is the command candidates forget: without it a Cisco router has IPv6 addresses but does not route IPv6 or send router advertisements. The router also builds a link-local address automatically on the interface.
How do IPv4 and IPv6 coexist?
Because the two protocols are incompatible, three families of techniques bridge them. Exams like to ask which family a description belongs to.
| Method | How it works | Use when |
|---|---|---|
| Dual stack | Devices run IPv4 and IPv6 at the same time, each with both addresses | Preferred approach where both are available |
| Tunneling | IPv6 packets are encapsulated inside IPv4 packets (for example protocol 41) to cross an IPv4-only network | Islands of IPv6 separated by IPv4 infrastructure |
| Translation | NAT64 (RFC 6146) converts IPv6 packets to IPv4 and back, usually with DNS64 | IPv6-only clients need IPv4-only services |
Tunneling mechanisms are described in RFC 4213. The decision rule: both on one device is dual-stack; wrapping one inside the other is tunneling; converting between the two is translation. NAT64 is explained in more detail in our guide to NAT, including NAT64 and CGNAT.
How widely is IPv6 used?
Adoption varies widely by country, network type and the date you check, so any number quoted in a study guide is out of date quickly. Google publishes a continuously updated measurement of the percentage of users who connect to Google over IPv6, with a world view and per-country data; it is linked in the sources below. The takeaway for exams is qualitative: IPv6 is widely deployed but IPv4 is still very much in use, which is why dual-stack, tunneling and NAT64 are all still on the blueprint.
Common exam traps
The most frequent IPv6 mistakes are using :: twice, dropping trailing zeros, expecting a broadcast address and confusing unique local with link-local. Each is listed below with the correct rule.
- :: used twice. It may appear only once. An address with two :: is invalid.
- Dropping trailing zeros. Only leading zeros in a group can be dropped. ff00 is not ff.
- Broadcast in IPv6. It does not exist. Use multicast (ff02::1 for all nodes). ARP is replaced by NDP.
- Link-local confusion. fe80::/10 addresses never cross a router. Also, they are generated automatically even if no global address is set.
- fc00::/7 vs fe80::/10. ULA is the private-routable equivalent of RFC 1918; link-local is not routable at all.
- Header facts. Fixed 40 bytes, no checksum, TTL is Hop Limit, Protocol is Next Header.
- Fragmentation. IPv6 routers do not fragment; only the source can. IPv4 routers can.
- ipv6 unicast-routing. Needed on Cisco routers to route IPv6 and to send RAs.
- Subnetting below /64. Breaks SLAAC on that LAN.
- “IPv6 doesn't need a firewall because it has no NAT.” Wrong. NAT was never a security control; stateful filtering is still needed.
- Mask notation. IPv6 uses prefix length only (/64), not a dotted mask.
How do Network+ and CCNA test IPv4 vs IPv6?
CompTIA Network+ N10-009 focuses on recognition: identify the address type from a sample, know the IPv6 characteristics, and pick the right transition technology. Questions often present an address and ask whether it is link-local, multicast or global. Review them alongside the other addressing topics in the Network+ cheat sheet and the overall Network+ exam guide.
Cisco CCNA 200-301 goes further: it covers IPv6 addressing and address types, configuring and verifying IPv6 addressing on interfaces (show ipv6 interface brief) and IPv6 static routing. SLAAC and DHCPv6 are worth understanding for the concepts, but confirm on Cisco's current topic list whether they are named objectives. The CCNA cheat sheet has the commands, and the CCNA exam guide places IPv6 in the study plan. If you are choosing between exams, see Network+ vs CCNA. Always confirm the current objective wording on the official CompTIA and Cisco exam pages. Related reading: what is a VLAN, TCP vs UDP and the OSI model.
IPv4 vs IPv6 practice questions with answers
Answer each one before you open it. For a timed bank, use the Network+ practice exam or the CCNA practice exam.
1. Which is the correctly compressed form of 2001:0db8:0000:0000:0001:0000:0000:0001?
2001:db8::1:0:0:1. There are two runs of two zero groups, so the rule is to compress the first of equal-length runs (RFC 5952). Writing 2001:db8:0:0:1::1 is also valid but not the recommended form; using :: twice is invalid.
2. Which IPv6 prefix is used for unique local addresses?
fc00::/7, which in practice means addresses starting with fd. They are the IPv6 counterpart of RFC 1918 private addresses: routable inside an organization, not on the public internet. fe80::/10 is link-local, ff00::/8 is multicast and 2000::/3 is global unicast.
3. A host receives a router advertisement with prefix 2001:db8:acad:10::/64 and creates its own address. Which mechanism is this?
SLAAC (stateless address autoconfiguration, RFC 4862). The router supplies the prefix, the host generates the 64-bit interface identifier. DHCPv6 would require a server to hand out the address. ARP is not used in IPv6.
4. Which statement about IPv6 fragmentation is correct?
Routers do not fragment IPv6 packets; only the source host may, using a Fragment extension header, so hosts rely on path MTU discovery. IPv4 routers could fragment in transit. The IPv6 minimum link MTU is 1280 bytes.
5. A technician types ping ff02::1 on a LAN. What does this do?
It sends an echo request to the all-nodes link-local multicast group, so every IPv6 node on the link responds. It is the closest IPv6 equivalent of pinging a broadcast address. A link-scope address usually needs the interface specified on the host, for example ping ff02::1%eth0 on Linux.
6. A company has IPv6-only phones that must reach a legacy IPv4-only server. Which technology fits best?
NAT64 with DNS64. It translates between the two protocols. Dual-stack would require IPv4 on the phones and tunneling carries one protocol across a network that does not support it, but neither converts an IPv6-only client's traffic into IPv4 for the server.
Frequently asked questions
What is the main difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses (about 4.3 billion in total) written in dotted decimal, while IPv6 uses 128-bit addresses written in hexadecimal, which is vastly larger (about 3.4 x 10^38). IPv6 also has a simpler fixed 40-byte header, no broadcast, built-in stateless address autoconfiguration (SLAAC) and no router fragmentation, and it was designed so that NAT is not needed for address conservation.
How many bits is an IPv6 address and how is it written?
An IPv6 address is 128 bits, written as eight groups of four hexadecimal digits separated by colons, where each group represents 16 bits. For example 2001:0db8:0001:0000:0000:0000:0000:0001. It can be shortened by dropping leading zeros in each group and replacing one run of consecutive all-zero groups with a double colon, giving 2001:db8:1::1.
Can you use :: more than once in an IPv6 address?
No. The double colon stands for one or more consecutive groups of zeros, and it can appear only once in an address. If it appeared twice, there would be no way to know how many zero groups each one replaced. For example 2001:db8::1::2 is invalid.
Does IPv6 replace NAT?
IPv6 removes the main reason for NAT, which was IPv4 address shortage, because every device can have a globally unique address. Translation still exists for coexistence, notably NAT64 (RFC 6146) for IPv6-only clients reaching IPv4 servers. A stateful firewall, not NAT, provides the protection people sometimes attribute to NAT.
What is SLAAC and how is it different from DHCPv6?
Stateless address autoconfiguration (SLAAC, RFC 4862) lets a host build its own global address from the /64 prefix announced in a router advertisement plus an interface identifier it generates. DHCPv6 (RFC 8415) is the stateful alternative in which a server assigns addresses and options. A stateless DHCPv6 server can supply only options such as DNS servers while the host still uses SLAAC for its address.
Is IPv6 faster than IPv4?
Not inherently. IPv6 has a simpler fixed header and no fragmentation by routers, which can reduce processing, but real-world speed depends on routing, peering and congestion, and measurements vary by network. The honest answer for an exam is that IPv6 is designed for scalability and simplicity, not guaranteed higher throughput.
How much of the internet uses IPv6?
It depends on the country and the month, and the figure keeps changing. Google publishes a continuously updated measurement of the share of users who reach Google over IPv6, with per-country breakdowns, and that page is the best current reference. Adoption is substantial but incomplete, which is why dual-stack and translation still matter.
How we wrote and checked this
CertSharp is a practice-exam provider, so we have a commercial interest in exam preparation. This guide was written from the RFCs and official exam pages listed below. Every address, compression example and range was checked with a script (Python's ipaddress module), and the configuration snippets follow Cisco IOS syntax from vendor documentation rather than output captured from production equipment. Last reviewed on October 18, 2026. Exam objectives change, so confirm the current wording on the CompTIA and Cisco pages.
Sources and further reading
- RFC 791: Internet Protocol (IPv4)
- RFC 8200: Internet Protocol, Version 6 (IPv6) Specification
- RFC 4291: IP Version 6 Addressing Architecture
- RFC 4861: Neighbor Discovery for IP version 6
- RFC 4862: IPv6 Stateless Address Autoconfiguration
- RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
- RFC 5952: A Recommendation for IPv6 Address Text Representation
- RFC 8981: Temporary Address Extensions for SLAAC in IPv6
- RFC 4213: Basic Transition Mechanisms for IPv6 Hosts and Routers
- RFC 6146: Stateful NAT64
- RFC 8504: IPv6 Node Requirements
- RFC 3849: IPv6 Address Prefix Reserved for Documentation
- Google IPv6 statistics (live adoption measurement)
- IANA IPv6 Address Space registry
- CompTIA Network+ certification page
- Cisco Learning Network: CCNA 200-301 exam topics
Master IPv6 questions before exam day
30 free questions per session on Network+ and CCNA, practice mode, no signup and no credit card. The full 500-question bank with exam mode is $11.99 lifetime per certification, or $9.99/month Pro unlocks every CertSharp certification.