Netstat command use method

Source: Internet
Author: User
Tags valid

  Netstat is used to display statistics related to IP, TCP, UDP, and ICMP protocols, and is typically used to verify network connectivity across local ports.

If our computers sometimes receive datagrams that cause error data deletion or failure, we do not need to be surprised that TCP/IP can allow these types of errors and can automatically send datagrams again. But if the cumulative number of error cases accounts for a significant percentage of the IP datagram received, or if its number is increasing rapidly, then we should use Netstat to find out why this is happening.

  1, netstat of some common options

Netstat–s

This option displays its statistics separately according to each protocol. If our application, such as a Web browser, runs slowly or cannot display data such as a Web page, then we can use this option to view the information displayed. We need to look closely at the lines of the statistics, find the keywords that are wrong, and then identify the problem.

netstat–e

This option is used to display statistics about Ethernet. The items listed include the total number of bytes, errors, deletes, number of datagrams, and number of broadcasts for the transmitted datagram. These statistics include both the number of datagrams sent and the number of datagrams received. This option can be used to count some basic network traffic.

Netstat–r

This option displays information about the routing table, similar to the information you see later when you use the route Print command. In addition to displaying a valid route, the currently active connection is displayed.

Netstat–a

This option displays a list of all valid connection information, including established connections (established), and those connections that listen for connection requests (listening).

Netstat–n

Displays all valid connections that have been established.

  2, the magical uses of netstat

People who often surf the internet use ICQ, do not know whether we have been harassed by some annoying people, want to complain but do not know from and do? In fact, we just know each other's IP, we can to his ISP complained. But how can you know each other's IP through ICQ? If the other side in the set ICQ chose not to display IP address, then we can not see in the Information Bar. In fact, we only need to pass Netstat can be very convenient to do this: when he through ICQ or other tools to connect with us (for example, we send him an ICQ message or he sent us a message), we immediately enter the DOS command prompt netstat-n or netstat- A can see the other side of the Internet using the IP or ISP domain name, and even the use of port is completely exposed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.