ARPING and OpenWRT

Revision as of 22:20, 16 August 2026 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Ever wondered why people do the things they do, like creating a utility named arping that only does what ping does? Well forget about it, we'll never know the answer to why many stupid things are done. Let's just solve it. Keep in mind the below is a work in progress and isn't finished yet.

Thomas Habets ARPing on OpenWrt 25.12.5 / WRT32X

OpenWrt's current iputils-arping cannot query a known MAC address to discover its IP address.

Thomas Habets' arping supports MAC-address targets:

arping [options] <host/ip/MAC>

A compatible prebuilt ARMv7/musl binary is available from Alpine Linux:

https://dl-cdn.alpinelinux.org/alpine/v3.12/community/armv7/arping-2.21-r0.apk

Requirements

The binary requires:

  • musl libc — already provided by OpenWrt
  • libpcap.so.1 — package: libpcap1
  • libnet.so.1 — OpenWrt provides compatible libnet.so.9 via libnet-1.2.x

The Alpine binary was verified to start correctly on the WRT32X after mapping libnet.so.1 to OpenWrt's libnet.so.9.

Example

Find the IP address associated with a known MAC:

arping -i br-lan -c 1 -T 192.168.1.255 82:AF:CA:52:9B:45

Use -r for raw output when scripting.

cd /tmp

apk update
apk add libpcap1 libnet-1.2.x wget-ssl

wget -O arping-2.21-r0.apk \
https://dl-cdn.alpinelinux.org/alpine/v3.12/community/armv7/arping-2.21-r0.apk

rm -rf /tmp/arping-install
mkdir -p /tmp/arping-install

tar -xzf arping-2.21-r0.apk -C /tmp/arping-install

cp /tmp/arping-install/usr/sbin/arping /usr/sbin/arping
chmod 755 /usr/sbin/arping

ln -sf /usr/lib/libnet.so.9 /usr/lib/libnet.so.1

echo '===== VERIFY ====='
ldd /usr/sbin/arping
/usr/sbin/arping --help