2.1 Dual Stack

The IPv6 dual stack mode assumes the following:

The following diagram shows the dual stack approach.

Figure 2-1 Dual Stack

Dual stack hosts can handle both IPv4 and IPv6 clients by using IPv4‑mapped IPv6 addresses. For example, the following process shows how an IPv4 TCP client communicates with an IPv6 server:

  1. The IPv6 server starts and creates an IPv6 listening socket.

  2. The IPv4 client calls gethostbyname and finds a record for the server.

  3. The client calls connect and the client’s host sends IPv4 SYN to the server.

  4. The server host receives the IPv4 SYN directed to the IPv6 listening socket. The server sets a flag indicating that this connection is using IPv4-mapped IPv6 addresses and responds with an IPv4 SYN/ACK.

  5. All communication between the client and server takes place using IPv4 datagrams.

  6. Unless the server explicitly checks whether this IPv6 address is an IPv4-mapped IPv6 address, the server never knows that it is communicating with an IPv4 client.