Home > OS >  Ipv4 and ipv6 how to bind to a port on the same
Ipv4 and ipv6 how to bind to a port on the same

Time:11-13

Due to business needs, I need to be on the same host build ipv4 and ipv6 SCTP to monitor the server at the same time;
Ipv4 is 0.0.0.0 binding, port 38224, ipv6 binding is: :, port is 38224;
But the latter fail when binding, the error address already in 2;
But when I put the ipv6 port in one, he is binding a success;
To ask you, how can I get to ipv4 and ipv6 binding on the same port;

CodePudding user response:

Listen to 38224
Listen [: :] : 38224

CodePudding user response:

Ipv6 listener will cover ipv4 listen, that is, ipv6 listener's ability to deal with ipv4 package, unless specified ipv6only kernel parameters
  • Related