PR: https://github.com/vyos/vyos-1x/pull/4318
Test system image: 1.5-rolling-202501250006
brief:
- no pppoe: static route works
- add pppoe interface
- change static route: not working
I use 192.168.51.0/24 for test.
vyos@vyos# show protocols static route 192.168.51.0/24 interface eth0 { } interface lo { distance 10 } [edit] vyos@vyos# delete protocols static route 192.168.51.0/24 interface lo [edit] vyos@vyos# commit [edit] vyos@vyos# ip route show default nhid 10 via 192.168.12.1 dev eth0 proto static metric 20 192.168.12.0/24 dev eth0 proto kernel scope link src 192.168.12.70 192.168.10.0/24 nhid 10 via 192.168.12.1 dev eth0 proto static metric 20 192.168.51.0/24 nhid 7 dev eth0 proto static metric 20 [edit] # 192.168.51.0/24 dev eth0 appears above vyos@vyos# delete protocols static route 192.168.51.0/24 interface eth0 [edit] vyos@vyos# set protocols static route 192.168.51.0/24 interface lo [edit] vyos@vyos# commit [edit] vyos@vyos# ip route show default nhid 10 via 192.168.12.1 dev eth0 proto static metric 20 192.168.12.0/24 dev eth0 proto kernel scope link src 192.168.12.70 192.168.10.0/24 nhid 10 via 192.168.12.1 dev eth0 proto static metric 20 192.168.51.0/24 nhid 13 dev lo proto static metric 20 [edit] # 192.168.51.0/24 changed to dev lo vyos@vyos# show interfaces pppoe Configuration under specified path is empty [edit] vyos@vyos# set interfaces pppoe pppoe0 authentication username test [edit] vyos@vyos# set interfaces pppoe pppoe0 authentication password test [edit] vyos@vyos# set interfaces pppoe pppoe0 source-interface eth1 [edit] vyos@vyos# commit [edit] # pppoe added above, I tested on my vyos env (with a working pppoe config) and then using live image for minimum test env ( with random config). vyos@vyos# ip route show default nhid 10 via 192.168.12.1 dev eth0 proto static metric 20 192.168.12.0/24 dev eth0 proto kernel scope link src 192.168.12.70 192.168.10.0/24 nhid 10 via 192.168.12.1 dev eth0 proto static metric 20 192.168.51.0/24 nhid 13 dev lo proto static metric 20 [edit] # now try to change route vyos@vyos# delete protocols static route 192.168.51.0/24 interface lo [edit] vyos@vyos# set protocols static route 192.168.51.0/24 interface eth0 [edit] vyos@vyos# commit [edit] vyos@vyos# ip route show default nhid 10 via 192.168.12.1 dev eth0 proto static metric 20 192.168.12.0/24 dev eth0 proto kernel scope link src 192.168.12.70 192.168.10.0/24 nhid 10 via 192.168.12.1 dev eth0 proto static metric 20 192.168.51.0/24 nhid 13 dev lo proto static metric 20 [edit] vyos@vyos# # not changed