How to interpret NETSTAT command?

durga ch

durga ch

@durga-TpX3gO Oct 26, 2024
How do we actually interpret netstat command.

For eg:consider the below result for a port 'abc' on the server xxx.


netstat -a | grep abc
tcp 0 0 xxx.abc yyy.1 ESTABLISHED
tcp 0 0 xxx.abc yyy.2 ESTABLISHED
tcp 0 0 *.abc *.* LISTEN
tcp 0 0 xxx.abc yyy.3 CLOSE_WAIT


Ah! I understand its a tcp connection and abc are listening ports trying to listen to the 'established' connection from the ports 1,2,3 from a client machine yyy.
Outgoing packets and incoming packets are 0 currently and since a TCP connection from yyy.3 can be 'closed' to abc port of xxx only after yyy receives a ack from xxx.

I feel I am missing upon other stuff here, any other deductions?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Anil Jain

    Anil Jain

    @CrazyBoy Oct 5, 2009

    Ah !! nice topic, I always loved to discuss about commands.

    netstat (network statistics) is a command-line tool that displays network connections (both incoming and outgoing), routing tables, and a number of network interface statistics. It is available on Unix, Unix-like, and Windows NT-based operating systems.

    It will take lots of space to explain the command with each attribute. For in depth knowledge of NETSTAT you can refer the following sites:

    For Windows: #-Link-Snipped-# (Netstat command)

    For Linux: #-Link-Snipped-#
  • madhumurundi

    madhumurundi

    @madhumurundi-DfePI4 Oct 12, 2009

    to know about more on netstat type netstat -? in command prompt you will get an help mesage