OpenWrt Forum Archive

Topic: static arp

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!!!

Is there a way for setting a permanent arp entry with any of the tools which I can use with OpenWrt like I can do that under FreeBSD with
arp -s hostname ether_addr

For example I have static IP routing with the following config of my WRT router:
Gateway: 192.168.2.254
External router IP: 192.168.2.1
Internal network: 192.168.1.0

And now I want that packets from the internal network always go to 192.168.2.254 with hw addr 00:00:de:ad:00:00 and no other hw addr.
Is there a short solution???

Thanx!
Consy

It seems that the "arp" command provided in OpenWrt allows simply to view the ARP table and not to add a static entry.

You should use the "ip" command from the iproute package.

ip neigh add 192.168.1.2    lladdr 00:de:ad:be:ef:00  nud permanent   dev br0

This comand adds a static (stays there forever until manually removed or until reboot) arp entry for address 192.168.1.2 with a MAC address of 00:de:ad:be:ef:00. The said host is reachable through the br0 interface.

See the manual of "ip" command on your favorite linux box to understand better what the previous command does and what alse you can do to the arp tables with the "ip" command.

(Last edited by Kurgan on 18 Jun 2005, 10:57)

Great, that works fine!!!

Thanx!!!

The discussion might have continued from here.