Odhcpd static ipv6 address for host (lxc guest)

Whilst assigning a static ipv6 address to router iface works I could not figure out how to let odhcpd assign an ipv6 address to a host in the network, similar to ipv4 (which works).

The upstream documentation I looked into

[OpenWrt Wiki] odhcpd
odhcpd/README at master · openwrt/odhcpd · GitHub

is not explanatory at all about the subject

Sections of type host (static leases)
Option Type Default Description
ip string IP-Address to lease

ip appears to be working only as single option and not as multiple list and only parsing ipv4 addresses but not ipv6 ones.

Help is appreciated thus as the service running on the host should be reachable via a dedicated (static) ipv6 address.

1 Like

it works by adding DUID and ipv6 suffix for host in dhcp page in luci.
When its done yiu should see ipv6 lease with 2 address for each host set : with local prefix and your assigned prefix. suffix will be in both cases same. For me it works only with stateful if i keep stateless + statefull it’s not working. need more experimenting…

To my understanding the host has to generate the DUID and report to the router. But not every host is either generating or reporting it to the router, at least none of the LXC containers does, never mind the settings stateless | statefull. And the ipv6 suffix set in static leases is also not working with any of the LXC guests.


Sure there are 2 - the local link fe80: and then the global link with the ULA-Prefix (missing the static suffix)

you can specify ipv6 addtess directly in lxc config file

1 Like

how’s the correct text for the config file to preset ipv4 and ipv6 adresses?