IT:AD:Infrastructure:Network:Diagnostics:NetStat

NetStat

Use NetStat to find out which services is using which port:

  • netstat -t (show actice TCP sockets)
  • netstat -u (show active UDP sockets)
  • netstat -w (show active RAW sockets)
  • netstat -a (show awaiting sockets as well)
  • ie: netstate -ta (show tcp, awaiting)

Example:

C:\Users\Sky>netstat -t
Active Connections
Proto  Local Address          Foreign Address        State           Offload State
TCP    127.0.0.1:1032         skysigal:2002          ESTABLISHED     InHost
TCP    127.0.0.1:2002         skysigal:1032          ESTABLISHED     InHost
TCP    172.30.7.162:59827     skydev01:ms-wbt-server  ESTABLISHED     InHost
TCP    172.30.7.162:59833     203-97-251-52:http     ESTABLISHED     InHost
TCP    172.30.7.162:59834     203-97-251-52:http     ESTABLISHED     InHost
TCP    172.30.7.162:59836     203-97-251-52:http     ESTABLISHED     InHost
TCP    172.30.7.162:59853     245:http               ESTABLISHED     InHost
TCP    172.30.7.162:59862     tb-in-f125:https       ESTABLISHED     InHost
TCP    172.30.7.162:59888     sjc-not3:http          ESTABLISHED     InHost
TCP    172.30.7.162:59927     syd01s12-in-f5:https   ESTABLISHED     InHost
...

Reference