When dealing with Network issues one of the linux command that comes handy is 'netstat’
netstat -an or netstat -an | grep “remote ip”
This command shows all the sockets in the system. Each socket has various status.
For example, a socket can be in ‘ESTABLISHED’ status or in ‘LISTENING’
status.
One important status we may come across is ‘SYN_SENT’. When we see a socket in this status, it most probably indicates a Firewall issue, i.e the remote host you are trying to reach is NOT reachable due to a firewall block.
Note that the SYN_SENT status will not remain for long time. It only
lasts for couple of seconds. So, you have to be quick in running the
netstat command (perhaps in another terminal window)
When the client initiates a connection to Server, it first sends a
SYN package. At this point the socket status changes to ‘SYN_SENT’. If
the remote server is reachable and working, the client will receive a
‘SYN + ACK’, for which the client will send a ‘ACK’ and thus forms a TCP
connection.
No comments:
Post a Comment