`set protocols static route` with `dhcp-interface` does not seem to work with pppoe interfaces

I’ve got two upstream connections:

  • fiber connection that uses pppoe
  • cellular modem and router, that is serving an internet connection to my vyos router from 172.16.5.1

I’m trying to setup default routes for both interfaces (also have wan-load-balancing setup, but I don’t think that’s related to the issue at hand):

set protocols static route 0.0.0.0/0 dhcp-interface pppoe0
set protocols static route 0.0.0.0/0 next-hop 172.16.5.1 distance 100

However, no route appears to be setup for the pppoe0 interface:

$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             -                                 u/u  CenturyLink WAN (Managed by Ansible)
eth0.201         -                                 u/u  CenturyLink PPPOE (Managed by Ansible)
eth2             172.16.5.2/24                     u/u  Cellular WAN (Managed by Ansible)
pppoe0           10.100.1.101/32                   u/u
$ 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, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route
S>* 0.0.0.0/0 [100/0] via 172.16.5.1, eth2, 00:26:21
C>* 10.100.1.1/32 is directly connected, pppoe0, 00:26:00
$ netstat -rd
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         172.16.5.1      0.0.0.0         UG        0 0          0 eth2
10.100.1.1      0.0.0.0         255.255.255.255 UH        0 0          0 pppoe0

I would expect a default route to be created via 10.100.1.1, much like the default route created via 172.16.5.1, however it doesn’t get created. I’ve tested this in a vm with a more typical ethernet interface, and the route does get created with a dhcp address.

I’ve removed irrelevant interfaces from the above output. I’m using this ansible playbook to configure it, so you can see all the commands that are being run if needed.

PPPoE don’t use DHCP to obtain IP address. You should use interface based routing:

set protocols static interface-route 0.0.0.0/0 next-hop-interface pppoe0

That’s a good point. I think I managed to confuse myself because the pppoe server has a pool of addresses to assign.

Is it not a bug, however, that vyos doesn’t give an error if you try to configure a route to a DHCP interface that doesn’t have a DHCP address configuration upon commit?