Fully enable IPv6 by configuring DNS (both DHCPv6 Stateless and RDNSS) #166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are two main IPv6 DNS systems, DHCPv6 Stateless and RDNSS, used in different networks; this change enables both of them, as a network may have either one (or both). In an IPv4-only network, these options will simply be ignored.
This is part of the fix for espressif/arduino-esp32#9143
Previously IPv6 was enabled and assigned addresses, via autoconfig Router Advertisement (RA), but did not enable DNS, without which it cannot connect via host names on an IPv6-only network, so was not very useful.
There were some mitigations, e.g. you could statically configure DNS, or if running in a dual-stack network then the IPv4 DNS will return results (including IPv6 addresses), however applications should automatically work across all network types, so the options in this change should be enabled.
With IPv6 DNS options on in libs, and the other improvements so far in DNS (espressif/arduino-esp32#9439), we have IPv6-only to IPv6-only connections now working:
There are still a few issues to fix in Arduino-ESP32 to get all configurations working:
To properly fix this second issue requires my patch to LWIP, espressif/esp-lwip#66
In the meanwhile, I can add a workaround in Arduino-ESP32, based on the code in my ESP-IDF examples updates: espressif/esp-idf#13250
Here is IPv6 - IPv6 working:
Failure from IPv6-only to dual-stack host, because DNS is returning an IPv4 address, which can't be reached from the IPv6-only network: