Use the hping2 command to send and analyze TCP, UDP, ICMP, and RAW-IP packets to a specified host.hping2 <hping2 options> <destination>
Specifies the type of hping2. Select one of the following options:
• -h --help Show this help.
• -v --version Show version.
• -c --count Packet count.
• -i --interval wait (uX for X microseconds, for example -i u1000).
--fast Alias for -i u10000 (10 packets for second).
• -n --numeric Numeric output.
• -q --quiet Quiet.
• -I --interface Interface name
(otherwise default routing interface).
• -V --verbose Verbose mode.
• -D --debug Debugging info.
•
•
• -0 --rawip RAW IP mode.
• -1 --icmp ICMP mode.
• -2 --udp UDP mode.
•
• -9 --listen Listen mode.
• -a --spoof Spoof source address.
--rand-dest Random destionation address mode. see the man.
--rand-source Random source address mode. see the man.
• -t --ttl ttl (default 64).
• -N --id id (default random).
• -W --winid Use win* id byte ordering.
• -r --rel Relativize id field (to estimate host traffic).
• -f --frag Split packets in more frag. (may pass weak acl).
• -x --morefrag Set more fragments flag.
• -y --dontfrag Set don’t fragment flag.
• -g --fragoff Set the fragment offset.
•
• -o --tos Type of service (default 0x00), try --tos help
• -G --rroute Includes RECORD_ROUTE option and
displaysthe route buffer.
--lsrr Loose source routing and record route.
--ssrr Strict source routing and record route.
• -H --ipproto Set the IP protocol field, only in RAW IP mode.
• -C --icmptype icmp type (default echo request).
• -K --icmpcode icmp code (default 0).
--force-icmp Send all ICMP types (default send only
supported types).
--icmp-gw Set gateway address for ICMP redirect
(default 0.0.0.0).
--icmp-ts Alias for --icmp --icmptype 13
(ICMP timestamp).
--icmp-addr Alias for --icmp --icmptype 17 (ICMP address
subnet mask).
--icmp-help Display help for others icmp options.
• -s --baseport Base source port (default random).
•
• -k --keep Keep still source port.
• -w --win winsize (default 64).
• -O --tcpoff Set fake tcp data offset (instead of tcphdrlen / 4).
• -Q --seqnum Shows only TCP sequence number.
• -b --badcksum (Try to) send packets with a bad IP checksum
many systems will fix the IP checksum sending
the packet so you'll get bad UDP/TCP checksum
instead.
• -M --setseq Set TCP sequence number.
• -L --setack Set TCP ack.
• -F --fin Set FIN flag.
• -S --syn Set SYN flag.
• -R --rst Set RST flag.
• -P --push Set PUSH flag.
• -A --ack Set ACK flag.
• -U --urg Set URG flag.
• -X --xmas Set X unused flag (0x40).
• -Y --ymas Set Y unused flag (0x80).
--tcpexitcode Use last tcp->th_flags as exit code.
--tcp-timestamp Enable the TCP timestamp option to guess the
HZ/uptime.
• -d --data data size (default is 0)
• -E --file data from file
• -e --sign add 'signature'
• -j --dump dump packets in hex
• -J --print dump printable characters
• -B --safe enable 'safe' protocol
• -u --end tell you when --file reached EOF and prevent
rewind
• -T --traceroute traceroute mode (implies --bind and --ttl 1)
--tr-stop Exit when receive the first not ICMP in traceroute
mode
--tr-keep-ttl Keep the source TTL fixed, useful to monitor just
one hop
--tr-no-rtt Don't calculate/show RTT information in
traceroute mode The default mode is TCP.
n
n
n hping2 is a command-line oriented TCP/IP packet assembler/analyzer.
Please send comments or suggestions regarding user documentation to techpubs@silver-peak.com. |