`wan6` fails to get DHCPv6 IP address and PD on boot

Whenever my Turris Omnia reboots, it fails to bring up the wan6 interface and get an IP address and prefix delegation.

I usually work around it by going on the GUI and pressing the Restart button for the interface.

How can I troubleshoot?

This is the interface configuration:

config interface 'wan6'
	option proto 'dhcpv6'
	option device 'eth2'
	option reqprefix '60'
	option force_link '1'
	option reqaddress 'try'

I tried setting force_link to '0', as well as reqaddress to force, reqprefix to auto and many combinations of those, to no avail.

Thanks!

Start with ifstatus wan6 to see whether it reports any error. Then you can also peek into the logs (logread | grep wan6). This looks like some sort of race condition during system startup.

Thanks! I didn’t know I could pass wan6 to ifstatus.

It shows it as pending, and it still doesn’t have an IPv6 address, over 8h after the last reboot.

turris# ifstatus wan6
{
	"up": false,
	"pending": true,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"proto": "dhcpv6",
	"device": "eth2",
	"data": {

	}
}

turris# ip a show eth2
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1024
    link/ether d8:58:d7:00:9e:6e brd ff:ff:ff:ff:ff:ff
    inet 100.64.171.107/24 brd 100.64.171.255 scope global eth2
       valid_lft forever preferred_lft forever
    inet6 fe80::da58:d7ff:fe00:9e6e/64 scope link
       valid_lft forever preferred_lft forever

turris# uptime
 12:24:10 up  8:23,  load average: 0.22, 0.22, 0.28

If I manually run ifup wan6 it wakes it all up and I get an address:

turris# ifup wan6
turris# ifstatus wan6
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 1,
	"l3_device": "eth2",
	"proto": "dhcpv6",
	"device": "eth2",
	"updated": [
		"addresses",
		"routes",
		"prefixes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [

	],
	"ipv6-address": [
		{
			"address": "2a01:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx",
			"mask": 128,
			"preferred": 71999,
			"valid": 86399
		}
	],
	"ipv6-prefix": [
		{
			"address": "2a01:xxxx:xxxx:xx00::",
			"mask": 56,
			"preferred": 71999,
			"valid": 86399,
			"class": "wan6",
			"assigned": {
				"vlan1": {
					"address": "2a01:xxxx:xxxx:xx11::",
					"mask": 64
				},
				...
			}
		}
	],
	"ipv6-prefix-assignment": [

	],
	"route": [
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::xxxx:xxxx:xxxx:xxxx",
			"metric": 512,
			"valid": 1797,
			"source": "2a01:xxxx:xxxx:xx00::/56"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::xxxx:xxxx:xxxx:xxxx",
			"metric": 512,
			"valid": 1797,
			"source": "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/128"
		}
	],
	"dns-server": [

	],
	"dns-search": [
		"hyperoptic.com"
	],
	"neighbors": [

	],
	"inactive": {
		"ipv4-address": [

		],
		"ipv6-address": [

		],
		"route": [

		],
		"dns-server": [

		],
		"dns-search": [

		],
		"neighbors": [

		]
	},
	"data": {
		"passthru": "<DUID, I suppose>"
	}
}

I agree it seems like a race condition as I’ve seen it work once or twice. I would still expect this to self-recover though.