Page MenuHomeVyOS Platform

Listen-address in DHCP-server when going VyOS 1.4 to 1.5 will cause problems
Open, NormalPublicBUG

Description

It seems like the migrationscript might needs to get updated regarding DHCP-server when going from VyOS 1.4 to 1.5.

The issue seems to be with set service dhcp-server listen-address 'x.x.x.x' which will make the DHCP-server to fail to behave properly and some configrows will be deleted aswell.

The issue could of course be located elsewhere but triggered by the listen-address config.

For more information see:

https://forum.vyos.io/t/dhcp-not-serving-non-static-leases-1-5-rolling/14351/10

Details

Version
VyOS 1.5-rolling-202404290019
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

syncer triaged this task as Normal priority.
syncer subscribed.

Migration needed for listen-address when upgrading from isc-dhcp to kea dhcp (1.4 to 1.5)

Hi Team,

Please see the attached files for the findings regarding the DHCP Migration issue from VyOS 1.4 to 1.5.

Note: I attached screenshots of the VyOS outputs and Wireshark output in the Word file so that it would be easier to check.

1.4 DHCP Configuration
vyos@R1:~$ show configuration commands | match dhcp-server
set service dhcp-server listen-address '192.168.1.1'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 default-router '192.168.1.1'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 name-server '8.8.8.8'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 range rangr start '192.168.1.10'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 range rangr stop '192.168.1.250'
vyos@R1:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address MAC VRF MTU S/L Description


eth0 10.10.10.1/24 0c:46:47:5b:00:00 default 1500 u/u

192.168.1.1/24

eth1 - 0c:46:47:5b:00:01 default 1500 u/D
eth2 - 0c:46:47:5b:00:02 default 1500 u/D
eth3 - 0c:46:47:5b:00:03 default 1500 u/D
eth4 - 0c:46:47:5b:00:04 default 1500 u/D
eth5 - 0c:46:47:5b:00:05 default 1500 u/D
eth6 - 0c:46:47:5b:00:06 default 1500 u/D
eth7 - 0c:46:47:5b:00:07 default 1500 u/D
eth8 - 0c:46:47:5b:00:08 default 1500 u/D
eth9 10.217.32.150/24 0c:46:47:5b:00:09 default 1500 u/u
lo 127.0.0.1/8 00:00:00:00:00:00 default 65536 u/u

1.5 DHCP Configuration : After Upgrade from 1.4 to 1.5

vyos@R1:~$ show configuration commands | match dhcp-server
set service dhcp-server listen-address '192.168.1.1'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 option default-router '192.168.1.1'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 option name-server '8.8.8.8'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 range rangr start '192.168.1.10'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 range rangr stop '192.168.1.250'
set service dhcp-server shared-network-name LAN subnet 192.168.1.0/24 subnet-id '1'
vyos@R1:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address MAC VRF MTU S/L Description


eth0 10.10.10.1/24 0c:46:47:5b:00:00 default 1500 u/u

192.168.1.1/24

eth1 - 0c:46:47:5b:00:01 default 1500 u/D
eth2 - 0c:46:47:5b:00:02 default 1500 u/D
eth3 - 0c:46:47:5b:00:03 default 1500 u/D
eth4 - 0c:46:47:5b:00:04 default 1500 u/D
eth5 - 0c:46:47:5b:00:05 default 1500 u/D
eth6 - 0c:46:47:5b:00:06 default 1500 u/D
eth7 - 0c:46:47:5b:00:07 default 1500 u/D
eth8 - 0c:46:47:5b:00:08 default 1500 u/D
eth9 10.217.32.132/24 0c:46:47:5b:00:09 default 1500 u/u
lo 127.0.0.1/8 00:00:00:00:00:00 default 65536 u/u

::1/128

vyos@R1:~$

Summary:

After upgrading from VyOS 1.4 to 1.5, DHCP stops working for directly connected clients if the service dhcp-server listen-address is configured. VyOS 1.4 uses ISC DHCP, which handles listen-address with a raw socket, so LAN clients are still served. VyOS 1.5 uses Kea, which switches to UDP-only sockets when listen-address is set ("dhcp-socket-type": "udp"). UDP sockets can’t receive broadcasts from directly connected clients, so only relayed traffic works. The migration script doesn’t handle this: it has no migration from listen-address to listen-interface, so the option is carried over unchanged and breaks DHCP.