espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.76k stars 7.3k forks source link

Using lwIP DHCPv6 on esp_netifs (IDFGH-3249) #5245

Closed xkevin190 closed 3 years ago

xkevin190 commented 4 years ago

lwIP supports DCHPv6, so in theory this could've enabled, I need it generally to set a prefix for downstream hosts, so IPv6 addresses can/could be configured.

A way to enable DHCPv6 and configure it (setting the downstream prefix for connected hosts, etc.).

See also

luisan00 commented 4 years ago

This could be a great feature :+1:

david-cermak commented 4 years ago

Thanks for posting this request!

I think the DHCPv6 in lwIP is fairly limited, supports only stateless configuration, which is more/less functional even without the DHCPv6. What would be the actual advantage of using DHCPv6 in your use case?

I need it generally to set a prefix

This should be doable with the default IPv6 autoconfig, while running some kind of RA. For example with radvd settings

    interface en0
    {
        AdvSendAdvert on;
        ...
        prefix ${your_prefix}::/64
        {
              ....
        };
    };

should work to assign arbitrary prefix for esp hosts.

david-cermak commented 3 years ago

@luisan00 @xkevin190 Any update from your side? As said above, users should be able to run IPv6 auto-configuration without any limitation and even with attaching DNS info enabling CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS.

the lwip's DHCPv6 might be helpful for some corner cases too, in IPv6 only networks, typically for setting DNS servers in the stateless configuration. I am planning on making the LWIP_IPV6_DHCP6 a new config option and explaining this specific usecase in the lwip docs to close this issue.