Page MenuHomeVyOS Platform

Dhcp bug in latest 1.5 rolling releases
Closed, ResolvedPublicBUG

Description

The dhcp server just stops giving out addresses and some clients have ip address others don't .
Only when fresh install of a rolling release it works ,but upgrading it breaks dhcp server tried with many versions since 2 weeks
Also here is the status

Admin@vyos:~$ show dhcp server leases

WARNING: DHCP server is configured but not started. Data may be stale.

IP Address MAC address State Lease start Lease expiration Remaining Pool Hostname Origin


Details

Difficulty level
Unknown (require assessment)
Version
1.5-rolling-202312261220
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Thank you for the report.

DHCP is undergoing heavy plumbing in 1.5 (moving to KEA DHCP server)

What I noticed is whenever you update rolling versions it breaks dhcp ,but when you make a new install it is fine.
Just to report back

Still issue persists when u create a new install its fine but upgrading breaks dhcp server ,tried in latest rolling releases ๐Ÿ˜ข why no solution??? YET...........

Can you provide your DHCP server config?

This comment was removed by himurae.

Complete config
Admin@vyos:~$ show dhcp server leases

WARNING: DHCP server is configured but not started. Data may be stale.

IP Address MAC address State Lease start Lease expiration Remaining Pool Hostname Origin


show configuration commands | strip-private
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id 'xx:xx:xx:xx:xx:ce'
set interfaces ethernet eth0 offload gro
set interfaces ethernet eth0 offload gso
set interfaces ethernet eth0 offload lro
set interfaces ethernet eth0 offload rfs
set interfaces ethernet eth0 offload rps
set interfaces ethernet eth0 offload sg
set interfaces ethernet eth0 offload tso
set interfaces ethernet eth0 ring-buffer rx '4096'
set interfaces ethernet eth0 ring-buffer tx '4096'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth1 address 'xxx.xxx.10.1/24'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id 'xx:xx:xx:xx:xx:cf'
set interfaces ethernet eth1 offload gro
set interfaces ethernet eth1 offload gso
set interfaces ethernet eth1 offload lro
set interfaces ethernet eth1 offload rfs
set interfaces ethernet eth1 offload rps
set interfaces ethernet eth1 offload sg
set interfaces ethernet eth1 offload tso
set interfaces ethernet eth1 ring-buffer rx '4096'
set interfaces ethernet eth1 ring-buffer tx '4096'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth2 hw-id 'xx:xx:xx:xx:xx:d0'
set interfaces ethernet eth3 hw-id 'xx:xx:xx:xx:xx:d1'
set interfaces ethernet eth4 hw-id 'xx:xx:xx:xx:xx:d2'
set interfaces ethernet eth5 hw-id 'xx:xx:xx:xx:xx:d3'
set interfaces loopback lo
set interfaces pppoe pppoe0 authentication password xxxxxx
set interfaces pppoe pppoe0 authentication username xxxxxx
set interfaces pppoe pppoe0 ip adjust-mss 'clamp-mss-to-pmtu'
set interfaces pppoe pppoe0 source-interface 'eth0'
set nat source rule 100 source address 'xxx.xxx.10.0/24'
set nat source rule 100 translation address 'masquerade'
set service dhcp-server shared-network-name xxxxxx subnet xxx.xxx.10.0/24 default-router 'xxx.xxx.10.1'
set service dhcp-server shared-network-name xxxxxx subnet xxx.xxx.10.0/24 domain-name xxxxxx
set service dhcp-server shared-network-name xxxxxx subnet xxx.xxx.10.0/24 name-server 'xxx.xxx.10.1'
set service dhcp-server shared-network-name xxxxxx subnet xxx.xxx.10.0/24 range 0 start 'xxx.xxx.10.10'
set service dhcp-server shared-network-name xxxxxx subnet xxx.xxx.10.0/24 range 0 stop 'xxx.xxx.10.254'
set service dns forwarding allow-from 'xxx.xxx.10.0/24'
set service dns forwarding cache-size '0'
set service dns forwarding listen-address 'xxx.xxx.10.1'
set service dns forwarding name-server xxx.xxx.70.25
set service dns forwarding name-server xxx.xxx.71.25
set service ntp allow-client xxxxxx 'xxx.xxx.0.0/0'
set service ntp allow-client xxxxxx '::/0'
set service ntp server xxxxx.tld
set service ntp server xxxxx.tld
set service ntp server xxxxx.tld
set service ssh listen-address 'xxx.xxx.10.1'
set service ssh port '22'
set system config-management commit-revisions '100'
set system conntrack expect-table-size '10485760'
set system conntrack hash-size '10485760'
set system conntrack modules ftp
set system conntrack modules h323
set system conntrack modules nfs
set system conntrack modules pptp
set system conntrack modules sip
set system conntrack modules sqlnet
set system conntrack modules tftp
set system conntrack table-size '10485760'
set system console device ttyS0 speed '115200'
set system host-name xxxxxx
set system ip arp table-size '32768'
set system ip multipath layer4-hashing
set system login user xxxxxx authentication encrypted-password xxxxxx
set system login user xxxxxx authentication encrypted-password xxxxxx
set system login user xxxxxx authentication plaintext-password xxxxxx
set system name-server 'xxx.xxx.1.1'
set system syslog global facility all level 'info'
set system syslog global facility local7 level 'debug'
set system time-zone 'Asia/Dubai'

same issue. but as a work around, instead of reinstalling, have you tried clearing /config/dhcp folder and create empty dhcp4-leases.csv dhcp4-leases.csv.2 with _kea:_kea permission.

Is this still an issue on newer rolling images? This PR addresses ownership issues in /config on system update: https://github.com/vyos/vyos-1x/pull/2731

Yes I tested again upgrading with today's latest rolling release no ip address is served to clients so issue persists no changes

Can you please paste the output of ls -ld /config/dhcp and ls -l /config/dhcp. It is possible you might have installed a version _before_ 1.5-rolling-202401030023 and the instance is carrying forward the misconfigured directory/file persmissions.

Hi, If it helps

I have just upgraded a DHCP Server VM from 1.5-rolling-202312080024 to 1.5-rolling-202401080717
and a DHCP Client VM from 1.5-rolling-202310120020 to 1.5-rolling-202401080717

DHCP is still working. Only a quick release /renew on a single client I know but it might help.

SteveP

Can you please paste the output of ls -ld /config/dhcp and ls -l /config/dhcp. It is possible you might have installed a version _before_ 1.5-rolling-202401030023 and the instance is carrying forward the misconfigured directory/file persmissions.

Admin@vyos:~$ ls -ld /config/dhcp
drwxrwxr-x 2 root vyattacfg 4096 Jan  9 20:51 /config/dhcp
Admin@vyos:~$ ls -l /config/dhcp
total 8
-rw-r--r-- 1 _kea _kea 367 Jan  9 21:35 dhcp4-leases.csv
-rw-r--r-- 1 _kea _kea 721 Jan  9 20:51 dhcp4-leases.csv.2

now this output is from a fresh install i made with latest rolling release do you see any difference in configurations/ permissions ?

vyos@vyos:~$ ls -l /config/dhcp
total 4
-rw-r--r-- 1 _kea _kea 688 Jan  9 22:09 dhcp4-leases.csv
vyos@vyos:~$ ls -ld /config/dhcp
drwxrwxr-x 2 root vyattacfg 4096 Jan  9 22:07 /config/dhcp

Version: VyOS 1.5-rolling-202401090834
Release train: current

Built by: [email protected]
Built on: Tue 09 Jan 2024 10:30 UTC
Build UUID: 350f1f79-e581-4dd2-956c-36b7ef1c5e5c
Build commit ID: 92195009af863c

Architecture: x86_64
Boot via: installed image
System type: bare metal

@himurae, Permission and ownership of config directory and files and fine. If you are still seeing the DHCP leases not being created, something else is probably going on.

@sdev, any idea what is happening here?

Finally it seemed to be fixed in the VyOS 1.5-rolling-202401090834 version I updated today to latest rolling and its fine now ๐Ÿ‘Œ

Viacheslav changed the task status from Open to Needs testing.Jan 19 2024, 11:41 PM
Viacheslav added a subscriber: Viacheslav.

Can we close it?

Viacheslav claimed this task.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.