What is netstat command used for?

Configurare noua (How To)

Situatie

Netstat stands for “network statistics”.  If you’re having difficulties accessing the internet, the netstat command can help you identify where the problem lies. Netstat will display all of your computer’s active network connections and the status of those connections. If a connection is not working, netstat can often provide more information about why it is not working.

Netstat can also be used to monitor your computer for security threats. By default, netstat does not show listening ports, so you will need to use the -l option to see them. If you discover any unusual or unfamiliar listening ports, it’s possible that someone is attempting to gain access to your system without permission.

USING CMD

Type netstat at the prompt and press Enter. The netstat command will now display a list of all active network connections.

If you want to view all active network connections, just type netstat -a. Many other netstat options allow you to customize its output; type “netstat /?” for a full list at the command prompt.

To stop netstat output, just press the Control + C keys to exit.

  • Proto -The networking protocol and it could be protocols like TCP, UDP etc.
  • Local Address – The local computer’s IP address and the port number being utilized. Unless the -n switch is used, the hostname and port corresponding to the IP address will be displayed. An asterisk (*) indicates that the port has not yet been assigned if one has not yet been set up.
  • Foreign Address – The remote computer’s IP address and port number to which the socket is linked. The names that relate to the IP address and port are displayed unless the -n switch is used. If no port has yet been assigned, an asterisk (*) appears in place of the port number.
  • State – Indicates an active TCP connection’s status,  including:
    • CLOSE_WAIT
    • CLOSED
    • ESTABLISHED
    • FIN_WAIT_1
    • FIN_WAIT_2
    • LAST_ACK
    • LISTEN
    • SYN_RECEIVED
    • SYN_SEND
    • TIMED_WAIT

Solutie

Tip solutie

Permanent
Etichetare:

Voteaza

(5 din 15 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?