Network Programming learning in linux-network debugging tools

Source: Internet
Author: User
Network Programming learning in linux-network debugging tool-general Linux technology-Linux programming and kernel information. For details, refer to the following section. Before starting network learning, it is necessary to know how to use some common network tools.


1, ifconfig
The ifconfig command is used to configure network device interfaces in Linux. You can also use ifconfig to view the network device interfaces that have been configured.

For example:
# Ifconfig eth0
The hardware address of the first ENI and the IP address of the network interface are displayed.

2, netstat
The netstat command displays network information such as network connections, route tables, and interface statistics. It has many Command Options.
If no option is available, the connection status of the country is displayed, listing the opened sockets.
-Option a shows the status of all sockets.
The-r option displays the content of the route table. Generally, the-n option is specified at the same time to obtain the address in digital format and the IP address of the default route.
-I: displays information of all network interfaces or specified interfaces.
For example:
# Netstat-ni

3. ping

Run ping to check the network availability of the remote machine. Run ping to send an icmp message to the remote machine.

For example:
# Ping 219.246.177.174

4. telnet
The telnet command is a standard internet program used for remote logon. However, this program can also be used as a common client to test the server program.
For example. We can use telnet to connect port 21 of xxxy.lzu.edu.cn

# Telnet xxxy.lzu.edu.cn 21

5. tcpdump
The tcpdump command is an excellent tool for debugging network programs. rethat6.0 provides this program, but other versions may not
You need to go to ftp://ftp.ee.lbl.gov/to obtain
This program directly reads data packets (packet) at the data link layer and outputs the information of data packets with specified conditions.
For example
# Tcp dump 'tcp and port 80 adn tcp [13:1] & 2! = 0'

6. Other common tools

Such as ftp, lftp, and ssh
Related Article

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.