Adding arp bindings into ARP table Linux

shaggy picture shaggy · Jul 21, 2011 · Viewed 13k times · Source

Im trying to add an ARP binding into ARP table in linux, my arp table looks like this:

IP address       HW type     Flags       HW address            Mask     Device
192.168.3.12     0x1         0x6         00:0c:29:89:c5:cc     *        eth1
192.168.3.100    0x1         0x6         00:0c:29:89:c5:c8     *        eth1
192.168.43.2     0x1         0x2         00:50:56:e1:65:76     *        eth0
192.168.3.111    0x1         0x6         00:11:22:33:44:55     *        eth1
192.168.43.139   0x1         0x6         00:0c:29:89:c5:cc     *        eth0

this is what im trying to do, but i get the following error:

arp -s 192.168.43.138 00:00:22:33:33:33
SIOCSARP: Invalid argument

Any other IP addresses are working fine, just this one is resulting in an error Any ideas what is wrong here? (it is not a problem of mac address probably, ive tried many other addresses)

Answer

Karoly Horvath picture Karoly Horvath · Jul 21, 2011

Try to specify interface with -i, if that does not work then you probably trying to add MAC entry for your own IP address.