Question

This is a noob question, but networking isn't my forte. For example if I have an ipv4 server and an ipv6 client connects, what would their ip show as? Also if I wanted to setup a socket connection for example, does my server have to be ipv6 too, or does the code just need to be able to handle it.

I have researched how code handling works, but nothing says if the server has to be ipv6, itself.

Was it helpful?

Solution

IPv4 and IPv6 are not directly compatible. In most installations, a client will have both an IPv4 and an IPv6 address, and will use whichever one is appropriate to connect to a server. That is, they will use their IPv4 address to connect to an IPv4 server, IPv6 to connect to an IPv6 server, and will preferentially choose one of the two — usually IPv6 — if a server supports both.

IPv4-only clients cannot connect to IPv6 servers. Unless you intend to provide a service to IPv6 users only, you will need to provide your service on IPv4, or on both protocols, to support IPv4 clients.

OTHER TIPS

IPv4 and IPv6 are separate incompatible protocols. An IPv6 client cannot connect directly to a server running only IPv4.

A connection is possible if an intervening router or switch maps from the IPv6 protocol to IPv4, or if the server runs both protocols. However, the IPv6 client is still maintaining an IPv6 connection and is unaware of any IPv4 connection.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top