61

When I run netstat there are some entries such as TCP [::]:8010 computername LISTENING

What does that mean? It is impossible to search for...

3
  • 1
    My knowledge is not up to giving a proper answer, but I do recognise it as IPv6.
    – Hennes
    Nov 1, 2012 at 21:23
  • 5
    Oh so I guess it is the equivalent of 0.0.0.0 in IPv6?
    – carpat
    Nov 1, 2012 at 21:24
  • 1
    Yep, that's the gist of it.
    – MDMarra
    Nov 1, 2012 at 21:32

3 Answers 3

75

:: can be used once in an IPv6 address to replace a consecutive blocks of zeroes. It can be any length of zeroes as long as it is greater than a single block. All zeroes in a single block can be represented by :0: instead of writing out all four zeroes.

In this case, it means all zeroes, or the IPv6 equivalent of the IPv4 0.0.0.0


As an example of something that is not all zeroes:

fe80:0000:0000:0000:34cb:9850:4868:9d2c

Which is properly "reduced" to:

fe80::34cb:9850:4868:9d2c

As an example, it can also be written as:

fe80:0:0:0:34cb:9850:4868:9d2c

but that is far less common than just "double coloning" it.

5
  • 1
    Can you give an example of a v6 address that isn't all zeros
    – Greg B
    Nov 2, 2012 at 19:43
  • 2
  • 1
    You didn't expand the actual IP address OP asked for, mention that the "all zeros" IP address is the "unspecified address" for when IP is unknown, nor explain the square brackets delimit the IP address from the port number. Please update your answer.
    – ziggurism
    Nov 20, 2015 at 15:12
  • 1
    Non-zero blocks can be abbreviated as well by removing the leading zeros for that block. For example: 0000:00ff:0099:0101:0000:0200:0000:0000 can be abbreviated as 0:ff:99:101:0:200:: Nov 16, 2018 at 19:54
  • docs.oracle.com/cd/E19253-01/816-4554/ipv6-overview-24/… writes "You can use the two colon notation to replace any contiguous fields of all zeros in the IPv6 address.", and the last example replaces only a single block. Does that contradict what you say in "... as long as it is greater than a single block"?
    – bers
    Apr 11, 2021 at 6:28
27

:: is the IPv6 "unspecified" address, equivalent to 0.0.0.0 - the [] is notation to separate the address from the port specifier.

A program bound to :: will be given traffic for any actual IPv6 address assigned to the system - it may also receive IPv4 traffic too in the form of IPv6-mapped IPv4 addresses (::ffff:x.x.x.x) although this is dependent on the socket options set by the application.

1
0

This issue and diagram is helpful for understanding the "big picture":

https://github.com/nodejs/node/issues/9390#issuecomment-278001837

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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