linux-arp-entries
Queries ARP (Address Resolution Protocol) cache information on a Linux system. Parses the /proc/net/arp file and returns the IP address-to-MAC address mappings registered in the current ARP table as structured fields.
Command properties
| Property | Value |
|---|---|
| Command type | Driver query |
| Required permission | Administrator |
| License usage | Counted |
| Parallel execution | Not supported |
| Distributed execution | Runs on Data Node (mapper) |
Syntax
Output fields
| Field | Type | Description |
|---|---|---|
type | string | Hardware type (e.g., ether) |
ip | ipaddr | IP address registered in the ARP cache |
mac | string | MAC address |
iface | string | Network interface name |
Error codes
Parsing errors
| Error code | Message | Description |
|---|---|---|
95040 | no-read-permission | Executed without administrator privileges |
Runtime errors
N/A
Description
The linux-arp-entries command reads the /proc/net/arp file and queries entries registered in the ARP cache. Each entry includes the hardware type, IP address, MAC address, and network interface name. The IP address is converted to an InetAddress object and assigned to the ip field.
This command requires administrator privileges. If privileges are insufficient, an error occurs at the parsing stage.
Examples
-
Query ARP cache information
linux-arp-entriesQueries all entries registered in the current system's ARP cache.
-
Filter ARP cache entries for a specific interface
linux-arp-entries | search iface == "eth0"Filters only ARP cache entries for the
eth0interface.