Page MenuHomeVyOS Platform

DHCP Server on VIF interfaces
Closed, ResolvedPublicBUG

Description

The dhcp server does not listen or respond on VIF interfaces (e.g. eth6.42)

If the file /etc/default/isc-dhcp-server is edited by hand by changing the INTERFACES="" parameter to contain the interfaces then the DHCP server works correctly. This fix is temporary, as the dhcp_server.py script overwrites the configuration files when there is a change to the dhcp-server configuration in VyOS

The best solution that I can think of would actually be to add the options in the cli for "linterfaces" and allow it to have multiple interfaces listed. Something like the following:

service {

dhcp-server {
 
   interface
       eth0
       eth1
       eth6.42    

    shared-network-name IRC-Chat-Test {
        description testing-eth6.42
        subnet 172.16.24.0/24 {
            default-router 172.16.24.1
            dns-server 8.8.8.8
            dns-server 8.8.4.4
            range IRC-Test {
                start 172.16.24.100
                stop 172.16.24.111
            }
        }
    }

This listen Interface should be an optional setting. If interface has a value the /etc/default/isc-dhcp-server should be updated with the falues to make the file look like

INTERFACES="eth0 eth1 eth6.42"

Details

Difficulty level
Unknown (require assessment)
Version
1.2
Why the issue appeared?
Will be filled on close

Event Timeline

tmartinson claimed this task.

Needs more testing. I might have been testing the wrong thing. :(

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.

Looks like the dhcp server config doesn't even try to populate INTERFACES: https://github.com/vyos/vyos-1x/blob/f0084de554d71d0f011c7fd2c6009f1864bd9d77/src/conf_mode/dhcp_server.py#L234

Some sources say that the interfaces need to be specified: https://help.ubuntu.com/community/isc-dhcp-server
On the other hand some people say that it should be left to "": https://raspberrypi.stackexchange.com/questions/8614/isc-dhcp-server-install-and-run-problem

e.g. could indeed be tested to make sure that it works