arp steht für Address Resolution Protocol und wird verwendet, um die MAC-Adressen von Geräten (global Unique Identification Number) auf IPs abzubilden. Computer enthalten eine ARP-Tabelle, die MAP- und IP-Adressen zuordnet. Führen Sie den folgenden Befehl aus, um alle Einträge in der Tabelle anzuzeigen:
$ arp -a
Wenn Sie beim Ausführen von arp:
den folgenden Fehler erhaltenarp: command not found
Möglicherweise müssen Sie das net-tools-Paket entsprechend Ihrer Wahl der Distribution installieren.
Verteilung | Befehl |
---|---|
Debian | apt-get install net-tools |
Ubuntu | apt-get install net-tools |
Alpin | apk net-tools hinzufügen |
Arch Linux | pacman -S net-tools |
Kali-Linux | apt-get install net-tools |
CentOS | yum installiere net-tools |
Fedora | dnf install net-tools |
Raspbian | apt-get install net-tools |
Docker | docker laufen cmd.cat/arp arp |
arp-Beispiel
1. Aktuelle Arp-Tabelle anzeigen:
$ arp -a
2. Löschen Sie den gesamten Cache:
$ arp -a -d
3. Einen bestimmten Eintrag löschen:
$ arp -d address
4. Erstellen Sie einen Eintrag:
$ arp -s address mac_address