[Dnsmasq-discuss] DHCP options, in particular setting default route
Chris G
cl at isbd.net
Fri Aug 21 10:13:28 BST 2009
On Thu, Aug 20, 2009 at 10:09:46PM -0700, JD wrote:
>
>
> On 08/20/2009 05:32 PM, Carlos Carvalho wrote:
> > 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.
> Well and good - I assumed Chris already knew
> "it must be done explicitly in the dhcp-host declaration".
>
No I didn't, it was some of what I was asking as it wasn't clear (to
me amnyway) what a network ID was. At first glance it *could* have
been the system's host name.
> Also, I did not say it cannot be something like the hostname -
> I only stated what it can be, and not what it MUST be.
>
Thanks to you both I think I now know that the Network ID is an
arbitrary name that *I* give to a system and which can then be used in
other DHCP options (and elsewhere maybe).
--
Chris Green
More information about the Dnsmasq-discuss
mailing list