Page MenuHomeVyOS Platform

Static routing tables are not created with dhcp route
Needs testing, NormalPublicBUG


Static tables don't appear to be created in latest 1.4 when using dhcp-interface route

vyos@vyos# show protocols static table 200
 route {
     dhcp-interface eth1
vyos@vyos# run show ip route table 200
vyos@vyos# ip route list table 200
Error: ipv4: FIB table does not exist.
Dump terminated


vyos@vyos:~$ show int eth eth1
eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether xx:xx:xx:xx:xx:09 brd xx:xx:xx:xx:xx:ff
    inet brd scope global dynamic eth1


Difficulty level
Unknown (require assessment)
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

sarthurdev renamed this task from Static routing tables are not created to Static routing tables are not created with dhcp route.May 3 2023, 10:46 PM
sarthurdev updated the task description. (Show Details)

Works in my test

set protocols static table 200 route dhcp-interface 'eth4'

Show ip route

vyos@vyos2:~$ vtysh -c "show ip route table 200"
Codes: K - kernel route, C - connected, 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,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF default table 200:
S>* [1/0] via 10.x.x.254, eth4, weight 1, 00:35:46

Did you execute renew dhcp interface ethX after adding route?

It might be a boot/slow DHCP lease issue.

The conf script checks at runtime for a dhcp router. At boot, the lease might not exist yet and no route is created.

I think we need to add a dhcp client hook to call to refresh any dhcp based routes.

This comment was removed by Viacheslav.
Viacheslav changed the task status from Open to Needs testing.Jan 20 2024, 12:35 PM
Viacheslav triaged this task as Normal priority.

@sdev Can you reproduce it?