[Dnsmasq-discuss] how to set static arp entry according to dhcp request?

Darren Hoo darren.hoo at gmail.com
Thu May 27 04:10:45 BST 2010


Hi Simon,

On Thu, May 27, 2010 at 2:59 AM, Simon Kelley <simon at thekelleys.org.uk> wrote:

> You're on the right lines, but much simpler than using DBus is to use
> the script which dnsmasq can run when a DHCP lease is created or
> destroyed: see --dhcp-script in the dnsmasq man page.
>
>
> This script gets the IP address and MAC address as arguments and is
> executed as root, so a simple shell script to call the arp command
> should do what you need.
>
> There are examples of such scripts in contrib/port-forward and
> contrib/wrt in the dnsmasq tarball that might help.

Thanks a lot for this great tip, the examples really helped me a lot
--dhcp-script makes it so simple that it only takes me several minutes
to setup and it works like a charm!

Regards,
Darren.



More information about the Dnsmasq-discuss mailing list