Hello,
somehow Openwrt and my ISP (Fiber7, Switzerland) don't play along very well when it comes to IPv6. The problem seems to be that the ISP advertises "Server Unicast" in their DHCPv6 reply, but when odhcp6c then tries to send Renew packets to this specific address, no reply is ever received.
I communicated with my ISP and they were very helpful, but they did not believe that this was a problem on their side. They told me my source IP address was incorrect. In fact, it was an address from the delegated prefix not the assigned router address. After fixing this (change odhcp6c.script, maybe I'll do a separate post about this later). The correct source address was selected, but still no reply on Renew packages.
I tested a patched version of odhcp6c with support for server unicast removed (so Renew packets go to the generic ipv6 address) and the Renew is answered correctly.
Is this a Openwrt issue or an ISP issue? Still if it is an ISP issue OpenWrt should be able to make it work
Some data in plain text:
Sequence of packets:
No. Time Source Destination Protocol Length Info
22 19:31:21,548936 fe80::f29f:c2ff:fe60:91e1 ff02::1:2 DHCPv6 197 Solicit XID: 0xfec3f8 CID: 00030001f09fc26091e1
23 19:31:21,561941 fe80::ca9c:1dff:fe93:343f fe80::f29f:c2ff:fe60:91e1 DHCPv6 349 Advertise XID: 0xfec3f8 IAA: 2a02:168:2000:9:b9e8:5df0:70fa:26e3 CID: 00030001f09fc26091e1
24 19:31:21,573511 fe80::ca9c:1dff:fe93:343f fe80::f29f:c2ff:fe60:91e1 DHCPv6 310 Advertise XID: 0xfec3f8 IAA: 2a02:168:2000:9:1559:813d:406f:6f4d CID: 00030001f09fc26091e1
25 19:31:23,469033 fe80::f29f:c2ff:fe60:91e1 ff02::1:2 DHCPv6 243 Request XID: 0x3d37c3 CID: 00030001f09fc26091e1 IAA: 2a02:168:2000:9:b9e8:5df0:70fa:26e3
26 19:31:23,535705 fe80::ca9c:1dff:fe93:343f fe80::f29f:c2ff:fe60:91e1 DHCPv6 342 Reply XID: 0x3d37c3 IAA: 2a02:168:2000:9:b9e8:5df0:70fa:26e3 CID: 00030001f09fc26091e1
248 19:51:26,689421 2a02:168:2000:9:f29f:c2ff:fe60:91e1 2001:1620:2777:19:1::9 DHCPv6 239 Renew XID: 0x394773 CID: 00030001f09fc26091e1 IAA: 2a02:168:2000:9:b9e8:5df0:70fa:26e3
253 19:51:36,299331 2a02:168:2000:9:f29f:c2ff:fe60:91e1 2001:1620:2777:19:1::9 DHCPv6 239 Renew XID: 0x394773 CID: 00030001f09fc26091e1 IAA: 2a02:168:2000:9:b9e8:5df0:70fa:26e3
257 19:51:54,849523 2a02:168:2000:9:f29f:c2ff:fe60:91e1 2001:1620:2777:19:1::9 DHCPv6 239 Renew XID: 0x394773 CID: 00030001f09fc26091e1 IAA: 2a02:168:2000:9:b9e8:5df0:70fa:26e3
After this the Renew is just repeated over and over again, after some time odhcp6c falls back to do Rebind and then Renew, same problem.
Most interesting packet is maybe the content of the DHCPv6 Reply:
Frame 26: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
Ethernet II, Src: Cisco_93:34:3f (c8:9c:1d:93:34:3f), Dst: Ubiquiti_60:91:e1 (f0:9f:c2:60:91:e1)
Internet Protocol Version 6, Src: fe80::ca9c:1dff:fe93:343f, Dst: fe80::f29f:c2ff:fe60:91e1
User Datagram Protocol, Src Port: 547, Dst Port: 546
DHCPv6
Message type: Reply (7)
Transaction ID: 0x3d37c3
Identity Association for Non-temporary Address
Option: Identity Association for Non-temporary Address (3)
Length: 66
Value: 00000001000004b000000708000500182a02016820000009...
IAID: 00000001
T1: 1200
T2: 1800
IA Address
Option: IA Address (5)
Length: 24
Value: 2a02016820000009b9e85df070fa26e300000e1000015180
IPv6 address: 2a02:168:2000:9:b9e8:5df0:70fa:26e3
Preferred lifetime: 3600
Valid lifetime: 86400
Status code
Option: Status code (13)
Length: 22
Value: 000041737369676e656420616e20616464726573732e
Status Code: Success (0)
Status Message: Assigned an address.
Identity Association for Prefix Delegation
Option: Identity Association for Prefix Delegation (25)
Length: 77
Value: 00000001000004b000000708001a001900000e1000015180...
IAID: 00000001
T1: 1200
T2: 1800
IA Prefix
Option: IA Prefix (26)
Length: 25
Value: 00000e1000015180302a0201685224000000000000000000...
Preferred lifetime: 3600
Valid lifetime: 86400
Prefix length: 48
Prefix address: 2a02:168:5224::
Status code
Option: Status code (13)
Length: 32
Value: 000041737369676e656420666978656420696e2d706f6f6c...
Status Code: Success (0)
Status Message: Assigned fixed in-pool prefix.
Server Identifier
Option: Server Identifier (2)
Length: 14
Value: 0001000122439e23525400faac14
DUID: 0001000122439e23525400faac14
DUID Type: link-layer address plus time (1)
Hardware type: Ethernet (1)
DUID Time: Mar 20, 2018 11:25:39.000000000 Mitteleuropäische Zeit
Link-layer address: 52:54:00:fa:ac:14
Client Identifier
Option: Client Identifier (1)
Length: 10
Value: 00030001f09fc26091e1
DUID: 00030001f09fc26091e1
DUID Type: link-layer address (3)
Hardware type: Ethernet (1)
Link-layer address: f0:9f:c2:60:91:e1
Preference
Option: Preference (7)
Length: 1
Value: 00
Pref-value: 0
Server unicast
Option: Server unicast (12)
Length: 16
Value: 20011620277700190001000000000009
IPv6 address: 2001:1620:2777:19:1::9
DNS recursive name server
Option: DNS recursive name server (23)
Length: 32
Value: 200116202777000100000000000000102001162027770002...
1 DNS server address: 2001:1620:2777:1::10
2 DNS server address: 2001:1620:2777:2::20
Authentication
Option: Authentication (11)
Length: 28
Value: 030100000000000000000001d86c983ca0f62256b6412456...
Protocol: 3
Algorithm: 1
RDM: 0
Replay Detection: 0000000000000000
Authentication Information: 01d86c983ca0f62256b6412456a575f91b
A full packet dump of the DHCPv6 traffic is available here: https://drive.google.com/open?id=1mnEVkttUOGYktA5kHdZutmej06684Koj
EDIT: Happened with Lede 17.01, but also with one week old openwrt git head.