Connecting IPv4 client to IPv6 server: connection refused

前端 未结 2 1216
余生分开走
余生分开走 2020-12-19 10:12

I am experimenting with IPv6 sockets, particularly the \"dual stack\" capability offered on Windows Vista and later, and apparently on Unix by default. I am finding that wh

2条回答
  •  误落风尘
    2020-12-19 10:47

    This link http://www.masterraghu.com/subjects/np/introduction/unix_network_programming_v1.3/ch12lev1sec2.html gives more information about the IPv4 and IPv6 connection,

    Most dual-stack hosts should use the following rules in dealing with listening sockets:

    • A listening IPv4 socket can accept incoming connections from only IPv4 clients.
    • If a server has a listening IPv6 socket that has bound the wildcard address and the IPV6_V6ONLY socket option (Section 7.8) is not set, that socket can accept incoming connections from either IPv4 clients or IPv6 clients. For a connection from an IPv4 client, the server's local address for the connection will be the corresponding IPv4-mapped IPv6 address.
    • If a server has a listening IPv6 socket that has bound an IPv6 address other than an IPv4-mapped IPv6 address, or has bound the wildcard address but has set the IPv6_V6ONLY socket option (Section 7.8), that socket can accept incoming connections from IPv6 clients only.

提交回复
热议问题