-
Notifications
You must be signed in to change notification settings - Fork 119
Description
After reboot the OpenWrt, LAN devices can not obtain ipv6 address.
- issue in OpenWrt repo: ODHCP does not detect br-lan on startup openwrt#18033
- original discuss in OpenWrt forum
- same issue in OpenWrt repo: The client cannot obtain the ipv6 address openwrt#12267
- maybe related: device on lan cann't get ipv6 address on latest commit #197
My network is a little bit different: I have 2 different ipv6 subnets: a /64 subnet and a /56 subnet, I can use both of them. And there is no DHCPv6 or RA service in upstream network.
I decide to assign a static ipv6 address to wan6 interface, pick up form the /64 subnet. And I use the /56 subnet as ipv6-pd, also config manually.
After that, the br-lan has the ipv6 address, and all things goes right, the devices in LAN network can get ipv6 address and reach the internet.
However once I reboot the router, ipv4 still works, but the ipv6 not. The br-lan still has ipv6 address, but there is only a fe80 ipv6 address in lan devices.
Restart br-lan interface or restart odhcpd service will fix this issue temporary.
Here is my config:
/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'
option ula_prefix 'fd65:cf15:774f::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '64'
option ip6hint '1'
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0'
option proto 'static'
option ip6gw 'fe80::1'
option ip6prefix '2a01:56:56:56::/56'
list ip6addr '2a01:64:64:64::1/64'
/etc/config/dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
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'
log of odhcpd
# logread | grep -i 'odhcpd\|dhcpv6\|ipv6'
Wed Feb 19 08:08:34 2025 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Wed Feb 19 08:08:34 2025 daemon.notice procd: start /etc/rc.d/S35odhcpd boot
Wed Feb 19 08:08:34 2025 daemon.notice procd: Create service odhcpd
Wed Feb 19 08:08:34 2025 daemon.notice procd: Start instance odhcpd::instance1
Wed Feb 19 08:08:34 2025 daemon.notice procd: Started instance odhcpd::instance1[1869]
Wed Feb 19 08:08:34 2025 daemon.notice procd: running /etc/init.d/odhcpd running
Wed Feb 19 08:08:34 2025 daemon.notice procd: start /etc/init.d/odhcpd running
Wed Feb 19 08:08:34 2025 daemon.notice procd: stop /etc/rc.d/S35odhcpd boot - took 0.022315150s
Wed Feb 19 08:08:34 2025 daemon.notice procd: stop /etc/init.d/odhcpd running - took 0.014014450s
Wed Feb 19 08:08:35 2025 user.notice ucitrack: Setting up /etc/config/odhcpd reload dependency on /etc/config/dhcp
Wed Feb 19 08:08:39 2025 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Maybe we need add more debug info and recompile odhcpd to find out the reason.