Quote:
|
permanently bind a client with a particular MAC address to a given IP address?
|
You are asking for a configuration that causes the dnsmasq server to offer a specific IP address to a dhcp client with a specific MAC address.
Normally dnsmasq can take this information from /etc/hosts but in this case "--no-hosts" prevents that.
The dnsmasq option --dhcp-host=
MAC,name,IPaddr .
The options (not the specific option addresses) are compiled into the NetworkMananger binary.
Scanning the sources it seems you should be able put parameters in
/etc/dnsmasq.d/local (create the file). Something like
dhcp-host=00:11:22:33:44:55,fred,10.12.13.73
Code:
if (getenv ("NM_DNSMASQ_DEBUG")) {
nm_cmd_line_add_string (cmd, "--log-dhcp");
nm_cmd_line_add_string (cmd, "--log-queries");
}
/* dnsmasq may read from it's default config file location, which if that
* location is a valid config file, it will combine with the options here
* and cause undesirable side-effects. Like sending bogus IP addresses
* as the gateway or whatever. So tell dnsmasq not to use any config file
* at all.
*/
nm_cmd_line_add_string (cmd, "--conf-file");
nm_cmd_line_add_string (cmd, "--no-hosts");
nm_cmd_line_add_string (cmd, "--keep-in-foreground");
nm_cmd_line_add_string (cmd, "--bind-interfaces");
nm_cmd_line_add_string (cmd, "--except-interface=lo");
nm_cmd_line_add_string (cmd, "--clear-on-reload");