[OpenWrt-Devel] [PATCH] netifd: Request DHCP option 121 (classless route) by default

Baptiste Jonglez baptiste at bitsofnetworks.org
Wed Nov 18 05:11:49 EST 2015


Hi,

On Wed, Nov 18, 2015 at 10:32:11AM +0100, Hans Dedecker wrote:
> It's not always desirable to request option 121 by default. Some ISPs
> explicitly demand not to request option 121;

Interesting, do you have any reference?  Reading RFC 2131 (especially the
end of section 4.3.1), it seems to me that a DHCP server that does not
know about option 121 will just ignore the request.

> therefore it's better to specify the option explicitly in the reqopts
> parameter if needed.

That's what we do right now, since our DHCP servers attribute addresses as
/32 subnets; however, it would be much easier if OpenWRT clients worked
out-of-the-box on our network.

> Bye,
> Hans

Thanks,
Baptiste

> On Wed, Nov 18, 2015 at 12:33 AM, Baptiste Jonglez <
> baptiste at bitsofnetworks.org> wrote:
> 
> > From: Baptiste Jonglez <git at bitsofnetworks.org>
> >
> > This option is very useful when the gateway configured by DHCP cannot
> > be in the same subnet as the client.  This happens, for instance, when
> > using DHCP to hand out addresses in /32 subnets.
> >
> > Signed-off-by: Baptiste Jonglez <git at bitsofnetworks.org>
> > ---
> >  package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
> > b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
> > index 0e88af9..1eb8010 100755
> > --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
> > +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
> > @@ -38,6 +38,8 @@ proto_dhcp_setup() {
> >                 append dhcpopts "-x $opt"
> >         done
> >
> > +       # Classless route option, see RFC 3442
> > +       append dhcpopts "-O 121"
> >         [ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
> >         [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" ||
> > clientid="-C"
> >         [ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
> > --
> > 1.9.1
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20151118/cfcca184/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list