From wikistone
(→use) |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | ==tcpdump== | ||
| + | tcpdump -vv -x -X -s 1500 -i eth1 'port 25' | ||
| + | |||
==arping== | ==arping== | ||
Use arping to get L2 and L3 responses.<br> | Use arping to get L2 and L3 responses.<br> | ||
| Line 4: | Line 7: | ||
Some files here: http://www.habets.pp.se/synscan/files/ .<br> | Some files here: http://www.habets.pp.se/synscan/files/ .<br> | ||
| − | ==use== | + | ===use=== |
Make sure to pick an interface with an IP. Interface is required, but IP is not. If no IP, it will use 0.0.0.0 unless otherwise specified.<br> | Make sure to pick an interface with an IP. Interface is required, but IP is not. If no IP, it will use 0.0.0.0 unless otherwise specified.<br> | ||
| Line 25: | Line 28: | ||
</pre> | </pre> | ||
| − | ==man page== | + | ===man page=== |
<pre> | <pre> | ||
arping(8) | arping(8) | ||
| Line 43: | Line 46: | ||
-b Send only MAC level broadcasts. Normally arping starts from sending broadcast, and switch to unicast after reply received. | -b Send only MAC level broadcasts. Normally arping starts from sending broadcast, and switch to unicast after reply received. | ||
| − | Stop after sending count ARP REQUEST | + | -c count |
| + | Stop after sending count ARP REQUEST | ||
packets. With deadline [arping(8)] option, arping waits for count ARP REPLY packets, until the timeout expires. | packets. With deadline [arping(8)] option, arping waits for count ARP REPLY packets, until the timeout expires. | ||
| Line 50: | Line 54: | ||
-f Finish after the first reply confirming that target is alive. | -f Finish after the first reply confirming that target is alive. | ||
| − | Name of network device where to send ARP REQUEST packets. | + | -I interface |
| + | Name of network device where to send ARP REQUEST packets. | ||
-h Print help page and exit. | -h Print help page and exit. | ||
| Line 56: | Line 61: | ||
-q Quiet output. Nothing is displayed. | -q Quiet output. Nothing is displayed. | ||
| − | IP source address to use in ARP packets. | + | -s source |
| + | IP source address to use in ARP packets. | ||
If this option is absent, source address is: | If this option is absent, source address is: | ||
| − | |||
· In DAD mode (with option -D) set to 0.0.0.0. | · In DAD mode (with option -D) set to 0.0.0.0. | ||
| − | |||
· In Unsolicited ARP mode (with options -U or -A) set to destination. | · In Unsolicited ARP mode (with options -U or -A) set to destination. | ||
| − | |||
· Otherwise, it is calculated from routing tables. | · Otherwise, it is calculated from routing tables. | ||
| Line 69: | Line 72: | ||
-V Print version of the program and exit. | -V Print version of the program and exit. | ||
| − | Specify a timeout, in seconds, before | + | -w deadline |
| + | Specify a timeout, in seconds, before | ||
arping exits regardless of how many packets have been sent or received. In this case arping does not stop after count [arping(8)] packet are sent, | arping exits regardless of how many packets have been sent or received. In this case arping does not stop after count [arping(8)] packet are sent, | ||
it waits either for deadline [arping(8)] expire or until count [arping(8)] probes are answered. | it waits either for deadline [arping(8)] expire or until count [arping(8)] probes are answered. | ||
Latest revision as of 18:25, 13 March 2014
Contents
tcpdump
tcpdump -vv -x -X -s 1500 -i eth1 'port 25'
arping
Use arping to get L2 and L3 responses.
Some files here: http://www.habets.pp.se/synscan/files/ .
use
Make sure to pick an interface with an IP. Interface is required, but IP is not. If no IP, it will use 0.0.0.0 unless otherwise specified.
Send ARP request:
# arping -I enp4s0 -c 2 10.0.0.1 ARPING 10.0.0.1 from 10.0.0.42 enp4s0 Unicast reply from 10.0.0.1 [AA:BB:CC:DD:EE:FF] 1.199ms Unicast reply from 10.0.0.1 [AA:BB:CC:DD:EE:FF] 1.045ms Sent 2 probes (1 broadcast(s)) Received 2 response(s)
Dup IP check:
# arping -D -I enp4s0 -c 3 10.0.0.1 ARPING 10.0.0.1 from 0.0.0.0 enp4s0 Unicast reply from 10.0.0.1 [AA:BB:CC:DD:EE:FF] 0.888ms Sent 1 probes (1 broadcast(s)) Received 1 response(s)
man page
arping(8)
NAME
arping - send ARP REQUEST to a neighbour host
SYNOPSIS
arping [-AbDfhqUV] [-c count] [-w deadline] [-s source] {-I interface} {destination}
DESCRIPTION
Ping destination on device interface by ARP packets, using source address source.
OPTIONS
-A The same as -U, but ARP REPLY packets used instead of ARP REQUEST.
-b Send only MAC level broadcasts. Normally arping starts from sending broadcast, and switch to unicast after reply received.
-c count
Stop after sending count ARP REQUEST
packets. With deadline [arping(8)] option, arping waits for count ARP REPLY packets, until the timeout expires.
-D Duplicate address detection mode (DAD). See RFC2131, 4.4.1 ⟨http://tools.ietf.org/rfc/rfc2131.txt⟩ . Returns 0, if DAD succeeded i.e. no replies are received
-f Finish after the first reply confirming that target is alive.
-I interface
Name of network device where to send ARP REQUEST packets.
-h Print help page and exit.
-q Quiet output. Nothing is displayed.
-s source
IP source address to use in ARP packets.
If this option is absent, source address is:
· In DAD mode (with option -D) set to 0.0.0.0.
· In Unsolicited ARP mode (with options -U or -A) set to destination.
· Otherwise, it is calculated from routing tables.
-U Unsolicited ARP mode to update neighbours' ARP caches. No replies are expected.
-V Print version of the program and exit.
-w deadline
Specify a timeout, in seconds, before
arping exits regardless of how many packets have been sent or received. In this case arping does not stop after count [arping(8)] packet are sent,
it waits either for deadline [arping(8)] expire or until count [arping(8)] probes are answered.
SEE ALSO
ping(8)[Cross reference to non-existant ID “ping”], clockdiff(8)[Cross reference to non-existant ID “clockdiff”], tracepath(8)[Cross reference to non-existant ID “tracepath”].
AUTHOR
arping was written by Alexey Kuznetsov kuznet@ms2.inr.ac.ru ⟨mailto:kuznet@ms2.inr.ac.ru⟩ . It is now maintained by YOSHIFUJI Hideaki yoshfuji@skbuff.net ⟨mailto:yoshfuji@skbuff.net⟩ .
SECURITY
arping requires CAP_NET_RAW capability to be executed. It is not recommended to be used as set-uid root, because it allows user to modify ARP caches of neighbour hosts.
AVAILABILITY
arping is part of iputils package and the latest versions are available in source form at ⟨http://www.skbuff.net/iputils/iputils-current.tar.bz2⟩.
iputils- 13 August 2013 arping(8)