Detection instructions for Linux network testing

Source: Internet
Author: User
Tags domain name server traceroute command

The ping command is used to test the connectivity of the network between hosts.
Ping (Options)
-D: Using the socket's so_debug function;
Number of-c< completed;: Set the number of times to complete the required response;
-F: limit detection;
-i< interval seconds;: Specifies the time interval between sending and receiving information;
-i< network interface;: Send the packet using the specified network interface;
-l< pre-loading;: Sets the data packets that are sent out before the requested information is sent;
-N: Outputs only values;
-p< template style;: Sets the template style that fills the packet;
-Q: Does not show the instruction execution process, except the relevant information at the beginning and end;
-R: Ignore the normal routing Table and send the packet directly to the remote host;
-R: Record routing process;
-s< packet size;: Sets the size of the packet;
-t< survival value;: Sets the size of the live value TTL;
-V: Shows the execution of the instruction in detail.

The arp command is used to manipulate the host's ARP buffer, which can display all entries in the ARP buffer, delete the specified entry, or add a static IP address corresponding to the MAC address
ARP (option)
-a<: Displays all entries for the ARP buffer ;
-h< address type;: Specifies the type of address used by the ARP directive;
-d<: Removes the ARP entry for the specified host from the ARP buffer;
-D: Use the hardware address of the specified interface;
-E: Displays entries in the ARP buffer in the Linux display style;
-i< interface;: Specifies the network interface to operate the ARP buffer;
-s< Host;: Sets the static mapping of the IP address and MAC address of the specified host;
-N: Displays the entries in the ARP buffer numerically;
-V: Displays detailed ARP buffer entries, including statistics for buffer entries;
-f< file: Sets the static mapping of the host's IP address to the MAC address.

The Tracepath command is used to track and display the routing information that the message has reached the destination host.

The traceroute command is used to track the full path of a packet when it is transmitted over the network, and it sends a packet size of 40 bytes by default
Traceroute measures how long it takes to send a small packet to the destination device until it returns. Each device on a path is measured 3 times traceroute. The output includes the time of each test (MS) and the name of the device (if any) and its IP address。
Traceroute (option)
-D: Using the socket-level troubleshooting function;
-f< survival value;: Sets the size of the live value TTL for the first detection packet;
-F: Set the do not off-off bit;
-g< Gateway: Set the source routing gateway, can set up to 8;
-i< network interface;: Send the packet using the specified network interface;
-I: Use ICMP response instead of UDP information;
-m< survival value;: Sets the maximum surviving value TTL size of the detection packet;
-N: Use IP address directly instead of host name;
-p< communication port;: Set the communication port of the UDP transport protocol;
-R: Ignores the normal routing Table and sends the packet directly to the remote host.
-s< Source Address: Set the IP address of the local host to send the packet;
-t< service type;: Set the value of the TOS for the inspection packet;
-V: Shows the execution process of the instruction in detail;
-w< timeout number of seconds;: Set the time to wait for the remote host to return;
-X: Turns the correctness of the packet on or off.

The netstat command is used to print the status information of network systems in Linux, allowing you to know the network conditions of the entire Linux system.
Netstat (option)
-A or--all: Displays all sockets in the connection;
-a< network type > or--< network type;: Lists the relevant addresses in the network type connection;
-C or--continuous: Continuous listing of network status;
-C or--cache: shows the cache information of the router configuration;
-E or--extend: Displays other relevant information about the network;
-F or--fib: show fib;
-G or--groups: Displays the multi-broadcast Function group member list;
-H or--help: online help;
-I or--interfaces: Displays the Web interface information form;
-L or--listening: Displays the socket of the server in the monitor;
-M or--masquerade: Displays the spoofed network connection;
-N or--numeric: Use the IP address directly, not through the domain name server;
-N or--netlink or--symbolic: Displays the symbolic connection name of the network hardware peripheral device;
-O or--timers: Display timer;
-P or--programs: shows the program identification code and program name of the socket being used;
- R or--route: Show routing Table;
-S or--statistice: Display the network work information statistics;
-T or--tcp: shows the connection status of the TCP transport protocol;
-U or--UDP: Displays the connection status of the UDP transport protocol;
-V or--verbose: Displays the instruction execution process;
-V or--version: Displays version information;
-W or--raw: Displays the connection status of the raw transport protocol;
-X or--unix: The effect of this parameter is the same as specifying the "-A unix" parameter;
--ip or--inet: The effect of this parameter is the same as specifying the "-A inet" parameter

List all ports (both listening and not listening)
netstat-a #列出所有端口
Netstat-at #列出所有tcp端口
Netstat-au #列出所有udp端口

The Nmap command is an open source network detection and security Audit tool designed to quickly scan large networks
Nmap (optional)
- o: Activate operation detection;
-P0: The value is scanned, does not ping the host;
-PT: Is the ping with TCP;
-SV: Probe service version information;
-sp:ping Scan, only the target host is found to survive;
-ps: Send Synchronous (SYN) messages;
-PU: Send UDP ping;
-pe: Enforcement of direct icmpping;
-PB: Default mode, you can use icmpping and tcpping;
-6: Use IPV6 address;
-V: Get more options information;
-D: Add debug information to the output;
-on: Output in a format that people can read;
-ox: Output information to the specified file in XML format;
-om: Output in a machine-readable format;
-A: Use all advanced scanning options;
--resume: Continue the last scan performed;
-P: Specifies the port to be scanned, which can be a separate port, separated by commas, using "-" to denote the port range;
-e: In a multi-network interface Linux system, specify the network interface used by the scan;
-G: The specified port is scanned as the source port;
--ttl: Specifies the lifetime of the scanned message sent;
--packet-trace: Shows the statistics of sending and receiving messages during the scanning process;
--scanflags: The TCP flag that is set in the scan message.

Detection instructions for Linux network testing

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.