Delay wan_6 interface startup when wan interface is up

I use pppoe connection (fiber) and to use custom dns servers i created an interface wan_6 manually on /etc/config/network. The wan and wan_6 configurations are those:

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'pppoe'
        option password 'cliente'
        option ipv6 'auto'
        option username 'cliente@cliente'
        option peerdns '0'
        list dns '8.8.8.8'
        list dns '1.1.1.1'
        list dns '208.67.222.222'

config interface 'wan_6'
        option ifname '@wan'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option peerdns '0'
        list dns '2001:4860:4860::8888'
        list dns '2606:4700:4700::1111'
        list dns '2620:119:35::35'
        option reqprefix 'auto'

When wan goes up wan_6 is not properly starting, and my network dont have ipv6 connectivity. I need to manually restart wan_6 to get ipv6 working again.

I was trying to delay wan_6 initialization when wan is up but cant find a way to do it. Anyone know how to do it? Or if there is another solution for this problem?

Upgrade OpenWrt to the latest stable release and try this:

uci set network.wan.ipv6="0"
uci commit network
/etc/init.d/network restart

Use hotplug if the issue persists:
https://openwrt.org/docs/guide-user/base-system/hotplug

1 Like