Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
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
add comment

localhost:6666

This is the IPv4 loopback address 127.0.0.1

[::]:6666

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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