[Dnsmasq-discuss] DHCP options, in particular setting default route

Carlos Carvalho carlos at fisica.ufpr.br
Fri Aug 21 01:32:04 BST 2009


JD (jd1008 at gmail.com) wrote on 20 August 2009 15:01:
 >
 >On 08/20/2009 02:43 PM, Carlos Carvalho wrote:
 >> Chris G (cl at isbd.net) wrote on 14 August 2009 11:03:
 >>   >I'm pretty sure dnsmasq can do what I want but I'd just like to
 >>   >confirm the details of how to do it.
 >>   >
 >>   >I want dnsmasq to set default routes for DHCP clients, so I need to
 >>   >use --dhcp-option, so far so good.  However the extra bit I'm not
 >>   >quite clear about is that I want to set different default routes for
 >>   >different clients.
 >>   >
 >>   >So I need something like:-
 >>   >
 >>   >     --dhcp-option =<network id>,option:router, 192.168.1.1
 >>   >
 >>   >for each client (or list of clients given by the network id) that
 >>   >needs to use default route 192.168.1.1.
 >>   >
 >>   >What I'm not quite clear about is what the network id looks like
 >>   >and/or if I need to set it myself using other dnsmasq arguments.
 >>
 >> You have to give the netid for the machine in the dhcp-host declaration.
 >>
 >>    
 >The network ID can be the MAC address of the machine.

I'm not sure what you mean. The net-id can be set to the mac yes, but
I think it must be done explicitly in the dhcp-host declaration; the
manual doesn't say it defaults to the mac if omitted. I'd rather use
something easier to recognize; here I set it to the hostname.



More information about the Dnsmasq-discuss mailing list