Lesson 11 of 11 Advanced Networking

Adopting IPv6 with Dual-Stack and IPv6-Only Networks

This lesson explains dual-stack VPCs, egress-only internet gateways, IPv6-only subnets with DNS64 and NAT64, and a low-risk strategy for adopting IPv6.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain how IPv6 routing and security rules differ from IPv4 in a VPC.
  • Describe how IPv6-only workloads reach IPv4-only services.
  • Plan a staged migration from IPv4 to dual-stack networking.

Dual-stack VPCs

In a dual-stack VPC, the VPC has an IPv4 CIDR and an IPv6 /56 block (Amazon-provided, from an IPAM pool or bring your own), and each subnet gets an IPv6 /64. Resources receive both address types. IPv6 addresses are globally unique, so there is no NAT for IPv6: public subnets route ::/0 to the internet gateway, and private subnets that need outbound-only access route it to an egress-only internet gateway, which allows outbound connections and their replies but blocks connections from the internet.

Security groups and network ACLs have separate IPv4 and IPv6 rules, so a rule for 0.0.0.0/0 does not cover ::/0; forgetting the IPv6 rules is the most common reason that dual-stack resources are unreachable over IPv6. ALB, NLB, CloudFront, API Gateway and many service endpoints offer dual-stack options.

IPv6-only subnets and reaching IPv4

New workloads can run in IPv6-only subnets, which suits large EKS clusters in IPv6 mode where pods receive addresses from the /64 range and IPv4 exhaustion disappears. IPv6-only resources still need to reach IPv4-only services. DNS64 on the Route 53 Resolver synthesises IPv6 addresses in the 64:ff9b::/96 prefix for names that have only IPv4 records, and a route for that prefix to a NAT gateway performs NAT64, translating the traffic to IPv4.

NeedMechanism
IPv6 instances need outbound internet onlyEgress-only internet gateway
IPv6-only workloads call IPv4-only servicesDNS64 plus NAT64 on a NAT gateway
Clients reach an application over IPv4 or IPv6Dual-stack load balancers and CloudFront
Pod IP exhaustion in EKSIPv6 EKS cluster

The following diagram shows the two steps that let an IPv6-only workload reach an IPv4-only service.

How an IPv6-only workload reaches an IPv4-only service. The Route 53 Resolver's DNS64 answers a lookup for a name with only an IPv4 address, 192.0.2.1, with a synthesised IPv6 address in the 64:ff9b::/96 prefix. The subnet's route for that prefix sends the traffic to a NAT gateway, which translates it to IPv4 (NAT64).
192.0.2.1 is a documentation address. Its IPv6 form, 64:ff9b::c000:201, embeds the IPv4 address in the last 32 bits, which is what the NAT gateway translates back.
Match the pairs

IPv6 building blocks

Exam skills 1.4.4

Match each IPv6 requirement with the feature that meets it.

Log in to try this activity Interactive activities are free with an account.

A migration strategy

  1. Start at the edge

    Enable dual-stack on internet-facing load balancers and CloudFront, and publish AAAA records.

  2. Add IPv6 to VPCs

    Assign IPv6 blocks from IPAM to VPCs and subnets, and add IPv6 routes.

  3. Update controls

    Add IPv6 rules to security groups, network ACLs, firewalls and monitoring.

  4. Move workloads

    Place suitable new workloads in IPv6-only subnets with DNS64 and NAT64.

Worked example

Cutting public IPv4 costs

A company pays for thousands of public IPv4 addresses, and its EKS clusters keep running out of private IPv4 addresses.

The network team enables dual-stack on internet-facing ALBs and CloudFront first, so IPv6 clients connect over IPv6 without breaking IPv4 clients, and assigns IPv6 blocks from IPAM to every VPC.

New EKS clusters are created in IPv6 mode in IPv6-only subnets with DNS64 and NAT64 for the few IPv4-only dependencies, and instances that only need outbound access lose their public IPv4 addresses and use an egress-only internet gateway for IPv6.

Check yourself

Why is there no NAT gateway for outbound IPv6 traffic from private subnets?

Show answer

IPv6 addresses are globally unique, so translation is not needed. An egress-only internet gateway allows outbound connections while blocking connections from the internet.

Exam Tips

Remember for the exam

  • Outbound-only internet for IPv6: egress-only internet gateway (no NAT for IPv6).
  • IPv6-only workloads must reach IPv4 services: DNS64 with NAT64 on a NAT gateway.
  • IPv6 traffic blocked after enabling dual-stack: add ::/0 rules to security groups and network ACLs.
  • Lowest-risk start: dual-stack load balancers and CloudFront at the edge.