Page MenuHomeVyOS Platform

Issue with dhcp-interface routes
Open, NormalPublicBUG

Description

DHCP route disappears after reboot.

Check DHCP client:

vyos@vyos:~$ show dhcp client leases 
Interface    eth0
IP address   192.168.122.199               [Active]
Subnet Mask  255.255.255.0
Domain Name
Router       192.168.122.1
Name Server  192.168.122.1
DHCP Server  192.168.122.1
DHCP Server  3600
VRF          default
Last Update  Fri May 23 17:51:13 UTC 2025
Expiry       Fri May 23 18:51:13 UTC 2025

Adding a route to the configuration:

vyos@vyos:~$ conf
[edit]
vyos@vyos# set protocols static route 192.0.2.0/24 dhcp-interface eth0 
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# save
[edit]
vyos@vyos# exit

Check routing table:

vyos@vyos:~$ show ip route 
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

S>* 0.0.0.0/0 [210/0] via 192.168.122.1, eth0, weight 1, 00:00:43
S>* 192.0.2.0/24 [1/0] via 192.168.122.1, eth0, weight 1, 00:00:43
C>* 192.168.122.0/24 is directly connected, eth0, weight 1, 00:03:08
K * 192.168.122.0/24 [0/0] is directly connected, eth0, weight 1, 00:03:08
L>* 192.168.122.199/32 is directly connected, eth0, weight 1, 00:03:08

After reboot:

vyos@vyos:~$ show ip route 
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

S>* 0.0.0.0/0 [210/0] via 192.168.122.1, eth0, weight 1, 00:00:44
C>* 192.168.122.0/24 is directly connected, eth0, weight 1, 00:00:44
K * 192.168.122.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:44
L>* 192.168.122.199/32 is directly connected, eth0, weight 1, 00:00:44

Details

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