On Linux, which command can be used to view the neighboring hardware address table (ARP cache)?

Prepare for the eLearnSecurity Junior Penetration Tester Exam with engaging quizzes and in-depth content. Enhance your skills with practical questions and detailed explanations to ace your exam!

Multiple Choice

On Linux, which command can be used to view the neighboring hardware address table (ARP cache)?

Explanation:
Viewing the ARP cache on Linux is done with the ip command's neighbor subcommand. The kernel keeps a neighbor table that maps IP addresses to MAC addresses for devices the host has recently communicated with. The modern, recommended way to inspect this table is ip neigh (also shown as ip neighbor on some systems). It lists each entry with the IP, the corresponding MAC (lladdr), the interface, and the entry state (such as REACHABLE or STALE). This approach is preferred because iproute2 consolidates networking tasks in one toolset and is kept up to date. The older arp -a option can show the ARP cache, but it relies on the legacy net-tools package, which is less commonly installed and not as actively maintained, while ifconfig or ip addr focus on interface configuration rather than the ARP cache.

Viewing the ARP cache on Linux is done with the ip command's neighbor subcommand. The kernel keeps a neighbor table that maps IP addresses to MAC addresses for devices the host has recently communicated with. The modern, recommended way to inspect this table is ip neigh (also shown as ip neighbor on some systems). It lists each entry with the IP, the corresponding MAC (lladdr), the interface, and the entry state (such as REACHABLE or STALE). This approach is preferred because iproute2 consolidates networking tasks in one toolset and is kept up to date. The older arp -a option can show the ARP cache, but it relies on the legacy net-tools package, which is less commonly installed and not as actively maintained, while ifconfig or ip addr focus on interface configuration rather than the ARP cache.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy