OpenWrt Forum Archive

Topic: how to create manually an ARP address mapping entry?

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

I use wol command and wol works correcly, but if my router resarted wol doesn't works, because my router lost entrys of arp table. How to create manually an ARP mapping entry? 'arp -s' isn't working. I have to use 'arp add_new_hw_address to host' command before i use wol command. (like in Linux: 'arp -s 192.168.5.2 00:1D:5A:44:18:F1')

I use wol command from crontab:
10 20 * * 1 wol -h 192.168.5.255 00:1D:5A:44:18:F1
10 20 * * 2 wol -h 192.168.5.255 00:1D:5A:44:18:F1
10 20 * * 3 wol -h 192.168.5.255 00:1D:5A:44:18:F1
10 20 * * 4 wol -h 192.168.5.255 00:1D:5A:44:18:F1
10 20 * * 5 wol -h 192.168.5.255 00:1D:5A:44:18:F1

Why doesn't "arp -s" work?  Do you get an error message?

You should be able to change your crontab to:
10 20 * * 1-5 wol -h 192.168.5.255 00:1D:5A:44:18:F1

'arp -s' isn't working because on openwrt is installed only a light version of arp. (arp is included in busybox)

with the arp command it is not possible to use any of the parameters. see below the examples:
with every of the parameters i get the same result

# arp -s
IP address       HW type     Flags       HW address            Mask     Device
192.168.5.229    0x1         0x2         00:11:q5:29:A1:B0     *        br-lan
192.168.5.2      0x1         0x2          00:1D:5A:44:18:F1    *        br-lan
81.91.37.234     0x1         0x2         00:02:5C:23:91:A2     *        eth0.1

#arp -blabla
IP address       HW type     Flags       HW address            Mask     Device
192.168.5.229    0x1         0x2         00:11:q5:29:A1:B0     *        br-lan
192.168.5.2      0x1         0x2          00:1D:5A:44:18:F1    *        br-lan
81.91.37.234     0x1         0x2         00:02:5C:23:91:A2     *        eth0.1

#arp -h     
IP address       HW type     Flags       HW address            Mask     Device
192.168.5.229    0x1         0x2         00:11:q5:29:A1:B0     *        br-lan
192.168.5.2      0x1         0x2          00:1D:5A:44:18:F1    *        br-lan
81.91.37.234     0x1         0x2         00:02:5C:23:91:A2     *        eth0.1

#arp --help
IP address       HW type     Flags       HW address            Mask     Device
192.168.5.229    0x1         0x2         00:11:q5:29:A1:B0     *        br-lan
192.168.5.2      0x1         0x2          00:1D:5A:44:18:F1    *        br-lan
81.91.37.234     0x1         0x2         00:02:5C:23:91:A2     *        eth0.1

The discussion might have continued from here.