GNU/Linux Command – IP (Part-3)

ip — Manipulate network device, routing and tunnels

The ip is a swiss army knife command. It does many functions like assigning IP addresses to interfaces, for setting up routes and display configurations etc. In this part, we will see some of the ARP/Neighbour table management using the IP command.


$ ip neigh -- Show the ARP table. 
$ ip neigh show -- Same as above. 
$ ip -s neigh -- Show the entries with usage statistics. 
$ ip neigh show nud stale -- Show the stale entries. 
$ ip neigh show to -- Show the ARP entries for the
  matching prefix. 
$ ip neigh show dev eth0 -- Show ARP entries attached to dev eth0. 
# ip neigh add lladdr 0:1:2:3:4:5 dev eth0 nud perm -- 
  Add a permanent entry for a IP on device eth0. 
# ip neigh chg dev eth0 nud reachable -- Change the entry 
  state to reachable. 
# ip neigh repl lladdr 5:4:3:2:1:0 dev eth0 -- Replace(if
  exist) or Add this entry. 
# ip neigh del dev eth0 -- Delete an ARP entry. 
# ip -s neigh flush dev eth0 -- Delete all entries in device eth0
  with verbose message 
# ip -s -s neigh flush -- Delete the specific entry with 
  more detailed message. 

Read: man ip

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: