Windows – Understanding the netstat command output

ipnetstatnetworkingwindows

I used netstat command recently, and the output is below.

netstat  -a    

proto  local address          foreign address       state

tcp    127.0.0.1:1107         avinash-pc:0          listening
tcp    0.0.0.0:134            avinash-pc:0          listening
tcp    226.178.166.149:1104   a60-274-182-61:https  close_wait
udp    0.0.0.0:566            *.*                   
udp    [::]:566               *.*
  1. When I did netstat -n, there was no 0.0.0.0:134 in the output… why?
  2. What is meant by the first and second entries(local and foreign address are both on my computer)
    • i.e. why is my computer connecting to itself?
  3. What is meant by . of 3rd entry and [::] of 4th entry?

Best Answer

from netstat -h:

-a            Displays all connections and listening ports.

As in both current connections and listening ports (half open).

-n            Displays addresses and port numbers in numerical form.

As in, do not resolve addresses to host names.

Your computer can and regularly does connect to itself, usually for IPC or administrative tasks.

*.* = All IPv4 addresses (it's listening, so accept connections from any IPv4)
[::] = All IPv6 addresses (same reason as the last).