[Dnsmasq-discuss] Length of the classless static routes dhcp-option

Roy Marples roy at marples.name
Wed Jul 8 21:04:54 BST 2020


On 08/07/2020 10:24, Slawek Kaplonski wrote:
> I found out that dhcp-option is only 8 bits so it can be only 255 chars long.
> I also found old email https://www.mail-archive.com/dnsmasq-discuss@lists.thekelleys.org.uk/msg06719.html with advice to use multiple dhcp-option=… fields to workaround this issue. So I did that and now my opts file looks like:
> 
> tag:tag0,option:classless-static-route,172.16.2.1/32,172.16.1.254
> tag:tag0,249,172.16.2.1/32,172.16.1.254
> tag:tag0,option:classless-static-route,172.16.2.10/32,172.16.1.254
> tag:tag0,249,172.16.2.10/32,172.16.1.254
> tag:tag0,option:classless-static-route,172.16.2.11/32,172.16.1.254
> tag:tag0,249,172.16.2.11/32,172.16.1.254
> tag:tag0,option:classless-static-route,172.16.2.12/32,172.16.1.254
> tag:tag0,249,172.16.2.12/32,172.16.1.254
> tag:tag0,option:classless-static-route,172.16.2.13/32,172.16.1.254
> tag:tag0,249,172.16.2.13/32,172.16.1.254
> tag:tag0,option:classless-static-route,172.16.2.14/32,172.16.1.254
> tag:tag0,249,172.16.2.14/32,172.16.1.254
> tag:tag0,option:classless-static-route,172.16.2.15/32,172.16.1.254
> tag:tag0,249,172.16.2.15/32,172.16.1.254
> ….
> 
> But is seems for me that VM always only get last value set in the file. Is there any way to workaround this somehow and allow more static routes to be passed to the instance?

This also depends on the DHCP client in your VM.

AFAIK only two open source DHCP clients support RFC 3396 - dhcpcd and OpenBSD's 
dhclient.

Roy



More information about the Dnsmasq-discuss mailing list