Ipv6 Support; Esp-Lwip Custom Modifications - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 4. API Guides
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE
CONFIG_LWIP_TCPIP_TASK_AFFINITY

4.20.5 IPv6 Support

Both IPv4 and IPv6 are supported as dual stack and enabled by default (IPv6 may be disabled if it's not needed,
see
Minimum RAM
usage). IPv6 support is limited to Stateless Autoconfiguration only, Stateful configuration is not
supported in ESP-IDF (not in upstream lwip). IPv6 Address configuration is defined by means of these protocols or
services:
• SLAAC IPv6 Stateless Address Autoconfiguration (RFC-2462)
• DHCPv6 Dynamic Host Configuration Protocol for IPv6 (RFC-8415)
None of these two types of address configuration is enabled by default, so the device uses only Link Local addresses
or statically defined addresses.
Stateless Autoconfiguration Process
To enable address autoconfiguration using Router Advertisement protocol please enable:
CONFIG_LWIP_IPV6_AUTOCONFIG
This configuration option enables IPv6 autoconfiguration for all network interfaces (in contrast to the up-
stream lwIP, where the autoconfiguration needs to be explicitly enabled for each netif with netif-
>ip6_autoconfig_enabled=1
DHCPv6
DHCPv6 in lwIP is very simple and support only stateless configuration. It could be enabled using:
CONFIG_LWIP_IPV6_DHCP6
Since the DHCPv6 works only in its stateless configuration, the
too, by means of CONFIG_LWIP_IPV6_AUTOCONFIG. Moreover, the DHCPv6 needs to be explicitly enabled form
the application code using
dhcp6_enable_stateless(netif);
DNS servers in IPv6 autoconfiguration
In order to autoconfigure DNS server(s), especially in IPv6 only networks, we have these two options
• Recursive domain name system –this belongs to the Neighbor Discovery Protocol (NDP), uses
configuration
Process. Number of servers must be set CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS,
this is option is disabled (set to 0) by default.
• DHCPv6 stateless configuration –uses
assumes IPv6 Router Advertisement Flags (RFC-5175) to be set to
– Managed Address Configuration Flag = 0
– Other Configuration Flag = 1
4.20.6 esp-lwip custom modifications
Additions
The following code is added which is not present in the upstream lwIP release:
Espressif Systems
Stateless Autoconfiguration Process
DHCPv6
to configure DNS servers. Note that the this configuration
1429
Submit Document Feedback
has to be enabled,
Stateless Auto-
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF