Tested in VyOS 1.4-rolling-202201060842 & VyOS 1.3.0
DHCP server parameter "client-prefix-length '24'" results in a mask of 0.0.0.24 on the client, instead of 255.255.255.0
To reproduce:
Server:
set interfaces ethernet eth0 address '10.1.1.1/24' set service dhcp-server shared-network-name DHCP_SCOPE subnet 10.1.1.0/24 client-prefix-length '24' set service dhcp-server shared-network-name DHCP_SCOPE subnet 10.1.1.0/24 default-router '10.1.1.1' set service dhcp-server shared-network-name DHCP_SCOPE subnet 10.1.1.0/24 range CLIENT_RANGE start '10.1.1.50' set service dhcp-server shared-network-name DHCP_SCOPE subnet 10.1.1.0/24 range CLIENT_RANGE stop '10.1.1.250'
Client:
set interfaces ethernet eth0 address 'dhcp'
Result on client:
vyos@vyos:~$ show dhcp client lease interface : eth0 ip address : 10.1.1.50 [Inactive] subnet mask: 0.0.0.24 router : 10.1.1.1 dhcp server: 10.1.1.1 lease time : 85809 last update: Thu Jan 20 03:21:47 UTC 2022 expiry : Fri Jan 21 03:11:56 UTC 2022 reason : BOUND
As a workaround the "client-prefix-length 24" command can be removed:
set interfaces ethernet eth0 address '10.1.1.1/24' set service dhcp-server shared-network-name DHCP_SCOPE subnet 10.1.1.0/24 default-router '10.1.1.1' set service dhcp-server shared-network-name DHCP_SCOPE subnet 10.1.1.0/24 range CLIENT_RANGE start '10.1.1.50' set service dhcp-server shared-network-name DHCP_SCOPE subnet 10.1.1.0/24 range CLIENT_RANGE stop '10.1.1.250'
With this configuration the client gets the correct leases