Default route for DHCP WAN interface

Hi all, using VyOS 1.4-rolling-202106260417.

I’m trying to set up Wireguard site-to-site using the instructions here. I’m coming unstuck at the line

set protocols static route 192.168.2.0/24 interface wg01

because I haven’t manually configured a default route. The route that is added automatically by the wan-loadbalancing configuration works fine, except that it is removed when I add the static route for wireguard per the instructions and the system ceases to route any traffic outside of the local subnets.

I understand that I can add a default route for an interface with a static IP using

set protocols static route 0.0.0.0/0 next-hop {gateway ip} interface eth0

but is there an equivalent command for in interface with a dynamic IP and non-static gateway? I don’t believe that the next-hop ‘dhcp’ option that is available in the wan load balancing tree is available in the static route tree, and specifying an interface without a gateway doesn’t seem to work either.

Thanks!

It seems this bug T3505

Workaround for missing DHCP default route:

set protocols static route 0.0.0.0/0 dhcp-interface eth0

Thank you both, have resolved for the moment using the information above.

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