[Dnsmasq-discuss] How to configure routing via DHCP?
Dirk Schenkewitz
schenkewitz at docomolab-euro.com
Tue Feb 7 10:13:08 GMT 2006
Sorry for the duplicate...
Am Donnerstag, 2. Februar 2006 21:48 schrieb Simon Kelley:
> Dirk Schenkewitz wrote:
> > Hi All,
> > ...
> > When correctly set up, 'route' shows my routing table as follows:
> > Kernel IP routing table
> > Destination Gateway Genmask Flags Metric Ref Use
> > Iface link-local * 255.255.0.0 U 0 0
> > 0 eth0 10.0.0.0 * 255.0.0.0 U 0 0
> > 0 eth0 loopback * 255.0.0.0 U 0
> > 0 0 lo default 10.1.1.223 0.0.0.0 UG 0
> > 0 0 eth0
> > The important line (and the one that does not work automatically now) is
>> the last line.
>
> If you really want to set up static routes and use option 33 then you'll
> need to do some configuration of your dhcp client: we're covered this
> ground before, and the relevant information is here:
>
> http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2006q1/000569.html
Aha. Thanks for that link. Hmmm... Ok, I see. Thank you!
> BUT: the last line in your routing table is a default route, not a
> static route. (Well I guess it's a static route too, but a special case)
> Because nearly everything needs a default route (sometimes it called the
> "router address, because that's what it is) there is a special DHCP
> option to set it: the "router" option, number three.
>
> Because dnsmasq is very frequently run on the router, it sends by
> default a router option, with a value of the IP address of the machine
> running dnsmasq.
Yes, I observed that the address of the machine running dnsmasq was set. And
here it is wrong, indeed. The default route should be the internal interface
of the network's firewall machine - dnsmasq runs on a "normal" server in the
subnet behind the firewall.
> If that's wrong, then a simple dhcp-option line in
> /etc/dnsmasq.conf will override the default:
>
> dhcp-option=3,10.1.1.223
>
> That's probably all you need.
You're right. :-) Thank you very much!
> > - Does anybody know a link to a good documentation of the DHCP options
> > (preferably with examples!)?
>
> The canonical list (well, apart from new ones defined after it was
> published) is RFC 2132: http://www.faqs.org/rfcs/rfc2132.html
I had found that one (and overlooked that "The default route (0.0.0.0)
is an illegal destination for a static route"). But I found it is not clear
about how exactly these entries should be specified. Maybe because it
specifies the format of the "transmitted packet" of that option. Perhaps how
to specify it depends on the DHCP client.
Anyway, option 33 is the wrong one for my purpose, option 3 is the one I need.
> > That is, other than dnsmasq.conf, which is IMHO very good (for me, a few
> > short examples work better than a detailed & complicated (or too short)
> > description), but dnsmasq.conf does not mention option 33. :P
> >
> > - And to get it on-topic: I don't have to worry about dnsmasq not
> > supporting this, do I? ;-)
>
> Nope, it suppports all of them.
Great! :-)
Thanks & Cheers
Dirk
More information about the Dnsmasq-discuss
mailing list