Description
This is a feature request.
The current shipping LWIP and ESP-IDF appear to be able to support IPv6, though it apparently implements only SLAAC and static addressing, but not DHCPv6. If we can get that functionality, it would be sufficient for my needs.
Please fill the info fields, it helps to get you faster support ;)
If you have a Guru Meditation Error, please decode it:
https://github.com/me-no-dev/EspExceptionDecoder
----------------------------- Remove above -----------------------------
Hardware:
Board: ?ESP32 Dev Module? -- Applies to any hardware
Core Installation/update date: 23 Mar 2018
IDE name: Arduino IDE 1.8.5
Flash Frequency: Applies to any frequency
Upload Speed: Applies to any upload speed
Description:
Need IPv6 support in Networking stack
https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series contains some ability to set up an IPv6 Link Local address on the WLAN interface, but doesn't get an address from SLAAC or do any DHCPv6 processing. There does not appear to be an interface to assign a static IPv6 address.
It's not clear if there are any abilities to do any form of getaddrinfo(), getnameinfo(), or TCP, UDP, or ICMP IPv6 packet communication using the library.
Unfortunately the documentation (mostly in Chinese) is far from complete over there and the documentation of the IPv6 example is virtually non-existent and appears to be centered on providing some form of IPv6 minimal capability for an ESP32 acting as a WiFi Station and AP simultaneously.
Activity
martin-ger commentedon Mar 28, 2018
Try to call "netif_create_ip6_linklocal_address(sta-netif, 0);" with the appropriate netif once you are connected to WiFi.
At least on an ESP8266 with FreeRTOS this made IPv6 autoconfig work...
See also: https://github.com/IPv6-ESP8266/IPv6-ESP8266
owendelong commentedon Mar 28, 2018
Thanks... Will let you know how that goes.
owendelong commentedon Mar 28, 2018
Hmmm... Perhaps FreeRTOS and Arduino are orthogonal. At least I'm not finding that call in the Arduino libraries anywhere. Is this limited to the ESP-IDF and not the Arduino environment?
martin-ger commentedon Mar 28, 2018
owendelong commentedon Mar 28, 2018
OK, looking a little further into this, it looks like the Arduino level support is a bit incomplete but I got further than before.
Using the WiFi class in Arduino and using the following code:
I was able to get the IPv6 Link Local address of the interface (which I got before).
However, using the same suffix from the IPv6 Link Local address, I tried pinging the ESP32 on the local network (2620:0:930::/64 in this case).
So, for example, with link local of fe80::32ae:a4ff:fe55:ca40, on network 2620:0:930::/64 I was able to successfully ping 2620:0:930::32ae:a4ff:fe55:ca40.
Now, the two hosts in the client.connect() calls are as follows:
jimtest.delong.com -- IPv6 only web server at 2620:0:930::dead:beef:cafe
www.delong.com -- Dualstack web server at 192.159.10.7 and 2620:0:930::400:7
The ESP32 does do AAAA and A resolution (in fact, it asks for AAAA first). However, it does not send any SYN packets or any packets at all to 2620:0:930::dead:beef:cafe. About 5 seconds later, it reports "connection failed". It then sends no packets to 2620:0:930::400:7, does do a three-way handshake with 192.159.10.7 and then reports SUCCESS!!
So it appears that all that is missing in terms of getting minimal workable IPv6 TCP as a client is putting the hooks into the Arduino <Interface_Class>.connect() call to:
Desirable features would include adding hooks to get ALL of the IPv6 addresses instead of just the link_local_ip. (IMHO, we should perhaps make loclaIPv6 a subclass so that localIPv6() returns what we currently get, the link local, but we could also call localIPv6.link_local() and get an array of structures containing link local information (e.g. struct IPv6AddressInformation { uint_128t address; uint_8t length; }), adding the relevant localIPv6.global(), localIPv6.nameservers(), localIPv6.gateway() calls to retrieve similar arrays of information for those categories. Perhaps even a call to localIPv6.addresses() which would yield a larger structure including not only what I listed above, but also char *zone_id, and uint_8t scope to the structure giving more complete information.
I'm just thinking out loud here, so feedback as to whether I'm on the right track or not would be helpful.
owendelong commentedon Apr 10, 2018
If I can get guidance from one of the maintainers on the above, I'm willing to work on the code...
In the meantime, I'll take a look at WiFi.connect() and see if I can get that going for starters.
zachfi commentedon Feb 26, 2019
I too would like to see support for IPv6 on the esp32 platform. Ideally, with SLAAC router announcements, though even static address would be a start. All the components that I'd like to connect to the ESP boards are running IPv6 only, and so I'd like to be able to connect the ESP to those components using v6.
me-no-dev commentedon Feb 27, 2019
Maybe this should be asked in IDF's repo? Arduino here supports IPv6 as much as IDF does
owendelong commentedon Apr 8, 2019
I'll note that the ESP8266 Arduino project https://github.com/esp8266/Arduino now has IPv6 support. They call it experimental, but so far, it's working well for me. However, since I need to do some SSL things, it would be nice to be able to use the faster processor. Perhaps the code work done there could be reused here? I confess my skills as a software developer are not up to that task, but hopefully someone who is more versed in this than I can take a look at it.
me-no-dev commentedon Apr 12, 2019
So... IPv6 LinkLocal is supported and working. Arduino has API and examples even.
me-no-dev commentedon Apr 12, 2019
@owendelong maybe check the wifi events. You should enable IPv6 on interface start, then you will get event when IP is assigned. It does not happen as soon as you call enableIPv6()
owendelong commentedon Apr 21, 2019
@me-no-dev So that's great and all, but I need more than link-local support, and, I'd really like to suggest that the developers here take a look at what's been done in the ESP8266 project I referenced.
They've got a pretty nice full code stack including a decent web server, SSL support, and some other capabilities that make IPv6 not only possible, but actually quite easy in the ESP8266 environment. This has me using 8266s in most of my solutions for now, but there are a couple of places where I need a bit stronger processor (e.g. faster SSL response). For now, that's pushing me all the way to a PI 0 W solution, which is overkill both in the size of the device and in the per unit cost.
It would be really cool if this project could make their IPv6-capable libraries compatible with the API of the libraries there so that moving between 8266 and 32 platforms is as simple as a recompile.
me-no-dev commentedon Apr 23, 2019
I think you should post this in ESP-IDF as that is where LwIP comes from in Arduino :) If they make it work, it will start working here as well
stale commentedon Aug 1, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
26 remaining items