GNU/Linux Command – IP (Part-3)

ip — Manipulate network device, routing and tunnels

Summary:
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.

Examples:

$ 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 192.168.0.0/16 -- Show the ARP entries for the
  matching prefix. 
$ ip neigh show dev eth0 -- Show ARP entries attached to dev eth0. 
# ip neigh add 10.1.1.6 lladdr 0:1:2:3:4:5 dev eth0 nud perm -- 
  Add a permanent entry for a IP on device eth0. 
# ip neigh chg 10.1.1.6 dev eth0 nud reachable -- Change the entry 
  state to reachable. 
# ip neigh repl 10.1.1.5 lladdr 5:4:3:2:1:0 dev eth0 -- Replace(if
  exist) or Add this entry. 
# ip neigh del 10.1.1.5 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 10.1.1.5 -- Delete the specific entry with 
  more detailed message. 

Read: man ip

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: