Linux网络分析工具ping、traceroute、nslookup

tech2022-10-31  126

Ping

ping, ping6 - send ICMP ECHO_REQUEST to network hosts

ping [-LRUbdfnqrvVaAB] [-c count] [-i interval] [-s packetsize] [-t ttl] [hop ...] destination

参数解释

参数解释[ -c count]Stop after sending count ECHO_REQUEST packets.[ -i interval]Wait interval seconds between sending each packet.default:1[ -s packetsize]Specifies the number of data bytes to be sent. default:56 (64 ICMP data bytes=8 bytes of ICMP header data+56)[ -t ttl]Set the IP Time to Live.

Traceroute

traceroute,traceroute6(or traceroute -6)print the route packets trace to network host

traceroute [...] host [packet_len]

参数解释

参数解释-4,-6Explicitly force IPv4 or IPv6 traceouting. If resolving a host name returns both IPv4 and IPv6 addresses, traceroute will use IPv4.-nDo not try to map IP addresses to host names when displaying them.-p portFor UDP tracing, specifies the destination port base traceroute will use (the destination port number will be incremented by each probe).For ICMP tracing, specifies the initial icmp sequence value (incremented by each probe too).For TCP specifies just the (constant) destination port to connect.-TUse TCP SYN for probes-IUse ICMP ECHO for probes-UUse UDP to particular destination port for tracerouting (instead of increasing the port per each probe). default port:53

Example

Nslookup

nslookup - query Internet domain name servers

nslookup [-option] [name | -] [server]

参数解释

-option: -query=hinfo

hinfo解释Aipv4AAAAipv6CNAME别名记录MX邮件服务器记录
最新回复(0)