Using ubuntu 11.04, I run netstat -nplt the results for local address may be

localhost:6666

or

[::]:6666

What is the difference?

I believe that the [::]: binds the service at port xxxx to all interfaces, (lo, eth0, eth1 ) and localhost: only binds it to loopback interface (lo). I think I am missing something. How can I toggle between the two states?

up vote 1 down vote accepted

[::] is an ipv6 notation and it's the same as 0000:0000:0000:0000:0000:0000:0000:0000 , and it means any ip address.

  • does this server the same function as 0.0.0.0 in ipv4? Bind to all interfaces? – Dave Feb 14 '13 at 8:34
  • Does it bind to ip addresses or interfaces – Dave Feb 14 '13 at 8:36
  • Yes, it's bind to all ip address, so all interfaces – 0wn3r Feb 14 '13 at 8:38
  • Found a good explanation here: serverfault.com/questions/78048/… – Dave Feb 14 '13 at 8:41

localhost:6666

This is the IPv4 loopback address 127.0.0.1

[::]:6666

This means port 6666 on all IP addresses (v4 and v6).

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.