[Dnsmasq-discuss] dhcp option 121 (classless static routes)

Simon Kelley simon at thekelleys.org.uk
Sun Jun 25 19:44:41 BST 2006


Felix Schwarz wrote:
> Hi all,
> 
> I am using OpenWRT WR RC 5 with dnsmasq 2.27 which is supposed to
> support the dhcp option 121 (classless static routes).
> 
> I put this in my dnsmasq.conf:
> dhcp-option=121,0.0.0.0/0,192.168.0.10,192.168.2.0/24,192.168.0.100
> 
> The first is my default gateway (for backward compatibility also
> specified with option #3), the second my vpn gateway.
> 
> Unfortunately no client (Fedora Core 5) sets the static routes... I
> think that my dhclient does not support it anyway but I suspect that
> dnsmasq fails to set the option correctly.
> 
> I did an "ifdown eth0" on the client, startet ethereal, started
> capturing on all interfaces and entered "ifup eth0".
> 
> #3 is a DHCP ACK packet. Inside this packet I can see different
> options such as 3, 12, 15 but no option #121. Therefore I think the
> setting above if not being sent.
> 
> Can I debug this issue any further? I would like to file bug reports
> for dhclient so that this option is supported in the next version of
> Fedora :-)
> 

The option won't be sent unless the client requests it: Go back to your
packet captures and look for "requested options" in the DHCPDISCOVER or
DHCPREQUEST packets. Unless 121 is in there, dnsmasq won't send it.

If you are using dhclient, then

request option-121

will probably do the trick. Then you just have the problem of using the
data. That's a dhclient problem, and I don't have any expertise, but
someone has at least solved the problem with non-classless routes, see

http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2006q1/000569.html

More help may be forthcoming on the ISC DHCP lists, they're a friendly
bunch. I wouldn't try and use any other client for this. The ISC client
may be a pain, but it is very configurable/scriptable. I doubt any of
the other clients make doing this even possible.

HTH

Simon




More information about the Dnsmasq-discuss mailing list