DHCPv6 setup not working?

Hi. I’m trying to setup IPv6 connectivity at a new location with a new ISP. My previous service provider only supported IPv6 via 6rd, so I haven’t done this setup before.

I’m using the Cox Panoramic Wifi cable modem provided to me configured in bridge mode, connected to my Linksys E8450 router running OpenWRT 24.10.3. IPv4 is working fine, but I don’t get any IPv6 GUA address assigned to any interface on the router.

I created a wan6 DHCPv6 interface in luci with the default settings:

$ uci show network.wan6
network.wan6=interface
network.wan6.proto='dhcpv6'
network.wan6.device='wan'
network.wan6.reqaddress='try'
network.wan6.reqprefix='auto'
network.wan6.norelease='1'
network.wan6.peerdns='0'

Running tcpdump on the router, I can see icmp6-ra received from the upstream gateway with the M-bit set:

$ tshark -r icmpra.pcap -c1 -VO icmpv6
Frame 1: 86 bytes on wire (688 bits), 86 bytes captured (688 bits)
Ethernet II, Src: Cisco_21:a4:19 (6c:13:d5:21:a4:19), Dst: IPv6mcast_01 (33:33:00:00:00:01)
Internet Protocol Version 6, Src: fe80::6e13:d5ff:fe21:a419, Dst: ff02::1
Internet Control Message Protocol v6
    Type: Router Advertisement (134)
    Code: 0
    Checksum: 0x6e25 [correct]
    [Checksum Status: Good]
    Cur hop limit: 64
    Flags: 0xc0, Managed address configuration, Other configuration, Prf (Default Router Preference): Medium
        1... .... = Managed address configuration: Set
        .1.. .... = Other configuration: Set
        ..0. .... = Home Agent: Not set
        ...0 0... = Prf (Default Router Preference): Medium (0)
        .... .0.. = ND Proxy: Not set
        .... ..00 = Reserved: 0
    Router lifetime (s): 1800
    Reachable time (ms): 3600000
    Retrans timer (ms): 0
    ICMPv6 Option (Source link-layer address : 6c:13:d5:21:a4:19)
        Type: Source link-layer address (1)
        Length: 1 (8 bytes)
        Link-layer address: Cisco_21:a4:19 (6c:13:d5:21:a4:19)
    ICMPv6 Option (MTU : 1500)
        Type: MTU (5)
        Length: 1 (8 bytes)
        Reserved
        MTU: 1500

When I restart wan6, I can observe the following DHCPv6 exchange, with a IA-NA addr and a /64 prefix:

$ tshark -r dhcp6.pcap -c2 -VO dhcpv6
Frame 1: 163 bytes on wire (1304 bits), 163 bytes captured (1304 bits)
Ethernet II, Src: BelkinIntern_de:cd:3b (d8:ec:5e:de:cd:3b), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02)
Internet Protocol Version 6, Src: fe80::daec:5eff:fede:cd3b, Dst: ff02::1:2
User Datagram Protocol, Src Port: 546, Dst Port: 547
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0xa0f1f8
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Elapsed time: 0ms
    Option Request
        Option: Option Request (6)
        Length: 24
        Requested Option code: SIP Server Domain Name List (21)
        Requested Option code: SIP Servers IPv6 Address List (22)
        Requested Option code: DNS recursive name server (23)
        Requested Option code: Domain Search List (24)
        Requested Option code: Simple Network Time Protocol Server (31)
        Requested Option code: NTP Server (56)
        Requested Option code: Dual-Stack Lite AFTR Name (64)
        Requested Option code: Prefix Exclude (67)
        Requested Option code: S46 MAP-E Container (94)
        Requested Option code: S46 MAP-T Container (95)
        Requested Option code: S46 Lightweight 4over6 Container (96)
        Requested Option code: SOL_MAX_RT (82)
    Client Identifier
        Option: Client Identifier (1)
        Length: 10
        DUID: 00030001d8ec5edecd3b
        DUID Type: link-layer address (3)
        Hardware type: Ethernet (1)
        Link-layer address: d8:ec:5e:de:cd:3b
        Link-layer address (Ethernet): BelkinIntern_de:cd:3b (d8:ec:5e:de:cd:3b)
    Reconfigure Accept
        Option: Reconfigure Accept (20)
        Length: 0
    Client Fully Qualified Domain Name
        Option: Client Fully Qualified Domain Name (39)
        Length: 9
        Flags: 0x00  [CLIENT wants to update its AAAA RRs and SERVER to update its PTR RRs]
            .... .0.. = N bit: Server SHOULD perform PTR RR updates
            .... ...0 = S bit: Server SHOULD NOT perform AAAA RR updates
        Top Level Domain name (TLD): router.
            WARNING: TLDs are rarely resolvable 
                [Expert Info (Warning/Comment): WARNING: TLDs are rarely resolvable ]
                    [WARNING: TLDs are rarely resolvable ]
                    [Severity level: Warning]
                    [Group: Comment]
    Identity Association for Non-temporary Address
        Option: Identity Association for Non-temporary Address (3)
        Length: 12
        IAID: 00000001
        T1: 0
        T2: 0
    Identity Association for Prefix Delegation
        Option: Identity Association for Prefix Delegation (25)
        Length: 12
        IAID: 00000001
        T1: 0
        T2: 0

Frame 2: 223 bytes on wire (1784 bits), 223 bytes captured (1784 bits)
Ethernet II, Src: Cisco_21:a4:19 (6c:13:d5:21:a4:19), Dst: BelkinIntern_de:cd:3b (d8:ec:5e:de:cd:3b)
Internet Protocol Version 6, Src: fe80::6e13:d5ff:fe21:a419, Dst: fe80::daec:5eff:fede:cd3b
User Datagram Protocol, Src Port: 547, Dst Port: 546
DHCPv6
    Message type: Advertise (2)
    Transaction ID: 0xa0f1f8
    Client Identifier
        Option: Client Identifier (1)
        Length: 10
        DUID: 00030001d8ec5edecd3b
        DUID Type: link-layer address (3)
        Hardware type: Ethernet (1)
        Link-layer address: d8:ec:5e:de:cd:3b
        Link-layer address (Ethernet): BelkinIntern_de:cd:3b (d8:ec:5e:de:cd:3b)
    Server Identifier
        Option: Server Identifier (2)
        Length: 14
        DUID: 00010001615da046005056b2453b
        DUID Type: link-layer address plus time (1)
        Hardware type: Ethernet (1)
        DUID Time: Oct  6, 2051 06:10:30.000000000 MST
        Link-layer address: 00:50:56:b2:45:3b
        Link-layer address (Ethernet): VMware_b2:45:3b (00:50:56:b2:45:3b)
    DNS recursive name server
        Option: DNS recursive name server (23)
        Length: 32
         1 DNS server address: 2001:578:3f::30
         2 DNS server address: 2001:578:3f:1::30
    Identity Association for Non-temporary Address
        Option: Identity Association for Non-temporary Address (3)
        Length: 40
        IAID: 00000001
        T1: 43200
        T2: 69120
        IA Address
            Option: IA Address (5)
            Length: 24
            IPv6 address: 2600:8800:ff04:f00:xxxx:xxxx:xxxx:3e85
            Preferred lifetime: 86400
            Valid lifetime: 86400
    Identity Association for Prefix Delegation
        Option: Identity Association for Prefix Delegation (25)
        Length: 41
        IAID: 00000001
        T1: 43200
        T2: 69120
        IA Prefix
            Option: IA Prefix (26)
            Length: 25
            Preferred lifetime: 86400
            Valid lifetime: 86400
            Prefix length: 64
            Prefix address: 2600:8800:xxxx:xxxx::

However, I don’t see any IA-NA or ipv6 prefix assigned to any interface:

[router ~]# ip -br -6 addr show 
lo               UNKNOWN        ::1/128 
eth0             UP             fe80::daec:5eff:fede:cd3c/64 
wan@eth0         UP             fe80::daec:5eff:fede:cd3b/64 
br-lan           UP             fd38:24df:e440::1/64 fe80::daec:5eff:fede:cd3c/64 
wg               UNKNOWN        fd38:24df:e440:100::1/112 
ifb4wan          UNKNOWN        fe80::493:abff:feaf:cf0f/64 

I added a simple user script and find that the ADDRESSES parameter is empty:

[router ~]# cat /etc/odhcp6c.user.d/env.sh 
#!/bin/bash
echo ADDRESSES=$ADDRESSES >> /root/env.txt
echo RA_ADDRESSES=$RA_ADDRESSES >> /root/env.txt
echo >> /root/env.txt

[router ~]# head -n3 env.txt
ADDRESSES=
RA_ADDRESSES=

My modem is apparently still running a DHCP v4 & v6 clients, since according to the status page it has a unique IPv6 and /56 prefix (different than the ones found in the pkt capture), so it presumably can work.

AFAICT everything is working correctly from the ISP end. How can I get IPv6 connectivity setup properly in OpenWRT?

Please show us your network and DHCP config file and remove credentials on wan before.

Hi @_bernd, thanks for looking.

[router ~]# 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'
	option ula_prefix 'fd38:24df:e440::/48'
	option packet_steering '1'

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

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ip6assign '64'
	list ipaddr '10.3.0.254/24'

config interface 'wg'
    <redacted>

config wireguard_wg
    <redacted>

config wireguard_wg
    <redacted>

config wireguard_wg
    <redacted>

config wireguard_wg
    <redacted>

config interface 'modem'
	option proto 'static'
	option device 'wan'
	list ipaddr '192.168.0.2/24'

config wireguard_wg
    <redacted>

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

config interface 'wan6'
	option proto 'dhcpv6'
	option device 'wan'
	option reqaddress 'try'
	option reqprefix 'auto'
	option norelease '1'
	option peerdns '0'

This is my /etc/config/network. There are no wan/ppp credentials to redact, I get my IPv4 via DHCP, but I did redact all the wireguard settings for obvious reasons. IPv4 is working correctly, to be clear, I’m just having trouble with IPv6.

What is currently in ifstatus wan6 output?

[router ~]# ifstatus wan6
{
	"up": false,
	"pending": true,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"proto": "dhcpv6",
	"device": "wan",
	"data": {
		
	}
}

Try to set auto to an explicit 56.
If that not give you a 56 then go and try 60.

/etc/config/dhcp, plz, kthxbye

1 Like

If you are not sure that your prefix is static, then better to remove that line.

1 Like

Sorry, here is /etc/config/dhcp:

[router ~]# cat /etc/config/dhcp 

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option localservice '1'
	option ednspacket_max '1232'
	option local '/abra.home/'
	option domain 'abra.home'
	option rapidcommit '1'
	list rebind_domain 'dns.msftncsi.com'
	option fqdn '1'
	option cachesize '1000'
	list cache_rr 'HTTPS'
	list cache_rr 'SVCB'
	list server '8.8.8.8'
	list server '8.8.4.4'
	list address '/use-application-dns.net/'
	list address '/modem.abra.home/192.168.0.1'

config dhcp 'lan'
	option interface 'lan'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option start '1'
	option ra 'server'
	list ra_flags 'none'
	option ra_lifetime '0'
	list dhcp_option '114,"urn:ietf:params:capport:unrestricted"'
	list dhcp_option 'tag:testing,162,00:20:00:01:0c:03:64:6e:73:06:67:6f:6f:67:6c:65:00:08:08:08:08:08:08:08:04:04:00:01:00:04:03:64:6f:74:00:3b:00:01:0f:05:68:6f:6d:65:72:07:73:69:6d:70:73:6f:6e:00:04:00:07:04:02:00:01:00:0a:03:64:6f:74:02:68:32:02:68:33:00:07:00:12:2f:73:70:72:69:6e:67:66:69:65:6c:64:7b:3f:64:6e:73:7d'
	list dhcp_option 'option:ntp-server,0.0.0.0'
	option dhcpv6 'server'
	option dns_service '0'

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 dns '1'
	option ip '10.3.0.5'
	option name 'rdtw'
	list tag 'canary'
	list tag 'wg'
	option hostid 'deadbeef'

config host
	option dns '1'
	option mac 'D0:73:D5:30:0A:91'
	option name 'lifx-lamp'

config host
	option name 'apc-wlan'
	option dns '1'
	option mac 'F4:46:37:CA:D9:F1'

config host
	option dns '1'
	option tag 'testing'
	option ip '10.3.0.99'
	option name 'arch-nspawn'
	option mac 'D2:B8:D1:91:7C:EB'

config ipset
	list domain 'steamcontent.com'
	option table_family 'inet'
	list name 'steam6'

config ipset
	list name 'discord6'
	list domain 'discord.media'
	option table_family 'inet'

config host
	list mac '80:A9:97:43:E5:08'
	option ip '10.3.0.56'

I tried setting the prefix explicitly to /56 and then to /60, and I do get a response with a /56 and /60 prefix offered from the server according to tcpdump, but again I don’t see any prefix assigned to an interface on the router.

With a more comprehensive user-script, I can see that the position arguments to the update script, meant to carry the interface and new state are always “wan” and “ra-updated”. I never see the “bound” or “updated” state which I would expect from DHCPv6 updates.
I still don’t know what could be wrong. It just looks like odhcp6c isn’t listening to the DHCPv6 responses.