-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why listening "::" (all IPv6) also get "0.0.0.0"(all IPv4) listened? #9390
Comments
It's called dual-stack mode and it's platform-specific. Linux lets you enable/disable it through the net.ipv6.bindv6only sysctl, I assume Windows has something similar. I'll add doc tags because it doesn't look like the documentation currently mentions this. Libuv has UV_TCP_IPV6ONLY and UV_UDP_IPV6ONLY flags that we could leverage along the lines of |
Thank you. You saved my time. |
This dual stack mode is certainly confusing, as most people would expect The user has no way of knowing if the platform supports dual-stack, so if one wants to listen on v4 and v6, you'd have to try listening on both I'd argue that |
Two things to note about this bug:
|
Hi, i forgot to tell everyone that this phenomenon As my test, On Mac (OS X EI Captitan 10.11.6), the
On Linux Ubuntu 16.04, the
After all, this is very OS-dependent. |
Someone help me please! It seems only for
Now the new problem is I can not confirm the last case in Linux, i'v tried on Amazon VPC, VirtualBox VM. Both show error, even i use
Show
##Would anyone to test as following steps (use Node.js 7.0.0**+**) on a Linux OS ? ( must NOT inside a VM or VPC)
It's expected only step2 has error of ECONNREFUSED. |
How do I calculate |
@sam-github thank you for the test. I just run |
Not sure this is what you want, or if my machine has enough support for IPv6, but here it is:
|
@sam-github thank you. This is what i want! This is a proof of that "On linux, without special configuration, listening actual IPv6 address will not cause equivalent IPv4 address also being listened" So, what is your linux distribution? ( |
ubuntu 16.10, kernel 4.8.0-34-generic |
I think it likely proves just "on this linux distro, with default configuration...", I could probably config ipv4 to redirect to ipv6 |
Yes, with default configuration, this is exactly what i want to prove. Thank you. So, all typical test are done.
All test is done under default configuration about IPv6. So my conclusion is that we should only mention about the amazing effect of listening |
Fixes: nodejs#9390 PR-URL: nodejs#11134 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
I found a strange problem, i created a simple TCP server to listen at port 5555 of "::"(all IPv6 interfaces)
Then i found all IPv4 interfaces are also listening port 5555.
Another relevant problem is, if i do not specify host, or use
undefined
, or empty string,It should listen :: OR 0.0.0.0, not both, according the document:
But the fact is both :: and 0.0.0.0 get listened.
I don't know which is correct? document or implementation? Anyway, this is a bit confusing.
Or maybe this is just a trick implementation of the Windows OS itself ?
The text was updated successfully, but these errors were encountered: