I removed /var/lib/dhcp/dhclient6.eth0.leases
and restart container. The container didn’t get IPv6 address with DHCPv6.
ubuntu@ubuntu18:~$ lxc exec test0719 -- ls -l /var/lib/dhcp/dhclient6.eth0.leases
-rw-r--r-- 1 root root 62 Jul 24 01:21 /var/lib/dhcp/dhclient6.eth0.leases
ubuntu@ubuntu18:~$ lxc exec test0719 -- rm /var/lib/dhcp/dhclient6.eth0.leases
ubuntu@ubuntu18:~$ lxc restart test0719
ubuntu@ubuntu18:~$ lxc list test0719
+----------+---------+-----------------------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+----------+---------+-----------------------+------+------------+-----------+
| test0719 | RUNNING | 10.228.181.123 (eth0) | | PERSISTENT | 0 |
+----------+---------+-----------------------+------+------------+-----------+
DHCPv6 request was sent by container but there was no reply…
root@ubuntu18:~# tcpdump -n -nn -i lxd0719 ip6
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lxd0719, link-type EN10MB (Ethernet), capture size 262144 bytes
15:58:11.059600 IP6 fe80::216:3eff:fe33:1ccd.546 > ff02::1:2.547: dhcp6 solicit
15:59:14.664293 IP6 fe80::216:3eff:fe33:1ccd.546 > ff02::1:2.547: dhcp6 solicit
Of course, dnsmasq
for lxd0719
is running.
ubuntu@ubuntu18:~$ ps auxf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
.....
lxd 22920 0.0 0.0 52872 384 ? S Jul24 0:00 dnsmasq --strict-order --bind-interfaces --pid-file=/var/lib/lxd/networks/lxd0719/dnsmasq.pid --except-interface=lo --interface=lxd0719 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address
root 25961 0.0 0.0 605600 7336 ? Ss 15:57 0:00 [lxc monitor] /var/lib/lxd/containers test0719
100000 25983 0.1 0.0 37048 5184 ? Ss 15:57 0:00 \_ /sbin/init
100000 26052 0.0 0.0 35272 5000 ? Ss 15:57 0:00 \_ /lib/systemd/systemd-journald
100000 26057 0.0 0.0 41588 3316 ? Ss 15:57 0:00 \_ /lib/systemd/systemd-udevd
100000 26078 0.0 0.0 4412 1764 ? Ss 15:57 0:00 \_ /sbin/ifup -a --read-environment
100000 26207 0.0 0.0 4504 796 ? S 15:57 0:00 | \_ /bin/sh -c /sbin/dhclient -1 -6 -pf /run/dhclient6.eth0.pid -lf /var/lib/dhcp/dhclient6.eth0.leases -I -df /var/lib/dhcp/dhclient.eth0.leases eth0
100000 26208 0.0 0.0 16120 3704 ? S 15:57 0:00 | \_ /sbin/dhclient -1 -6 -pf /run/dhclient6.eth0.pid -lf /var/lib/dhcp/dhclient6.eth0.leases -I -df /var/lib/dhcp/dhclient.eth0.leases eth0
100104 26111 0.0 0.0 182660 3172 ? Ssl 15:57 0:00 \_ /usr/sbin/rsyslogd -n
100000 26112 0.0 0.0 28980 2824 ? Ss 15:57 0:00 \_ /usr/sbin/cron -f
100000 26126 0.7 0.0 4504 1768 ? S 15:57 0:00 \_ /bin/sh /etc/init.d/ondemand background
100000 26197 0.0 0.0 7288 648 ? S 15:57 0:00 | \_ sleep 60
100000 26160 0.0 0.0 16120 852 ? Ss 15:57 0:00 \_ /sbin/dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0
ubuntu@ubuntu18:~# cat /proc/22920/cmdline
dnsmasq--strict-order--bind-interfaces--pid-file=/var/lib/lxd/networks/lxd0719/dnsmasq.pid--except-interface=lo--interface=lxd0719--quiet-dhcp--quiet-dhcp6--quiet-ra--listen-address=10.228.181.1--dhcp-no-override--dhcp-authoritative--dhcp-leasefile=/var/lib/lxd/networks/lxd0719/dnsmasq.leases--dhcp-hostsfile=/var/lib/lxd/networks/lxd0719/dnsmasq.hosts--dhcp-range10.228.181.2,10.228.181.254,1h--listen-address=fd42:7e3e:264b:5dca::1--enable-ra--dhcp-rangefd42:7e3e:264b:5dca::2,fd42:7e3e:264b:5dca:ffff:ffff:ffff:ffff,1h-slxd-S/lxd/--conf-file=/var/lib/lxd/networks/lxd0719/dnsmasq.raw-ulxd