nping 命令使用

server 端:

nping --es --nc --ep 12345 -e eth0

Client 端(默认是icmp):

nping --ec --nc 172.24.245.175 --tcp -ep 12345
nping --ec --nc 172.24.245.175 --udp -ep 12345
[root@dev jenkins_script]# nping --help
Nping 0.7.70 ( https://nmap.org/nping )
Usage: nping [Probe mode] [Options] {target specification}

TARGET SPECIFICATION:
  Targets may be specified as hostnames, IP addresses, networks, etc.
  Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.*.1-24
PROBE MODES:
  --tcp-connect                    : Unprivileged TCP connect probe mode.
  --tcp                            : TCP probe mode.
  --udp                            : UDP probe mode.
  --icmp                           : ICMP probe mode.
  --arp                            : ARP/RARP probe mode.
  --tr, --traceroute               : Traceroute mode (can only be used with 
                                     TCP/UDP/ICMP modes).
TCP CONNECT MODE:
   -p, --dest-port      : Set destination port(s).
   -g, --source-port   : Try to use a custom source port.
TCP PROBE MODE:
   -g, --source-port   : Set source port.
   -p, --dest-port      : Set destination port(s).
   --seq                : Set sequence number.
   --flags              : Set TCP flags (ACK,PSH,RST,SYN,FIN...)
   --ack                : Set ACK number.
   --win                     : Set window size.
   --badsum                        : Use a random invalid checksum. 
UDP PROBE MODE:
   -g, --source-port   : Set source port.
   -p, --dest-port      : Set destination port(s).
   --badsum                        : Use a random invalid checksum. 
ICMP PROBE MODE:
  --icmp-type                : ICMP type.
  --icmp-code                : ICMP code.
  --icmp-id                    : Set identifier.
  --icmp-seq                    : Set sequence number.
  --icmp-redirect-addr       : Set redirect address.
  --icmp-param-pointer        : Set parameter problem pointer.
  --icmp-advert-lifetime 

你可能感兴趣的:(nping 命令使用)