# Exercise 2 — Dual-Stack Reasoning

## Scenario

You're debugging a service that's misbehaving only for some users after your company enabled IPv6 on its load balancer. You need to reason clearly about how dual-stack actually works to find the bug.

## Deliverables

1. **DNS resolution walkthrough.** A client looks up `api.example.com` and gets back one `A` record (`203.0.113.10`) and one `AAAA` record (`2606:2800:220:1:248:1893:25c8:1946`). Explain, step by step, what the operating system does with these two records when the application just asks to "connect to api.example.com" — which one does it try, and under what circumstances does it fall back to the other? (If you're not sure of the exact algorithm name, describe the reasonable fallback behavior and state what you're unsure about.)

2. **The actual bug.** After enabling IPv6, some users report intermittent multi-second delays connecting to the API, while others report no issue at all. The affected users are disproportionately on networks with broken or slow IPv6 connectivity (IPv6 route exists but is a dead end). Using what you know about dual-stack from deliverable 1, explain the likely mechanism causing the delay, and propose one concrete mitigation (you may need to reason about it even if the exact algorithm name is a later-topic detail — the point is identifying that trying IPv6 first and waiting for a timeout before falling back to IPv4 is the failure shape).

3. **NAT64 scenario.** A mobile carrier runs an IPv6-only network for its phones (no IPv4 at all on the device) but most of the internet still requires IPv4 to be reached. Explain what NAT64 must be doing conceptually for a phone on that network to load `http://` sites that are IPv4-only, referencing the theory file's description of transition mechanisms.

4. **Design justification.** A colleague suggests "let's just wait until IPv6 adoption hits 100% and rip out all our IPv4 code." Using the theory file's explanation of why dual-stack exists, argue for or against this plan with concrete reasoning (not just "it's risky").

## Notes

- It's fine to explicitly flag which parts of your answer are informed speculation vs. something stated directly in the theory file — the goal is sound reasoning from the mechanisms you do understand.
