LinuxCommandLibrary

ip-neighbour

manages the ARP and NDP neighbour tables

TLDR

Display the neighbour/ARP table

$ ip neighbour
copy
Flush entries for a specific device
$ sudo ip neighbour flush dev [eth0]
copy
Lookup a neighbour entry
$ ip neighbour get [192.168.1.1] dev [eth0]
copy
Add a static ARP entry
$ sudo ip neighbour add [192.168.1.100] lladdr [00:11:22:33:44:55] dev [eth0] nud reachable
copy
Delete an ARP entry
$ sudo ip neighbour delete [192.168.1.100] dev [eth0]
copy
Replace an ARP entry
$ sudo ip neighbour replace [192.168.1.100] lladdr [00:11:22:33:44:55] dev [eth0]
copy

SYNOPSIS

ip neighbour [command] [options]

DESCRIPTION

ip neighbour manages the ARP (IPv4) and NDP (IPv6) neighbour tables. These tables map IP addresses to link-layer (MAC) addresses for hosts on directly connected networks.
The neighbour cache is normally populated automatically through ARP/NDP protocols, but static entries can be added for hosts that don't respond to ARP or for security purposes.

PARAMETERS

show [dev DEVICE]

Display neighbour table entries
add IP lladdr MAC dev DEVICE
Add a neighbour entry
delete IP dev DEVICE
Remove a neighbour entry
change IP lladdr MAC dev DEVICE
Modify existing entry
replace IP lladdr MAC dev DEVICE
Add or change entry
flush dev DEVICE
Clear entries for a device
get IP dev DEVICE
Lookup single entry
nud STATE
Neighbour state: permanent, noarp, reachable, stale, etc.

CAVEATS

Modifying entries requires root privileges. Static entries may become stale if the actual MAC changes. IPv6 uses NDP instead of ARP but is managed through the same interface.

HISTORY

ip neighbour is part of iproute2 and replaces the older arp command from net-tools. It provides unified IPv4 and IPv6 neighbour management.

SEE ALSO

ip(8), arp(8), arping(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community