Page MenuHomeVyOS Platform

Setting a default IPv6 route while getting IPv4 gateway via DHCP removes the IPv4 gateway
Closed, ResolvedPublicBUG

Description

The config is a fresh install from 1.4-rolling-202109160207

  1. DHCP IPv4 address
  2. IPv6 address somewhere. I used a dummy address. But the report came in based on a GRE tunnel and I confirmed with WG too.
  3. Commit. IPv4 is working
  4. Set a static route for ::/0 at the dummy interface, but tunnel interface works too.
  5. Commit and the IPv4 default route is gone.

Config:

image.png (580×905 px, 16 KB)

The behavior:

image.png (652×1 px, 38 KB)

Details

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

Event Timeline

kroy changed Version from 1.4-rolling- to 1.4-rolling-202109160207.
kroy updated the task description. (Show Details)
kroy updated the task description. (Show Details)
kroy renamed this task from Setting a default IPv6 route while getting IPv4 route via DHCP removes the IPv4 route to Setting a default IPv6 route while getting IPv4 route via DHCP removes the IPv4 gateway.Sep 18 2021, 5:27 AM
kroy renamed this task from Setting a default IPv6 route while getting IPv4 route via DHCP removes the IPv4 gateway to Setting a default IPv6 route while getting IPv4 gateway via DHCP removes the IPv4 gateway.

It's worth adding the no-default-route to the dhcp-options and adding a line like

set protocols static route 0.0.0.0/0 interface eth0

Makes it work as expected

Viacheslav claimed this task.
Viacheslav subscribed.

Fixed

S>* 0.0.0.0/0 [210/0] via 192.0.2.1, eth1, weight 1, 00:02:31
C>* 192.0.2.0/24 is directly connected, eth1, 00:02:31
C>* 192.168.122.0/24 is directly connected, eth0, 00:04:09

vyos@r14# set protocols static route6 ::/0 interface dum0 
[edit]
vyos@r14# commit
[edit]
vyos@r14# run show ip route
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

S>* 0.0.0.0/0 [210/0] via 192.0.2.1, eth1, weight 1, 00:02:49
C>* 192.0.2.0/24 is directly connected, eth1, 00:02:49
C>* 192.168.122.0/24 is directly connected, eth0, 00:04:27
[edit]
vyos@r14#