Issue with PPPoE and defaultroute

For the last few weeks, whenever my pppoe connection was restarted, I have had to disable the defaultroute option on the connection, and re-enable the option (presumably this simply reinstalls the default route) before packets are routed properly (otherwise pings from the router simply times out). I have checked the routing table, and the default route is correctly configured the first time, so I'm not sure why the above was necessary. Here is my network config:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '10.97.2.1'
	option _orig_ifname 'eth0.1 wlan0 wlan1'
	option _orig_bridge 'true'
	option ip6assign '64'
	option ifname 'eth0.1'
	option metric '0'

config switch
	option reset '1'
	option enable_vlan '1'
	option max_length '3'
	option enable_vlan4k '1'
	option name 'switch0'

config switch_vlan
	option vlan '1'
	option ports '0 1 2 3 5t'
	option device 'switch0'

config interface 'modem'
	option proto 'static'
	option ifname 'eth1'
	option ipaddr '192.168.1.2'
	option netmask '255.255.255.0'
	option metric '0'

config interface 'vpn'
	option proto 'none'
	option ifname 'vpns+'

config interface 'wan'
	option proto 'pppoe'
	option password '...'
	option ipv6 'auto'
	option username '...'
	option peerdns '0'
	option keepalive '2 5'
	option ifname 'eth1'

Since you are using a vpn connection it might be the case that the default route from vpn has higher precedence when the pppoe is restarted.
Use specific metrics for both wan and vpn. Separate traffic with the help of policy based routing.

1 Like

I tried your suggest and added gateway metrics. Also tried deleting the vpn interface. Unfortunately, the problem is still there.

Saw this line on the router's System Log after I re-enabled default route on the PPPoE connection, don't know if it's a useful clue:

kern.info kernel: [...] rtl8366s rtl8366s: applying initvals from DTS

Post the following before and after the problem occurs:
ip -4 addr; ip -4 ro list table all; ip -4 ru; ping -4 -c 3 openwrt.org

Doesn't seem relevant.

1 Like