openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
160 stars 96 forks source link

Not sending any "dhcp6 request" messages as a client #159

Open infinity0 opened 4 years ago

infinity0 commented 4 years ago

I am trying to use my openwrt router with my IPv6-supporting ISP. I am running 19.07.3 on a netgear WNDR3700v4. As I understand, DHCPv6 is supposed to go something like:

  1. client: dhcp6 solicit
  2. server: dhcp6 advertise
  3. client: dhcp6 request
  4. server: dhcp6 reply

(unless rapid commit is selected, which is not the case here).

When I use my openwrt-router as a DHCPv6 server, I see all 4 messages when I subsequently connect a DHCPv6 client.

However, when I use my openwrt-router as a DHCPv6 client, I observe only the first 2 messages (being repeated 4 times), and no follow-up dhcp6 request by openwrt. This happens in the following two scenarios:

  1. my openwrt-router is connected to my ISP-router, which is connected to my ISP. Here, IPv4 internet is working normally. In this scenario, wan6 configuration succeeds and it gets a IPv6 address despite the lack of dhcp6 request.

  2. my openwrt-router is connected to my ISP. Here, IPv4 internet is also working normally. However in this scenario, wan6 configuration remains stuck on "pending". Initially I thought the lack of dhcp6 request was the obvious problem, but after finding out scenario (1) I am just really confused and don't know how else to proceed.

infinity0 commented 4 years ago

In both scenarios, openwrt's dhcp6 solicit looks like this:

``` 21:15:24.647436 IP6 (flowlabel 0x29a7b, hlim 1, next-header UDP (17) payload length: 110) fe80::.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=97b1ad (elapsed-time 0) (option-request SIP-servers-domain SIP-servers-address DNS-server DNS-search-list SNTP-servers NTP-server AFTR-Name opt_67 opt_94 opt_95 opt_96 opt_82) (client-ID hwaddr type 1 XXX) (reconfigure-accept) (Client-FQDN) (IA_NA IAID:1 T1:0 T2:0) (IA_PD IAID:1 T1:0 T2:0) ) ```

In scenario 1, the dhcp6 advertise received from my ISP-router looks like this:

``` 23:09:12.766838 IP6 (hlim 64, next-header UDP (17) payload length: 109) fe80::1.57357 > fe80::.546: [udp sum ok] dhcp6 advertise (xid=548c84 (client-ID hwaddr type 1 XXX) (server-ID hwaddr type 6 YYY) (IA_NA IAID:1 T1:35042 T2:56068 (IA_ADDR pltime:70085 vltime:84485)) (preference 7) (DNS-server fe80::1) ) ```

In scenario 2, the dhcp6 advertise received from my ISP looks like this:

``` 21:15:24.658497 IP6 (flowlabel 0x00201, hlim 255, next-header UDP (17) payload length: 157) fe80::.547 > fe80::.546: [udp sum ok] dhcp6 advertise (xid=97b1ad (IA_NA IAID:1 T1:43200 T2:64800 (IA_ADDR pltime:72000 vltime:86400)) (IA_PD IAID:1 T1:43200 T2:64800 (IA_PD-prefix ::/56 pltime:72000 vltime:86400)) (client-ID hwaddr type 1 XXX) (server-ID hwaddr/time type 1 time 588232101 YYY) (reconfigure-accept) (DNS-search-list hyperoptic.com.) ) ```