[SOLVED] Trouble with ip neigh

I'm trying to add a static arp entry and I've tried this with lede:

ip neigh add [myip] lladdr [mac address] nud permanent dev eth0

and it doesn't work...can someone help?

this is what I get when trying the above command

BusyBox v1.25.1 () multi-call binary.

Usage: ip [OPTIONS] {address | route | link | rule} {COMMAND}

where OBJECT := {address | route | link | rule}
OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }

also tried setting the ip and mac in the ethers file, but I can't get the arp -s command to work to load this file...arp only brings up the current arp table.

I've tried sudo arp -s with no luck.

I've tried install ip-full or ip-tiny and I cannot get ip neigh to work...I just get the above output and no confirmation that is worked and the arp table doesn't show the static entry.

All guides on the web have instructed the above, but they do not work.

There was even a bug report on this and

Yousong Zhou commented on 22.03.2017 08:43
This is expected result from busybox ip applet. ip-tiny or ip-full of iproute2 should provide what you need

I can 't get what I need...I'm lost and I don't know where else to look for writing a static arp table.

See this OpenWrt thread...


I found that thread, and in my post above, stated trying installing ip-full and ip-tiny separate, but they didn't work

Did the package install?

yes, it said each pack installed...separately of course

You mentioned "tried" so wanted to clarify installing was successful.

sry...mb, I should have been more clear

No worries.

What happens if you run just ip neigh?

I installed ip-full using LuCi, and then ran the following in PuTTY, which worked...

ip neigh add lladdr 70:71:aa:4b:29:aa nud permanent dev br-lan

There are two ip programs in the path, from busybox and ip-full/ip-tiny. Use which ip to check which is run when executing ip without path.

When I run ip neigh

with ip-full 4.4.0-10 installed using LEDE Reboot 17.01.4 r3560-79f57e422d / LuCI lede-17.01 branch (git-17.290.79498-d3f0685) I get the below

BusyBox v1.25.1 () multi-call binary.

Usage: ip [OPTIONS] {address | route | link | rule} {COMMAND}

where OBJECT := {address | route | link | rule}
OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }

with ip-full 4.4.0-10

I run which ip

I get /sbin/ip

..when I uninstalled ip-full and have neither ip-full or ip-tiny installed and run "which ip" I get "/sbin/ip"

Eventually, I'll need to permanently set the arp entry in case of router reboot. I've read the way to do this is to enter the ip and mac address into the etc/ethers file, save that file, then run the command:

post-up arp -f /etc/ethers

I'm assuming the above command somehow sets the ethers file permanent.

but when I tried that command, I get the current arp table. I think the arp command is obsolete and is just a shell call command to show the current arp table. I think this action is now moved to the iproute2, but I don't know what to do to make an arp entry permanent using ip tools.

You'll need to use the path in that case (or change PATH).

/usr/sbin/ip is the path to the ip program in ip-full.

Could you tell me please how I could change PATH in this case?

In /etc/profile I think. My latest lede router install has the following line which allows ip-full to be used without specifying the path.

export PATH="/usr/sbin:/usr/bin:/sbin:/bin"

My /etc/profile has the following:

export PATH=/bin:/sbin:/usr/bin:/usr/sbin

maybe I need the quotes like in yours

yep, that did it...it needed the quotes...now it works...thanks for your help

I ran the command ip neigh add [ip] lladdr [mac] nud permanent dev br-lan
and I got nothing afterwards...I then ran arp and the table showed the entry I submitted.

Now to figure how to make it permament.

Also, just to clarify, after adding the quotes, I ran which ip and got usr/sbin/ip

OP has started a new thread here...

Thanks. I thought the topic might have ventured away a bit from this one since this one was about ip neigh...anyway. I found a solution and I'll post in the other thread.