Page MenuHomeVyOS Platform

Add missing documentation on how to use quote characters inside dhcp-server raw parameters
Closed, ResolvedPublic


Host specific options can be added by raw static-mapping-parameters, but this is ugly, and cannot add string with quote.
this new parameter add options node tag.

static-mapping foo {
    mac-address 00:15:17:44:2D:AA
    option pxelinux.configfile {
        value pxelinux.cfg/01-00-15-17-44-2d-aa

the generated result:

host VLAN7_foo {
    hardware ethernet 00:15:17:44:2D:AA;
    option pxelinux.configfile "pxelinux.cfg/01-00-15-17-44-2d-aa";


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

elbandi created this object in space S1 VyOS Public.

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,;"


set service dhcp-server shared-network-name dhcpexample subnet static-mapping example static-mapping-parameters "option domain-name-servers,;"

The documentation on is lacking the explanation of this option, I have an update on hold for it for when I get some free time.
I have this running on 1.2-rolling, but it should work on all versions.

Your proposed change adds a node which duplicates the functionality of an already existing one (static-mapping-parameters can be used multiple times to add multiple options if so desired). If we'd change the way we do raw parameters, this would need to be done everywhere, and an universal solution would need to take non-option parameters, as well as strings without quotes as values.

Sorry, I misunderstood your issue, indeed adding quotes inside the parameters is not possible now. A reimplementation would be needed.

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.

This was discussed previously:
Use """ which will be replaced with quotes when generating the isc dhcpd config.

I will add that to the docs.

jjakob changed the task status from Open to In progress.Dec 21 2019, 11:54 AM
jjakob triaged this task as Low priority.

Added explanation on how to use quotes inside raw parameters to the docs.

jjakob renamed this task from Host-specific settings for static-mapping in dhcp-server to Add missing documentation on how to use quote characters inside dhcp-server raw parameters.Dec 21 2019, 10:26 PM
jjakob closed this task as Resolved.
jjakob edited projects, added Restricted Project; removed vyatta-cfg-dhcp-server.