<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-07-01 23:58 GMT+02:00 Albert ARIBAUD <span dir="ltr"><<a href="mailto:albert.aribaud@free.fr" target="_blank">albert.aribaud@free.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Bonjour Michał,<br>
<br>
Le Wed, 1 Jul 2015 23:26:05 +0200, Michał Lipka <michal@lipka.email> a<br>
écrit :<br>
<div><div class="h5"><br>
> 2015-06-30 20:02 GMT+02:00 Albert ARIBAUD <<a href="mailto:albert.aribaud@free.fr">albert.aribaud@free.fr</a>>:<br>
><br>
> > Le Tue, 30 Jun 2015 19:52:26 +0200, Albert ARIBAUD<br>
> > <<a href="mailto:albert.aribaud@free.fr">albert.aribaud@free.fr</a>> a écrit :<br>
> ><br>
> > > Le Tue, 30 Jun 2015 19:48:01 +0200, Albert ARIBAUD<br>
> > > <<a href="mailto:albert.aribaud@free.fr">albert.aribaud@free.fr</a>> a écrit :<br>
> > ><br>
> > > > > yes but RFC 3396 is about "Encoding Long Options in the Dynamic Host<br>
> > > > > Configuration Protocol (DHCPv4)"<br>
> > > ><br>
> > > > Yes, it is. The routes are among these long options.<br>
> > ><br>
> > > Forget that, sorry, heat wave here is making me slip things.<br>
> > ><br>
> > > What I meant to say is, DHCP routes are transmitted as variable-length<br>
> > > options according to RFC 2132 section 2, not RFC 3396 -- do a Wireshark<br>
> > > on some DHCP traffic and you'll see the option with the 8-byte-per-route<br>
> > > entries in the DHCP offer.<br>
> ><br>
> > More to the point, routes in dnsmasq are transmitted as classless<br>
> > static routes (option 121) which are described in RFC 3442 in the<br>
> > binary form that I mentioned.<br>
> ><br>
> ><br>
> So.. is there possibility to transfer more routes than 28 in general?<br>
> apparently dnsmasq doesn't allow to configure more. Am I right?<br>
<br>
</div></div>At the DHCP protocol level, it is not possible to configure more than<br>
31 classless static routes in one option 121, and in theory one of these<br>
should be the default route, which leaves 30 other routes.<br>
<br>
However...<br>
<br>
RFC 2131 section 4.1 : "[...] The values to be passed in an 'option' tag<br>
may be too long to fit in the 255 octets available to a single option<br>
(e.g., a list of routers in a 'router' option [21]). Options may<br>
appear only once, unless otherwise specified in the options document.<br>
The client concatenates the values of multiple instances of the same<br>
option into a single parameter list for configuration."<br>
<br>
So whether one can repeat option 121 depends on another RFC. Let's<br>
track that...<br>
<br>
RFC 3442, which defines option 121 (classless static routes) says "DHCP<br>
clients requesting this option, and DHCP servers sending this option,<br>
MUST implement DHCP option concatenation [5]. In the terminology of RFC<br>
3396 [5], the Classless Static Route Option is a<br>
concatenation-requiring option."<br>
<br>
And RFC 3396 defines a concatenation-requiring option as one whose<br>
content may be spread over several instances of the option in a single<br>
DHCP message.<br>
<br>
Therefore, /in theory/, dnsmasq could "legally" send more than 31<br>
routes by putting several instances of option 121 in the DHCP message<br>
(up to the overall UDP datagram size limit, of course) and DHCP<br>
clients /should/ be able to handle it.<br>
<br>
I do not know, however, whether dnsmasq /actually/ supports splitting<br>
options as per RFC 3396, and if it does, whether it supports splitting<br>
option 121 - you'd have to dig into the code to know this -- or maybe<br>
ask Simon. :)<br>
<br>
Neither do I know which DHCP clients "out there" support RFC 3396.<br></blockquote><div><br></div><div>Albert,</div><div>thank you for detailed answer. Unfortunately providing several dhcp-options to dnsmasq results in the last being applied (not all).</div><div>I will have to cut routes down to 28 or change to isc-dhcpd (if it supports more).</div><div>Thank you once again</div><div><br></div><div>Michal</div></div></div></div>