Dual Stack Host - Host that runs both IPv4 stack and IPv6 stack.
IPv4 Client, IPv6 Server
IPv6 servers can handle both IPv4 and IPv6 clients. This is done using IPv4 mapped IPv6 addresses.
IPv6 server on dual stack host serving IPv4 and IPv6 clients
Server is written on IPv6 and is running on dual stack host. Server has created an IPv6 listening TCP socket that is bound to IPv6 wildcard address and TCP port 9999. Assume the clients and server are on same Ethernet. They could also be connected by routers.
Steps that allow IPv4 TCP client to communicate with IPv6 server
- IPv6 server starts, creates IPv6 listening socket, and we assume it binds the wildcard address to socket.
- IPv4 client calls gethostbyname and finds an A record for server. Server host will have both A record and AAAA record since it supports both protocols.
- Client calls connect and client's host sends IPv4 SYN segment to server.
- Server host receives IPv4 SYN directed to IPv6 listening socket, sets a flag indicating that this connection is using IPv4 mapped IPv6 addresses, and responds with IPv4 SYN and ACK. Address returned to server by accept after establishing connection is the IPv4 mapped IPv6 address.
Friday, 23 September 2016