Cannot get IPv6 addresses on LAN interfaces

Got IPv6 from ISP on WAN, but cannot get it on the LAN interfaces. I think that it doesn't forward Solicitation at all. Is my setup OK, and what could I check more?

Thanks!

root@OpenWrt:~# ifstatus wan6
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 2910,
	"l3_device": "wan",
	"proto": "dhcpv6",
	"device": "wan",
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2001:--edited--",
			"mask": 128,
			"preferred": 691,
			"valid": 691
		}
	],
	"ipv6-prefix": [
		{
			"address": "2001:--edited--",
			"mask": 48,
			"preferred": 691,
			"valid": 691,
			"class": "wan6",
			"assigned": {
				"lan": {
					"address": "2001:--edited--:abcd::",
					"mask": 64
				}
			}
		}
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::--edited--:ca7b",
			"metric": 512,
			"valid": 1780,
			"source": "2001:--edited--::/48"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::--edited--:ca7b",
			"metric": 512,
			"valid": 1780,
			"source": "2001:--edited--/128"
		}
	],
	"dns-server": [
		"2001:--edited--::253",
		"2001:--edited--::253"
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"passthru": "0017002020014600--edited--00000000000253"
	}
}

root@OpenWrt:~# cat /etc/config/network 

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

config globals 'globals'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.31.1'
	option ip6assign '64'
	option ip6hint 'abcd'

config interface 'wan'
	option device 'wan'
	option proto 'dhcp'
	option delegate '0'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix '48'

config interface 'vpn'
	option proto 'wireguard'
	option peerdns '0'
	list dns '8.8.8.8'
	option listen_port '51000'
	option private_key '--edited--'
	list addresses '10.9.0.2/32'

config wireguard_vpn
	option description 'Imported peer configuration'
	list allowed_ips '0.0.0.0/0'
	option endpoint_port '51820'
	option endpoint_host '--edited--'
	option public_key '--edited--'
	option persistent_keepalive '25'

config interface 'ETV'
	option proto 'wireguard'
	option peerdns '0'
	list dns '8.8.8.8'
	list dns '8.8.4.4'
	option private_key '--edited--'
	list addresses '10.9.1.2/24'
	option listen_port '1111'

config wireguard_ETV
	option description 'Imported peer configuration'
	list allowed_ips '0.0.0.0/0'
	option public_key '--edited--'

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option leasetime '10m'
	option dhcpv4 'server'
	option start '150'
	option limit '40'
	option ra 'relay'
	option dhcpv6 'relay'
	option ndp 'relay'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config host
	option ip '192.168.31.125'
	option mac '00:--edited--:01'

config host
	option name 'DESKTOP-2OKHU43'
	option ip '192.168.31.151'
	option mac '18:--edited--:C9'

config host
	option name 'vmware-v'
	option dns '1'
	option mac '00:--edited--:30'
	option ip '192.168.31.111'

config dhcp 'wan6'
	option interface 'wan6'
	option start '100'
	option limit '150'
	option leasetime '10m'
	option ra 'relay'
	option dhcpv6 'relay'
	option ndp 'relay'
	option master '1'

Do not use relay mode when you have a routable prefix from the ISP as is the case here. The system has assigned a /64 out of your /48 to the LAN. If you use the default RA and dhcpv6 settings on LAN, it should work and issue IPs to the LAN devices which then route to the Internet.

However this may be counterproductive since it appears that you're also trying to route all Internet usage through a VPN which is IPv4 only. Running v6 on the lan will allow LAN endpoints to reach the Internet directly with IPv6.

Thanks for super-quick reply. I think I made a changes according to your comment, but nothing changed (except that I lost ipv6 on my OpenWrt LAN interface).

Are there some specific config params that I have to change? Btw. I'm using "VPN policy routing" plugin, so I'm forwarding to two wireguard VPNs only based on rules. Everything else goes to wan.

root@OpenWrt:~# ifstatus wan6
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 139,
	"l3_device": "wan",
	"proto": "dhcpv6",
	"device": "wan",
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2001:--edited--918a",
			"mask": 128,
			"preferred": 1059,
			"valid": 1059
		}
	],
	"ipv6-prefix": [
		{
			"address": "2001:--edited--::",
			"mask": 48,
			"preferred": 1059,
			"valid": 1059,
			"class": "wan6",
			"assigned": {
				
			}
		}
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::--edited--:ca7b",
			"metric": 512,
			"valid": 1776,
			"source": "2001:--edited--::/48"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::--edited--:ca7b",
			"metric": 512,
			"valid": 1776,
			"source": "2001:--edited--/128"
		}
	],
	"dns-server": [
		"2001:--edited--::253",
		"2001:--edited--::253"
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"passthru": "0017002020--edited--00000000253"
	}
}
root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.31.1'

config interface 'wan'
	option device 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

config interface 'vpn'
	option proto 'wireguard'
	option peerdns '0'
	list dns '8.8.8.8'
	option listen_port '51000'
	option private_key '--edited--'
	list addresses '10.9.0.2/32'

config wireguard_vpn
	option description 'Imported peer configuration'
	list allowed_ips '0.0.0.0/0'
	option endpoint_port '51820'
	option endpoint_host '--edited--'
	option public_key '--edited--'
	option persistent_keepalive '25'

config interface 'ETV'
	option proto 'wireguard'
	option peerdns '0'
	list dns '8.8.8.8'
	list dns '8.8.4.4'
	option private_key '--edited--'
	list addresses '10.9.1.2/24'
	option listen_port '1111'

config wireguard_ETV
	option description 'Imported peer configuration'
	list allowed_ips '0.0.0.0/0'
	option public_key '--edited--'

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option leasetime '10m'
	option dhcpv4 'server'
	option start '150'
	option limit '40'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config host
	option ip '192.168.31.125'
	option mac '00:--edited--:01'

config host
	option name 'DESKTOP-2OKHU43'
	option ip '192.168.31.151'
	option mac '18:--edited--:C9'

config host
	option name 'vmware-v'
	option dns '1'
	option mac '00:--edited--:30'
	option ip '192.168.31.111'

config dhcp 'wan6'
	option interface 'wan6'
	option start '100'
	option limit '150'
	option leasetime '10m'
	option ra 'relay'
	option dhcpv6 'relay'
	option ndp 'relay'
	option master '1'

You've removed the ip6assign setting from the lan interface, thus no IPv6 is assigned. Also you don't have ra or dhcpv6 servers enabled, thus no v6 routing will be advertised.

Default configuration is designed for the type of ISP that you have, and it would work here. My recommendation to beginners is to always start with default configuration, and change it only enough as needed to meet your use case, much more changing is likely to break it.

Can it be because of this one? I tried before with IPv6 disabled here, but should I enable it for it to function properly?

This is "VPN policy routing"

All that is v4 so it should co-exist with whatever you do for v6.

Practically everything about v6 is wrong in the config files you posted.

  • in network there is no ip6assign on lan.
  • in dhcp, lan section there are no RA or DHCPv6 servers enabled.
  • in dhcp, wan6 section it is inexplicably set to serve v4 (you don't want that) and also relay v6 (you don't want that either). Set dhcp, wan6 section to contain only option ignore 1 the same as dhcp, wan(4).

I think that I did all the changes how you said it should be, but still no IPv6 assigned in LAN.

I just tried setting static IPv6 on the machine connected to OpenWrt and it is working (ipv6 connectivity test online passes OK).

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : 2001:--edited--:a::90
   Link-local IPv6 Address . . . . . : fe80::--edited--:952c%16
   IPv4 Address. . . . . . . . . . . : 192.168.31.162
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 2001:--edited--:a::99
                                       192.168.31.1

So it is just that DHCP is somehow still not working.

root@OpenWrt:~# ifstatus wan6
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 481,
	"l3_device": "wan",
	"proto": "dhcpv6",
	"device": "wan",
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2001--edited--::abbb",
			"mask": 128,
			"preferred": 717,
			"valid": 717
		}
	],
	"ipv6-prefix": [
		{
			"address": "2001:--edited--::",
			"mask": 48,
			"preferred": 717,
			"valid": 717,
			"class": "wan6",
			"assigned": {
				"lan": {
					"address": "2001:--edited--:a::",
					"mask": 64
				}
			}
		}
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::--edited--:ca7b",
			"metric": 512,
			"valid": 1797,
			"source": "2001:--edited--::/48"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::--edited--:ca7b",
			"metric": 512,
			"valid": 1797,
			"source": "2001:--edited--abbb/128"
		}
	],
	"dns-server": [
		"2001:--edited--::253",
		"2001:--edited--::253"
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"passthru": "00170020--edited--000000253"
	}
}
root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.31.1'
	option ip6assign '64'
	option delegate '0'
	option ip6hint 'a'
	option ip6ifaceid '::99'

config interface 'wan'
	option device 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

config interface 'vpn'
	option proto 'wireguard'
	option peerdns '0'
	list dns '8.8.8.8'
	option listen_port '51000'
	option private_key '--edited--'
	list addresses '10.9.0.2/32'
	option delegate '0'

config wireguard_vpn
	option description 'Imported peer configuration'
	list allowed_ips '0.0.0.0/0'
	option endpoint_port '51820'
	option endpoint_host '--edited--'
	option public_key '--edited--'
	option persistent_keepalive '25'

config interface 'ETV'
	option proto 'wireguard'
	option peerdns '0'
	list dns '8.8.8.8'
	list dns '8.8.4.4'
	option private_key '--edited--'
	list addresses '10.9.1.2/24'
	option listen_port '1111'
	option delegate '0'

config wireguard_ETV
	option description 'Imported peer configuration'
	list allowed_ips '0.0.0.0/0'
	option public_key '--edited--'

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option leasetime '10m'
	option dhcpv4 'server'
	option start '150'
	option limit '40'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option dhcpv6 'server'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config host
	option ip '192.168.31.125'
	option mac '00:--edited--:01'

config host
	option name 'DESKTOP-2OKHU43'
	option ip '192.168.31.151'
	option mac '18--edited--:C9'

config host
	option name 'vmware-v'
	option dns '1'
	option mac '00:--edited--30'
	option ip '192.168.31.111'

config dhcp 'wan6'
	option interface 'wan6'
	option ignore '1'