[Dnsmasq-discuss] DHCP option 121, handling of interface address

Simon Kelley simon at thekelleys.org.uk
Sat Jun 2 13:53:34 BST 2018


0.0.0.0 as router address in an option-121 is defined in the RFC to mean
something different, so substituting it in dnsmasq would be bad. quote
RFC 3442


Local Subnet Routes

   In some cases more than one IP subnet may be configured on a link.
   In such cases, a host whose IP address is in one IP subnet in the
   link could communicate directly with a host whose IP address is in a
   different IP subnet on the same link.  In cases where a client is
   being assigned an IP address on an IP subnet on such a link, for each
   IP subnet in the link other than the IP subnet on which the client
   has been assigned the DHCP server MAY be configured to specify a
   router IP address of 0.0.0.0.

   For example, consider the case where there are three IP subnets
   configured on a link: 10.0.0/24, 192.168.0/24, 10.0.21/24.  If the
   client is assigned an IP address of 10.0.21.17, then the server could
   include a route with a destination of 10.0.0/24 and a router address
   of 0.0.0.0, and also a route with a destination of 192.168.0/24 and a
   router address of 0.0.0.0.

   A DHCP client whose underlying TCP/IP stack does not provide this
   capability MUST ignore routes in the Classless Static Routes option
   whose router IP address is 0.0.0.0.  Please note that the behavior
   described here only applies to the Classless Static Routes option,
   not to the Static Routes option nor the Router option.


There's no obvious solution to this one.


Cheers,

Simon.



On 27/04/18 12:34, Olaf Hering wrote:
> I had to add DHCP option 121 to server an extra network to the clients in case one of the clients has to use USB tethering via the mobile phone.
> Therefore I added this line, and all is (almost) fine:
> 
> dhcp-option=option:classless-static-route,$other_local_net/24,$interface_IP
> 
> But it is not possible to set $interface_IP to 0.0.0.0 to indicate that dnsmasq should put in the IPv4 address of the interface from which it serves the DHCP requests. This is done for a few other DHCP options like default-router, TFTP server and the like.
> 
> Is this just an oversight, or would there be any downside in handling the "wildcard" in "classless-static-route"?
> 
> Olaf
> 
> 
> 
> _______________________________________________as
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20180602/19cac805/attachment.sig>


More information about the Dnsmasq-discuss mailing list