QUIC Connection Migration: Wi-Fi to Cellular Explained

When a mobile device transitions from Wi-Fi to a cellular network, traditional connections break because the device’s IP address changes, requiring an entirely new connection setup. QUIC solves this disruption through connection migration. By using unique Connection Identifiers (CIDs) rather than relying on the traditional network 4-tuple (source IP, source port, destination IP, destination port), QUIC allows ongoing data streams to seamlessly transition across networks over UDP without dropping connections, restarting handshakes, or interrupting the user experience.

The Limitation of Traditional TCP

Traditional protocols like TCP bind a connection to a specific 4-tuple. When a mobile user walks out of Wi-Fi range and switches to cellular data, the device receives a new IP address. Because the IP address changes, the original 4-tuple is invalidated, forcing the operating system to terminate the socket. The application must then initiate a new TCP three-way handshake and re-negotiate TLS encryption, causing noticeable latency, buffering, or failed requests.

The Core Mechanism: Connection IDs (CIDs)

QUIC operates at the transport layer over UDP and decouples connection identity from network-layer routing information. Instead of identifying a connection by its IP and port:

Step-by-Step Migration Process

When a client switches from Wi-Fi to cellular, the migration occurs through the following structured process:

  1. Interface Detection: The client operating system detects that Wi-Fi connectivity is lost or that cellular connectivity is now preferred, assigning a new local IP address.
  2. Probing and Path Validation: Before fully routing traffic over the new network, the client must validate the path to prevent address spoofing and traffic amplification attacks. The client sends a packet containing a PATH_CHALLENGE frame from its new cellular IP to the server.
  3. Validation Response: The server receives the challenge and immediately replies with a PATH_RESPONSE frame back to the new cellular IP. This confirms that the party at the new IP address is legitimate and reachable.
  4. Traffic Migration: Once path validation succeeds, both the client and server route regular data packets over the new network path. In non-blocking scenarios, QUIC can begin sending data immediately while validation occurs concurrently, switching back if validation fails.
  5. Congestion Controller Reset: Because cellular and Wi-Fi networks have vastly different latency and bandwidth characteristics, QUIC resets its congestion control state for the new path, quickly adapting to the new network’s throughput without stalling the connection.

Privacy Protection via CID Rotation

If a client maintained the exact same Connection ID across both Wi-Fi and cellular networks, third-party network observers could easily track the user across different locations and networks.

To eliminate this privacy risk, QUIC utilizes CID rotation: * The server supplies a pool of unused, cryptographically random Connection IDs to the client during the session. * When the client migrates to the cellular network, it discards the old CID and switches to a fresh, unlinked CID from the pre-negotiated pool. * Observers on the new network cannot correlate the new CID with the previous session on the Wi-Fi network, preserving user privacy.