Linux Network Management related tools
Linux itself provides many tools for network testing, network troubleshooting, and network state analysis. Let's take a look at some of the more commonly used tools.
1. Ping command
The ping command also tests network connectivity using the ICMP protocol.
Command format: ping [option] IP
Common options:
-c #: specify the number of messages
-W timeout: the timeout for waiting for a response message.
II. Traceroute command
The traceroute command is used to trace the routing nodes that pass through the destination.
Command format: traceroute HOST | IP
3. Mtr command
The function of the mtr command is similar to that of the traceroute command, but displays node information dynamically.
Command format: mtr HOST | IP
4. Netstat command
Used to display the network connection status.
Command format: netstat [options]
Common options:
-t:TCP protocol
-u:UDP protocol
-n: displays the address in numeric format
-l:listen, showing connections in the monitored state
-tan:TCP all statu
-p: displays the process program name and process number in the session
-r: displays the routing table
Common combination options:-tunpl
5. Ethtool command
Used to display attribute information for network devices.
Command format: ethtool [options] device name
-S: displays statistics for network interfaces
VI. Ss command
The ss command works the same as the netstat command, but the ss command can also specify the connection status as a filter condition.
Command format: ss [options]
Common options:
-t:tcp
-n:udp
-p:process
-l:listening
-a:all
-e: extended information
-m: socket-related memory usage information
-o state {established,listening,fin_wait_1,fin_wait_2}'(dport= or sport=) 'shows only connections in a specified state, and filter criteria can also be specified