Dhcp-client ignores default-route-distance

Aloha,
maybe I dont understand the concept or there’s something wrong.
I have one VyOS Router with 3 I-Net Uplinks.
First link has static IP-address and static default-route configured on ETH1
Second and third get IP-address via DHCP with a default route.
I like to set higher default-route-distance for each DHCP learned default-route, but it looks to me, that the setting is ignored.

My config:

ETH1 is my primary Uplink with static IP and static default route

set protocols static route 0.0.0.0/0 next-hop 192.1.1.1
set interfaces ethernet eth1 address ‘192.1.1.0/24’

ETH0 is my 2. backup link with DHCP learned IP-address and default route

it should be used, only after ETH6 is down

set interfaces ethernet eth0 address ‘dhcp’
set interfaces ethernet eth0 description ‘VOLIA’
set interfaces ethernet eth0 dhcp-options default-route-distance ‘200’

ETH6 is my 3. backup link with DHCP learned IP-address and default route

But this should be used, when my primary link is down

set interfaces ethernet eth6 address ‘dhcp’
set interfaces ethernet eth6 description ‘STARLINK’
set interfaces ethernet eth6 dhcp-options default-route-distance ‘150’

Here show command, which shows the default route learned:

uaiev:~$ sh ip route 0.0.0.0/0
Routing entry for 0.0.0.0/0
Known via “static”, distance 1, metric 0, best
Last update 01:47:09 ago

  • 192.1.1.1, via eth1, weight 1

Routing entry for 0.0.0.0/0
Known via “static”, distance 210, metric 0, tag 210
Last update 03:12:02 ago
82.144.205.1, via eth0, weight 1
100.64.0.1, via eth6, weight 1

Maybe my understanding of using this default-route-distance is wrong?

Thanks
Marcel

You have to reconnect by dhcp

Morning,
Hm, even after disabling and enabling the 2 interfaces, which are DHCP enabled, the distance stays the same:

sh ip route 0.0.0.0/0
Routing entry for 0.0.0.0/0
Known via “static”, distance 1, metric 0, tag 210, best
Last update 00:00:32 ago

  • 193.93.76.1, via eth1, weight 1
  • 100.64.0.1, via eth6, weight 1

Routing entry for 0.0.0.0/0
Known via “static”, distance 200, metric 0, tag 210
Last update 00:03:20 ago
82.144.205.1, via eth0, weight 1

Which version?
show version

Sorry, my bad to forget it:

sh vers

Version: VyOS 1.4-rolling-202202080317
Release train: sagitta

Built by: autobuild@vyos.net
Built on: Tue 08 Feb 2022 03:17 UTC
Build UUID: 3ca778de-e090-4c59-b7b1-62dbab5c820d
Build commit ID: db3571d7b18c04

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

try newer versions (tested on VyOS 1.4-rolling-202211180318 and VyOS 1.4-rolling-202211280318)

vyos@r1:~$ show ip route 0.0.0.0
Routing entry for 0.0.0.0/0
  Known via "static", distance 123, metric 0, tag 210, best
  Last update 00:00:11 ago
  * 10.x.x.x, via eth4, weight 1
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.