arping(8)

๐Ÿ“ฆ version 2.25, in opensuse-leap 16.0

๐Ÿ’– arping(8) โ€” the manual, but make it cute ๐Ÿ’–

okay bestie, so this is the manual page for arping, and it lives in section 8 of the manual (that's the sysadmin/daemon section, very main character of it). it sends arp and/or ip pings to a given host and honestly? it's iconic. let's get into it. ๐Ÿฆ‹


โœจ NAME โœจ

arping โ€” sends arp and/or ip pings to a given host ๐ŸŽ€


โœจ SYNOPSIS โœจ

arping [-0aAbBdDeFhpqrRuUv] [-S host/ip] [-T host/ip] [-s MAC]    [-t
MAC] [-c count] [-i interface] [ -w seconds ] [ -W seconds ] [ -V vlan ]
[ -Q priority ] [ -g group ] <host | -B>

arping --help

โœจ DESCRIPTION โœจ

so arping sends ARP and/or ICMP requests to the host you point at, and then shows you the replies. the host can be a hostname, an IP address, or a MAC address โ€” you pick, we support you. ๐Ÿ’…

one request gets sent every second. that's the vibe. ๐Ÿ•

when you're pinging an IP, an ARP who-has query goes out. when you're pinging a MAC address, a directed broadcast ICMP Echo request goes out instead. want the more technical explanation plus an FAQ? that lives in the README file, go read it, it's giving documentation. ๐Ÿ“–

๐ŸŒธ Note on timing ๐ŸŒธ

here's the tea: ARP packets on a LAN get replied to so fast that the OS task scheduler literally can't keep up and get exact enough timing. ๐Ÿ˜ญ on an idle system your roundtrip times will be pretty much accurate, but the more load there is, the less exact the timing gets.

so if you want more exact timing on a non-idle system, re-nice arping to -15 or so:

# nice -n -15 arping foobar

and ngl, this isn't even an arping-only problem โ€” normal ping has it too (at least it does on the author's system, fr fr). it just doesn't show up as much with ping, because arping packets (when pinging IP) don't traverse the IP stack when they're received, and are therefore replied to faster. slay, physics. โšก


โœจ OPTIONS โœจ

okay this is the big one, hydrate before you read, there's a LOT and we're covering every single one. ๐Ÿ’ง

  • --help โ€” shows extended help. not quite as extensive as this manpage, but more than -h. it's giving "the medium-sized help". ๐Ÿ™ˆ
  • -0 โ€” use this to ping with source IP address 0.0.0.0. use it when you haven't configured your interface yet. โš ๏ธ note that this may get the MAC-ping unanswered. this is an alias for -S 0.0.0.0.
  • -a โ€” audible ping. beep beep, you'll hear it. ๐Ÿ””
  • -A โ€” only count addresses matching requested address. > heads up bestie: this WILL break most things you do. it's only useful if you're arpinging many hosts at once. see arping-scan-net.sh for an example. ๐Ÿ’€
  • -b โ€” like -0 but source broadcast source address (255.255.255.255). note that this may get the arping unanswered since it's not normal behavior for a host. ๐Ÿšซ
  • -B โ€” use this instead of host if you want to address 255.255.255.255.
  • -c count โ€” only send count requests. that's it, that's the whole thing. โœจ
  • -C count โ€” only wait for count replies, regardless of -c and -w. stubborn, in a cute way. ๐Ÿ˜ค
  • -d โ€” find duplicate replies. exits with 1 if there are answers from two different MAC addresses. detective mode ๐Ÿ”
  • -D โ€” display answers as exclamation points and missing packets as dots. like flood ping on a Cisco. !!!...!!! vibes ๐ŸŽ†
  • -e โ€” like -a but beep when there is no reply. sad beep. ๐Ÿ˜ญ
  • -F โ€” don't try to be smart about the interface name. even if this switch isn't given, -i disables this smartness anyway.
  • -g group โ€” setgid() to this group instead of the nobody group.
  • -h โ€” displays a help message and exits. bye bestie ๐Ÿ‘‹
  • -i interface โ€” don't guess, use the specified interface. be decisive. ๐Ÿ’…
  • -m type โ€” type of timestamp to use for incoming packets. use -vv when pinging to list the available ones. ๐Ÿ‘€
  • -p โ€” turn on promiscious mode on the interface. use this if you don't "own" the MAC address you're using. ๐Ÿ‘‘
  • -P โ€” send ARP replies instead of requests. useful with -U.
  • -q โ€” does not display messages, except error messages. quiet luxury. ๐Ÿคซ
  • -Q priority โ€” 802.1p priority to set. should be used with the 802.1Q tag (-V). defaults to 0.
  • -r โ€” raw output: only the MAC/IP address is displayed for each reply. no fluff, just facts. ๐Ÿงš
  • -R โ€” raw output: like -r but shows "the other one", and it can be combined with -r. ๐ŸŒ€
  • -s MAC โ€” set source MAC address. you may need to use -p with this.
  • -S IP โ€” like -b and -0 but with set source address. โš ๏ธ note that this may get the arping unanswered if the target doesn't have routing to the IP. if you don't own the IP you're using, you may need to turn on promiscious mode on the interface (with -p). with this switch you can find out what IP-address a host has without taking an IP-address yourself โ€” that's lowkey magic, ngl. โœจ
  • -t MAC โ€” set target MAC address to use when pinging an IP address.
  • -T IP โ€” use -T as target address when pinging MACs that won't respond to a broadcast ping but perhaps to a directed broadcast.

example: to check the address of MAC-A, use knowledge of MAC-B and IP-B.

$ arping -S <IP-B> -s <MAC-B> -p <MAC-A>
  • -u โ€” show index=received/sent instead of just index=received when pinging MACs. math girlies rise ๐Ÿงฎ
  • -U โ€” send unsolicited ARP. this sets the destination MAC address in the ARP frame to the broadcast address. unsolicited ARP is used to update the neighbours' ARP caches.

example:

$ arping -i <interface> -U <interface IP>
  • -v โ€” verbose output. use it twice for more messages. the more the merrier ๐Ÿ“ข
  • -V vlan โ€” VLAN tag to set. defaults to no VLAN tag.
  • -w sec โ€” specify a timeout before ping exits regardless of how many packets have been sent or received. โฐ
  • -W sec โ€” time to wait between pings.
  • -z โ€” enable seccomp (default seccomp state depends on compile options).
  • -Z โ€” disable seccomp (default seccomp state depends on compile options).

โœจ EXAMPLES โœจ

okay these are the receipts, look how pretty the output is ๐ŸŽ€

# arping -c 3 88.1.180.225
ARPING 88.1.180.225
60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=0 time=13.910 msec
60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=1 time=13.935 msec
60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=2 time=13.944 msec

--- 88.1.180.225 statistics ---
3 packets transmitted, 3 packets received,   0% unanswered
# arping -c 3 00:11:85:4c:01:01
ARPING 00:11:85:4c:01:01
60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=0 time=13.367 msec
60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=1 time=13.929 msec
60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=2 time=13.929 msec

--- 00:11:85:4c:01:01 statistics ---
3 packets transmitted, 3 packets received,   0% unanswered
# arping -C 2 -c 10 -r 88.1.180.225
00:11:85:4c:01:01
00:11:85:4c:01:01

โœจ BUGS โœจ

bestie. ๐Ÿ˜ญ you have to use -B instead of arpinging 255.255.255.255, and -b instead of -S 255.255.255.255. this is libnets fault. not ours. not yours. it's just how it is. ๐Ÿ’€


โœจ SEE ALSO โœจ

ping(8), arp(8), rarp(8) โ€” go read the whole friend group, they're all icons ๐Ÿซถ


โœจ AUTHOR โœจ

Arping was written by Thomas Habets <thomas@habets.se>. ๐Ÿ‘‘

http://www.habets.pp.se/synscan/

git clone http://github.com/ThomasHabets/arping.git

and that's the whole page, bestie!! ๐ŸŒˆ this was arping, section 8, dated 21th June, 2003 โ€” shoutout to that date, it's giving vintage. mwah, go ping something. ๐Ÿ’–โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from