Monday, August 13, 2012

nping, a ping for more protocols

Nping is really handy when you suspect that ping or traceroute aren't giving you clear results.  I really like it for a TCP Connect to a website:


$ nping --tcp-connect -c 3 --delay 2s www.google.com

Starting Nping 0.6.01 ( http://nmap.org/nping ) at 2012-08-13 12:09 MDT
SENT (0.0067s) Starting TCP Handshake > www.google.com:80 (74.125.225.176:80)
RECV (0.0209s) Handshake with www.google.com:80 (74.125.225.176:80) completed
SENT (2.0086s) Starting TCP Handshake > www.google.com:80 (74.125.225.176:80)
RECV (2.0250s) Handshake with www.google.com:80 (74.125.225.176:80) completed
SENT (4.0113s) Starting TCP Handshake > www.google.com:80 (74.125.225.176:80)
RECV (4.0244s) Handshake with www.google.com:80 (74.125.225.176:80) completed

Max rtt: 16.390ms | Min rtt: 13.108ms | Avg rtt: 14.507ms
TCP connection attempts: 3 | Successful connections: 3 | Failed: 0 (0.00%)
Tx time: 4.00581s | Tx bytes/s: 59.91 | Tx pkts/s: 0.75
Rx time: 4.01892s | Rx bytes/s: 29.86 | Rx pkts/s: 0.75
Nping done: 1 IP address pinged in 4.02 seconds

You can also scan MAC addresses on your local subnet:


 $ sudo nping --arp-type ARP 172.16.16.1-10 --count 1


SENT (4.8530s) ARP who has 172.16.16.1? Tell 172.16.16.11
RCVD (4.8546s) ARP reply 172.16.16.1 is at 1C:DF:DF:53:91:91
SENT (5.8538s) ARP who has 172.16.16.2? Tell 172.16.16.11
RCVD (5.8548s) ARP reply 172.16.16.2 is at 00:26:9F:37:33:33
SENT (6.8556s) ARP who has 172.16.16.3? Tell 172.16.16.11
RCVD (6.9364s) ARP reply 172.16.16.3 is at A4:EF:57:E3:EA:EA
SENT (7.8575s) ARP who has 172.16.16.4? Tell 172.16.16.11
SENT (8.8582s) ARP who has 172.16.16.5? Tell 172.16.16.11
SENT (9.8587s) ARP who has 172.16.16.6? Tell 172.16.16.11
SENT (10.8600s) ARP who has 172.16.16.7? Tell 172.16.16.11
SENT (11.8612s) ARP who has 172.16.16.8? Tell 172.16.16.11
SENT (12.8621s) ARP who has 172.16.16.9? Tell 172.16.16.11
RCVD (12.8656s) ARP reply 172.16.16.9 is at 00:21:CF:BD:1F:1F
SENT (13.8634s) ARP who has 172.16.16.10? Tell 172.16.16.11


Raw packets sent: 10 (420B) | Rcvd: 4 (184B) | Lost: 6 (60.00%)
Tx time: 9.01162s | Tx bytes/s: 46.61 | Tx pkts/s: 1.11
Rx time: 10.01221s | Rx bytes/s: 18.38 | Rx pkts/s: 0.40
Nping done: 10 IP addresses pinged in 14.86 seconds

No comments:

Post a Comment