arping

Envoie des paquets ARP request/reply à un hôte du réseau local : un ping de couche 2 qui fonctionne même quand l'ICMP est filtré. Sends ARP request/reply packets to a host on the local network — a Layer 2 ping that works even when ICMP is filtered.

↗ https://github.com/ThomasHabets/arping

Overview

arping probes hosts on the local Ethernet segment using ARP instead of ICMP, making it useful for host discovery and latency checks on networks where ping is blocked by a host firewall. Since ARP doesn’t route past the local subnet, it’s strictly a same-segment tool — handy for confirming a live host during internal engagements or verifying a MAC-to-IP mapping.

Common Usage

Ping a host by IP on the local segment (ARP request mode)

sudo arping -I eth0 192.168.1.1

Send a fixed number of requests then stop

sudo arping -I eth0 -c 4 192.168.1.1

Reverse mode — ping by MAC address instead of IP

sudo arping -I eth0 -r 00:11:22:33:44:55

Quiet output, just exit code (useful in scripts)

sudo arping -I eth0 -c 1 -q 192.168.1.1 && echo "host is up"

Unicast instead of broadcast (stealthier, avoids alerting other hosts)

sudo arping -I eth0 -U 192.168.1.1

Sweep a Subnet

# Simple discovery loop across a /24
for ip in 192.168.1.{1..254}; do
  sudo arping -I eth0 -c 1 -w 1 -q "$ip" && echo "$ip is up"
done

Tips

  • Requires being on the same broadcast domain as the target — won’t work across routed subnets
  • Faster and stealthier than ICMP for internal host discovery since many EDR/firewalls don’t inspect ARP
  • For bulk subnet sweeps, arp-scan or netdiscover are usually more convenient than looping arping manually
Help / Man page
Usage: arping [options] <destination>

Options:
  -I IFACE    Interface to use
  -c COUNT    Stop after sending/receiving COUNT packets
  -w TIMEOUT  Time to wait for a response, in seconds
  -r          Raw output: MAC address of target
  -R          Raw output: your own MAC address
  -q          Quiet, only print summary/exit code
  -U          Unicast the ARP request instead of broadcasting it
  -A          ARP request instead of ARP-ping (default behavior varies by target)
  -0          Use this as source IP (probe mode, don't wait for reply)
  -h          Display help

Vue d’ensemble

arping sonde les hôtes du segment Ethernet local en utilisant l’ARP au lieu de l’ICMP, ce qui le rend utile pour la découverte d’hôtes et les mesures de latence sur des réseaux où le ping est bloqué par un pare-feu local. Comme l’ARP ne route pas au-delà du sous-réseau local, c’est strictement un outil de même segment : pratique pour confirmer qu’un hôte est actif lors de missions internes ou pour vérifier une correspondance MAC/IP.

Utilisation courante

# Pinguer un hôte par IP sur le segment local (mode ARP request)
sudo arping -I eth0 192.168.1.1

# Envoyer un nombre fixe de requêtes puis s'arrêter
sudo arping -I eth0 -c 4 192.168.1.1

# Mode inverse : pinguer par adresse MAC au lieu de l'IP
sudo arping -I eth0 -r 00:11:22:33:44:55

# Sortie silencieuse, juste le code de retour (utile dans les scripts)
sudo arping -I eth0 -c 1 -q 192.168.1.1 && echo "host is up"

# Unicast au lieu de broadcast (plus furtif, évite d'alerter les autres hôtes)
sudo arping -I eth0 -U 192.168.1.1

Balayer un sous-réseau

# Boucle de découverte simple sur un /24
for ip in 192.168.1.{1..254}; do
  sudo arping -I eth0 -c 1 -w 1 -q "$ip" && echo "$ip is up"
done

Conseils

  • Nécessite d’être sur le même domaine de broadcast que la cible : ne fonctionne pas à travers des sous-réseaux routés
  • Plus rapide et plus furtif que l’ICMP pour la découverte d’hôtes interne, car beaucoup d’EDR/pare-feux n’inspectent pas l’ARP
  • Pour des balayages de sous-réseau en masse, arp-scan ou netdiscover sont généralement plus pratiques qu’une boucle arping manuelle
Aide / Page de manuel
Usage: arping [options] <destination>

Options:
  -I IFACE    Interface to use
  -c COUNT    Stop after sending/receiving COUNT packets
  -w TIMEOUT  Time to wait for a response, in seconds
  -r          Raw output: MAC address of target
  -R          Raw output: your own MAC address
  -q          Quiet, only print summary/exit code
  -U          Unicast the ARP request instead of broadcasting it
  -A          ARP request instead of ARP-ping (default behavior varies by target)
  -0          Use this as source IP (probe mode, don't wait for reply)
  -h          Display help