63

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

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

chutz
  • 7,569
  • 1
  • 28
  • 57
carpat
  • 995
  • 2
  • 7
  • 14

3 Answers3

77

:: 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.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • 1
    Can you give an example of a v6 address that isn't all zeros – Greg B Nov 02 '12 at 19:43
  • 2
    http://en.wikipedia.org/wiki/Ipv6#Address_format – Dave Costa Nov 06 '12 at 02:08
  • 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 '15 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:: – Alex Jansen Nov 16 '18 at 19:54
  • https://docs.oracle.com/cd/E19253-01/816-4554/ipv6-overview-24/index.html 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 '21 at 06: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.

Olipro
  • 2,967
  • 18
  • 18
0

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

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

Rick
  • 229
  • 1
  • 4
  • 14