Hi all,
I'm having trouble getting IPv6 to work on my network. Originally I disabled IPv6 on my router for stupid reasons. Anyway, I am using dnsmasq-full which I understand has support for IPv6 but I've also got odhcp-ipv6only and odhcp6c installed. I cannot get IPv6 to work. I enabled all the relevant options on the LAN interface such as RA-Server and DHCPv6-Service to "Server", IPv6 ULA-Prefix etc but no matter what I do the lan interface is still showing as " IPv6: undefined/0"
Does anyone know what I need to do to get IPv6 to work in the most efficient way?
Is it safe to assume your ISP is IPv6 capable? If so, does your WAN interface have an IPv6 address? Does your ISP provide an IPv6 PD (a /48, /56, etc.) for you?
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option packet_steering '1'
option ula_prefix 'fd61:b80:f972::/48'
config device
option name 'br-lan'
option type 'bridge'
option ipv6 '0'
list ports 'bat0.1'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
list ports 'lan5'
option igmp_snooping '1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ipv6 '1'
option defaultroute '0'
option ip6assign '64'
option ip6hint '1'
config device
option type 'bridge'
option name 'br-iot'
list ports 'bat0.2'
option bridge_empty '1'
option ipv6 '0'
option igmp_snooping '1'
config interface 'iot'
option proto 'static'
option device 'br-iot'
option ipaddr '10.1.1.1'
option netmask '255.255.255.0'
option defaultroute '0'
option ip6assign '64'
option ip6hint '2'
/etc/config/dhcp
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '0'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option cachesize '1000'
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'
option port '54'
list server '192.168.1.1'
list server '192.168.1.2'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '2h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list dhcp_option '3,192.168.1.1'
list dhcp_option '6,192.168.1.1,192.168.1.2'
list ntp '192.168.1.1'
list ntp '10.1.1.1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'iot'
option interface 'iot'
option start '10'
option limit '50'
option leasetime '5m'
option force '1'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list dhcp_option '6,192.168.1.1,192.168.1.2'
list ntp '10.1.1.1'
list ntp '192.168.1.1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
Thank you @_FailSafe . The above are the relevant bits of the /etc/config/dhcp and /etc/config/network
I'm running adguardhome on my OpenWrt and it's listening on port 53 (hence the changing of dnsmasq to listen on port 54). AdguardHome is not providing DHCP at all. Just DNS.
I would suggest removing option ra_slaac '1' from both lan and iot in your dhcp config. Then add list ip6class 'local' to each of lan and iot sections in your dhcp config.
Then try a /etc/init.d/network restart and see what you get after that.
There's no config odhcpd section so odhcpd probably isn't going to run at all. Anyway you don't want to install multiple packages that provide the same service and would conflict with each other. The default odhcpd-v6only works fine for serving ULAs. Do the lan and iot interfaces themselves have the ::1 in separate /64s as expected? The DHCP server looks at the address existing on the interface to decide what to serve.
@ahuman that was the solution. I didn't even notice the option was set to 0. As soon as I changed it to option ipv6 '1' and restarted the interface it worked straightaway.