Vyatta DHCP server configuration mechanism
Details
Jul 2 2024
Apr 22 2024
The fix mentioned above has been backported to 1.4: T5996.
Apr 18 2024
Mar 19 2024
The fix for values containing single backslashes has been merged for 1.5 in
https://github.com/vyos/vyos1x-config/pull/23
https://github.com/vyos/vyos-1x/pull/3035
Mar 6 2024
There is the task for the bug with "backslashes" T5996
Yes, boot\x86\wdsnbp.com is a proper filename, and this further correctly translates to double backslash in the dhcp.conf file at /run/dhcp-server/dhcpd.conf, as I noted. Why it is so, explained for example here: https://www.linkedin.com/pulse/quit-thinking-look-matthew-topper
And with such a setting network boot works just fine.
The problem is that after each reboot the vyos configuration scripts, I guess, double the number of backslashes in the config, that further leads to doubling them in the dhcp.conf. And on, and on. This actually breaks the network boot, and manual intervention is required after each router reboot.
Is "\" really a valid path for bootfile?
Jan 21 2021
Feb 7 2020
@hexes that's why there is a big banner on top indicating this page is outdated and links you to the new docs.
(It's possible to spy decision on Ubnt, this issue solved there, in attach:)
c-po, thanks a lot, didn't see this trick... There is too much different docs. We need to combine in one place. Here is nothing about quotes... :-( https://wiki.vyos.net/wiki/DHCP_server
Feb 6 2020
Maybe there will be a better option one day. Right now we only have https://github.com/vyos/vyos-1x/blob/current/src/conf_mode/dhcp_server.py#L816
For the time being please see the instructions at https://docs.vyos.io/en/latest/services/dhcp.html#dhcp-server about the pre and post usage of "
Dec 21 2019
Added explanation on how to use quotes inside raw parameters to the docs.
https://github.com/vyos/vyos-documentation/pull/163
Dec 20 2019
Dec 15 2019
This was discussed previously: https://phabricator.vyos.net/T1129
Use """ which will be replaced with quotes when generating the isc dhcpd config.
https://github.com/vyos/vyos-1x/blob/current/src/conf_mode/dhcp_server.py#L813-L815
Dec 13 2019
Yepp, the issue is the quotes in dhcp server config (like the sample line i wrote).
i think, duplicates functionality doesnt matter, there are already such duplications: global-parameters, subnet-parameters, etc. That are for raw settings, if someone want a magic things in dhcp. But adding normal options to static-mapping-parameters are just a workaround.
Sorry, I misunderstood your issue, indeed adding quotes inside the parameters is not possible now. A reimplementation would be needed.
Dec 12 2019
The current static-mapping-parameters can be used to add a quoted value, e.g.
static-mapping test { ip-address x.x.x.x mac-address yy:yy:yy:yy:yy:yy static-mapping-parameters "option domain-name-servers 1.1.1.1, 9.9.9.9;" }
command
set service dhcp-server shared-network-name dhcpexample subnet 192.0.2.0/24 static-mapping example static-mapping-parameters "option domain-name-servers 192.0.2.11, 192.0.2.12;"
Nov 14 2019
Feb 27 2019
e.g. could indeed be tested to make sure that it works
I think the issue you found might still be a valid one, even though it was not the same one that was originally talked about on IRC.
Needs more testing. I might have been testing the wrong thing. :(