Page MenuHomeVyOS Platform

Error not creating ip route for dhcp-interface rules on boot
Needs testing, NormalPublic

Description

1 scenario as follows:

set interfaces ethernet eth0 address 'dhcp'
set interfaces ethernet eth1 address 'dhcp'
set protocols static table 100 route 0.0.0.0/0 dhcp-interface eth0
set protocols static table 110 route 0.0.0.0/0 dhcp-interface eth1

When I commit:

show ip route table 110
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

VRF default table 110:
S>* 0.0.0.0/0 [1/0] is directly connected, eth1, weight 1, 00:03:07
  *                 via 192.168.1.1, eth1, weight 1, 00:03:07

Then I rebooted (made sure to save)

show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address         MAC                VRF        MTU  S/L    Description
-----------  -----------------  -----------------  -------  -----  -----  -----------------------
eth0         192.168.0.11/24    fa:16:3e:f4:0e:f9  default   1500  u/u    LAN
eth1         192.168.1.11/24    fa:16:3e:ea:49:2f  default   1500  u/u    ZONE-A

show ip route table 110
show ip route table all
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

VRF default table 254:
S>* 0.0.0.0/0 [210/0] via 192.168.0.1, eth0, weight 1, 00:02:09
  *                   via 192.168.1.1, eth1, weight 1, 00:02:09
S>* 169.254.169.254/32 [210/0] via 192.168.0.3, eth0, weight 1, 00:02:09
  *                            via 192.168.1.2, eth1, weight 1, 00:02:09
C>* 192.168.0.0/24 is directly connected, eth0, weight 1, 00:02:17
K * 192.168.0.0/24 [0/0] is directly connected, eth0, weight 1, 00:02:17
L>* 192.168.0.11/32 is directly connected, eth0, weight 1, 00:02:17
C>* 192.168.1.0/24 is directly connected, eth1, weight 1, 00:02:10
K * 192.168.1.0/24 [0/0] is directly connected, eth1, weight 1, 00:02:10
L>* 192.168.1.11/32 is directly connected, eth1, weight 1, 00:02:10

I used to use VyOS Stream 2025 Q1 version, it worked correctly. Recently I switched to VyOS Rolling and it crashed here

Details

Version
862817a7207c5b5d17c67451bac602d296b88230
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

nobiit triaged this task as Normal priority.
nobiit created this object in space S1 VyOS Public.
nobiit changed Version from - to 862817a7207c5b5d17c67451bac602d296b88230.

I found the cause. You need to mark which interface will run it.

set policy route <name> interface <iface>
nobiit claimed this task.
nobiit reopened this task as Needs testing.Jul 4 2025, 3:59 AM

Oh, the problem still persists. I need someone to help, because I only get this error on a few infrastructures.