Display learned IPv4 ARP and IPv6 NDP neighbor entries and states on enp1s0.
Do not change any entries.
Which command is appropriate?
ip neigh show dev enp1s0 displays neighbor addresses, link-layer addresses, and states such as REACHABLE and STALE for the selected interface.
Detailed explanation
ip route show dev enp1s0Incorrect. It displays routes that use enp1s0.
Incorrect. It displays routes that use enp1s0.
ip neigh show dev enp1s0Correct. It displays the neighbor cache on enp1s0.
Correct. It displays the neighbor cache on enp1s0.
ip address show dev enp1s0Incorrect. It displays protocol addresses assigned to enp1s0.
Incorrect. It displays protocol addresses assigned to enp1s0.
ip link show dev enp1s0Incorrect. It displays link state and MAC information for enp1s0.
Incorrect. It displays link state and MAC information for enp1s0.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'ip neigh show dev enp1s0 -> neighbor IP, link address, state'Expected result
ip neigh show dev enp1s0 -> neighbor IP, link address, stateKey points
- Use the neigh object
- ARP and NDP
- Limit with dev
Notes
- Environment: 操作対応表の表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.