Page MenuHomeVyOS Platform

DHCP does not properly support dhcp option 67 (boot-file-name)
Closed, ResolvedPublicBUG

Description

The documentation seems to indicate that vyos supports option 67 using the following configuration

dhcp-server {
    listen-interface eth1
    shared-network-name workInt {
        authoritative
        description test
        subnet 192.168.128.0/22 {
            option {
                bootfile-name http://this-is-the-bootfile-name.local
                default-router 192.168.128.1
                name-server 192.168.128.1
                time-server 192.168.128.1
            }
            range main {
                start 192.168.128.100
                stop 192.168.131.100
            }
            subnet-id 128
        }
    }
}

which added the following config (minus the commented out block) to /run/kea/kea-dhcp4.conf

{
"name": "workInt",
"authoritative": true,
"subnet4": [
    {
        "subnet": "192.168.128.0/22",
        "id": 128,
        "user-context": {
            "enable-ping-check": false
        },
        "option-data": [
            //{
            //    "name": "boot-file-name",
            //    "data": "http://this-is-the-option.local"
            //},
            {
                "name": "domain-name-servers",
                "data": "192.168.128.1"
            },
            {
                "name": "time-servers",
                "data": "192.168.128.1"
            },
            {
                "name": "routers",
                "data": "192.168.128.1"
            }
        ],
        "boot-file-name": "http://this-is-the-bootfile-name.local",
        "valid-lifetime": 86400,
        "max-valid-lifetime": 86400,
        "pools": [
            {
                "pool": "192.168.128.100 - 192.168.131.100"
            }
        ]
    }

packet captures show that this configuration only sets the legacy bootp filename option, not option 67. adding the commented out block above and restarting the daemon results in option 67 being configured and sent to the client.

I can provide the packet captures if desired, and happy to take a crack at a PR for it, however messing in /lib/python3/dist-packages/vyos and /usr/share/vyos/templates/ in an attempt to get the option added have not yielded config changes, so i suspect i'm looking in the wrong place

Details

Version
rolling
Is it a breaking change?
Behavior change
Issue type
Bug (incorrect behavior)

Event Timeline

@fatpelt There is a template for the DHCP-server https://github.com/vyos/vyos-1x/blob/current/data/templates/dhcp-server/kea-dhcp4.conf.j2
Let us know if you have any questions or want to claim the task.

i'd love to take the task, but think i need a couple more pointers. when i look at that template: /usr/share/vyos/templates/dhcp-server/kea-dhcp4.conf.j2 it has the following block

{% if shared_network_name is vyos_defined %}
        "shared-networks": {{ shared_network_name | kea_shared_network_json }}
{% endif %}

i look for the python code defining the kea_shared_network_json and see it in /lib/python3/dist-packages/vyos/template.py which then imports vyos/kea.py. if i edit that python, to set the option, save, then make a change to the dhcp config and commit, i don't get any changes to the generated kea config file.

so either there is a different set of files to look at, or there is some regen that i'm not doing that will cause vyos to pick up that python change. maybe, would i need to reboot (at which point changes to /lib would probably go away.

If you do systemctl stop vyos-configd it will load your changes to the python scripts on commit.

sarthurdev changed the task status from Open to In progress.Mar 24 2026, 8:28 PM
sarthurdev assigned this task to fatpelt.