dnsmasq acts as the DHCP server for selected nodes overriding the existing DHCP server on the same LAN?

Posted by user183394 on Server Fault See other posts from Server Fault or by user183394
Published on 2012-11-11T02:38:57Z Indexed on 2012/11/11 5:04 UTC
Read the original article Hit count: 539

Filed under:
|
|
|
|

I am trying to set up a small "lab" at home. Like many modern homes, I have a regular DSL service which comes with a 2Wire 3600HGV router, which acts also as a DHCP server. Since

  • I would like to PXE boot a few computers in my "lab"
  • The 2Wire is inflexible to adjustments that I want to do
  • I have used dnsmasq at work

so I would like to use dnsmasq as the DHCP server for the few nodes in my "lab" if feasible.

In the dnsmasq man page, there is the following:

[...] -K, --dhcp-authoritative (IPv4 only) Should be set when dnsmasq is definitely the only DHCP server on a network. It changes the behaviour from strict RFC compliance so that DHCP requests on unknown leases from unknown hosts are not ignored. This allows new hosts to get a lease without a tedious timeout under all circumstances. It also allows dnsmasq to rebuild its lease database without each client needing to reacquire a lease, if the database is lost. [...]

As far as I know, the ISC DHCP server can use the following to do what I would like to accomplish:

authoritative; 
[...]
subnet 192.168.1.0 netmask 255.255.255.0 {
    host nb0 {
        # only give DHCP information to this computer:
        hardware ethernet e8:9a:8f:17:70:42;
        fixed-address 192.168.1.10;
        option subnet-mask 255.255.255.0;
        option routers 192.168.1.254;
        option domain-name-servers 192.168.1.254;
        # Non-essential DHCP options
        filename "/pxelinux.0";
    }
[...]

But I much prefer dnsmasq's "all-in-one-ness". My question: do I have to couple the -K option with something else? As shown in the example above, the ISC DHCP server requires the mac addresses of managed nodes to be explicitly specified. Does dnsmasq have something similar?

FYI, the machine on which I plan to run dnsmasq runs CentOS 6.3 64bit. It has a statically assigned IP address: 192.168.1.3.

© Server Fault or respective owner

Related posts about centos

Related posts about dhcp