Hi all,
I’m having problem with the fan network, here are my settings and looking any help to resolve the issue. When I execute the command “lxc launch images:alpine/edge atest -p fanprofile”, atest container doesn’t appear with the IP address. What could be the problem any assist will be appreciated.
Regards.
Okay, so there’s something wrong there.
I don’t know if it’s a LXD bug or something else on your system though.
I would have expected the same set of INPUT rules for fanbr0 as for lxdbr0, but while you have the FORWARD ones, you’re missing the INPUT ones…
Can you try systemctl reload snap.lxd.daemon and see if that makes them appear?
If not, then it’s a LXD bug, hopefully one that @tomp can trivially fix (I think he looked at some of that code recently).
Thanks @graber for the investigation. I reload as you have mentioned but nothing changed for the container side. Here are my iptables output before the systemctl reload and after.
Before the reload
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- lxdbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 /* generated for LXD network lxdbr0 */
9 460 ACCEPT udp -- lxdbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53 /* generated for LXD network lxdbr0 */
8 2511 ACCEPT udp -- lxdbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67 /* generated for LXD network lxdbr0 */
797K 666M ufw-before-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
797K 666M ufw-before-input all -- * * 0.0.0.0/0 0.0.0.0/0
1765 523K ufw-after-input all -- * * 0.0.0.0/0 0.0.0.0/0
286 36205 ufw-after-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
286 36205 ufw-reject-input all -- * * 0.0.0.0/0 0.0.0.0/0
286 36205 ufw-track-input all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
4 4226 ACCEPT all -- * lxdbr0 0.0.0.0/0 0.0.0.0/0 /* generated for LXD network lxdbr0 */
6 856 ACCEPT all -- lxdbr0 * 0.0.0.0/0 0.0.0.0/0 /* generated for LXD network lxdbr0 */
0 0 ACCEPT all -- * fanbr0 0.0.0.0/0 0.0.0.0/0 /* generated for LXD network fanbr0 */
0 0 ACCEPT all -- fanbr0 * 0.0.0.0/0 0.0.0.0/0 /* generated for LXD network fanbr0 */
1920K 1296M ufw-before-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
1920K 1296M ufw-before-forward all -- * * 0.0.0.0/0 0.0.0.0/0
20574 1760K ufw-after-forward all -- * * 0.0.0.0/0 0.0.0.0/0
20574 1760K ufw-after-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
20574 1760K ufw-reject-forward all -- * * 0.0.0.0/0 0.0.0.0/0
20574 1760K ufw-track-forward all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 35 packets, 2937 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * lxdbr0 0.0.0.0/0 0.0.0.0/0 tcp spt:53 /* generated for LXD network lxdbr0 */
9 575 ACCEPT udp -- * lxdbr0 0.0.0.0/0 0.0.0.0/0 udp spt:53 /* generated for LXD network lxdbr0 */
8 2659 ACCEPT udp -- * lxdbr0 0.0.0.0/0 0.0.0.0/0 udp spt:67 /* generated for LXD network lxdbr0 */
716K 109M ufw-before-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
716K 109M ufw-before-output all -- * * 0.0.0.0/0 0.0.0.0/0
46630 3634K ufw-after-output all -- * * 0.0.0.0/0 0.0.0.0/0
46630 3634K ufw-after-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
46630 3634K ufw-reject-output all -- * * 0.0.0.0/0 0.0.0.0/0
46630 3634K ufw-track-output all -- * * 0.0.0.0/0 0.0.0.0/0
After the reload
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- lxdbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 /* generated for LXD network lxdbr0 */
0 0 ACCEPT udp -- lxdbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53 /* generated for LXD network lxdbr0 */
0 0 ACCEPT udp -- lxdbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67 /* generated for LXD network lxdbr0 */
801K 669M ufw-before-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
801K 669M ufw-before-input all -- * * 0.0.0.0/0 0.0.0.0/0
1807 537K ufw-after-input all -- * * 0.0.0.0/0 0.0.0.0/0
286 36205 ufw-after-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
286 36205 ufw-reject-input all -- * * 0.0.0.0/0 0.0.0.0/0
286 36205 ufw-track-input all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * lxdbr0 0.0.0.0/0 0.0.0.0/0 /* generated for LXD network lxdbr0 */
0 0 ACCEPT all -- lxdbr0 * 0.0.0.0/0 0.0.0.0/0 /* generated for LXD network lxdbr0 */
0 0 ACCEPT all -- * fanbr0 0.0.0.0/0 0.0.0.0/0 /* generated for LXD network fanbr0 */
0 0 ACCEPT all -- fanbr0 * 0.0.0.0/0 0.0.0.0/0 /* generated for LXD network fanbr0 */
1921K 1297M ufw-before-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
1921K 1297M ufw-before-forward all -- * * 0.0.0.0/0 0.0.0.0/0
20672 1786K ufw-after-forward all -- * * 0.0.0.0/0 0.0.0.0/0
20672 1786K ufw-after-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
20672 1786K ufw-reject-forward all -- * * 0.0.0.0/0 0.0.0.0/0
20672 1786K ufw-track-forward all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 4 packets, 160 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * lxdbr0 0.0.0.0/0 0.0.0.0/0 tcp spt:53 /* generated for LXD network lxdbr0 */
0 0 ACCEPT udp -- * lxdbr0 0.0.0.0/0 0.0.0.0/0 udp spt:53 /* generated for LXD network lxdbr0 */
0 0 ACCEPT udp -- * lxdbr0 0.0.0.0/0 0.0.0.0/0 udp spt:67 /* generated for LXD network lxdbr0 */
720K 110M ufw-before-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
720K 110M ufw-before-output all -- * * 0.0.0.0/0 0.0.0.0/0
47057 3670K ufw-after-output all -- * * 0.0.0.0/0 0.0.0.0/0
47057 3670K ufw-after-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
47057 3670K ufw-reject-output all -- * * 0.0.0.0/0 0.0.0.0/0
47057 3670K ufw-track-output all -- * * 0.0.0.0/0 0.0.0.0/0
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether bc:ae:c5:47:57:93 brd ff:ff:ff:ff:ff:ff
3: enp1s6f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 6c:b3:11:49:03:1a brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global enp1s6f0
valid_lft forever preferred_lft forever
inet6 fe80::6eb3:11ff:fe49:31a/64 scope link
valid_lft forever preferred_lft forever
4: enp1s6f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 6c:b3:11:49:03:1b brd ff:ff:ff:ff:ff:ff
inet 192.168.0.13/24 brd 192.168.0.255 scope global enp1s6f1
valid_lft forever preferred_lft forever
inet6 fe80::6eb3:11ff:fe49:31b/64 scope link
valid_lft forever preferred_lft forever
8: lxdbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:14:e6:07 brd ff:ff:ff:ff:ff:ff
inet 10.23.4.1/24 scope global lxdbr0
valid_lft forever preferred_lft forever
inet6 fd42:4571:a731:d8a0::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe14:e607/64 scope link
valid_lft forever preferred_lft forever
14: veth463f0887@if13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxdbr0 state UP group default qlen 1000
link/ether 72:65:d7:d7:18:45 brd ff:ff:ff:ff:ff:ff link-netnsid 2
22: vethb2cb2ffb@if21: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxdbr0 state UP group default qlen 1000
link/ether 06:85:1b:a8:1c:ce brd ff:ff:ff:ff:ff:ff link-netnsid 5
50: fanbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:95:d8:4f brd ff:ff:ff:ff:ff:ff
inet 240.13.0.1/8 scope global fanbr0
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe95:d84f/64 scope link
valid_lft forever preferred_lft forever
60: vethb1e55472@if59: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxdbr0 state UP group default qlen 1000
link/ether b6:8d:aa:ba:60:3f brd ff:ff:ff:ff:ff:ff link-netnsid 1
67: fanbr0-mtu: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1450 qdisc noqueue master fanbr0 state UNKNOWN group default qlen 1000
link/ether a2:ce:3a:f1:ea:ad brd ff:ff:ff:ff:ff:ff
inet6 fe80::a0ce:3aff:fef1:eaad/64 scope link
valid_lft forever preferred_lft forever
68: fanbr0-fan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master fanbr0 state UNKNOWN group default qlen 1000
link/ether 52:0d:08:28:8b:10 brd ff:ff:ff:ff:ff:ff
inet6 fe80::500d:8ff:fe28:8b10/64 scope link
valid_lft forever preferred_lft forever
70: veth3bfba476@if69: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master fanbr0 state UP group default qlen 1000
link/ether be:7c:11:77:35:56 brd ff:ff:ff:ff:ff:ff link-netnsid 0
root@mars:~# ip r
default via 192.168.0.1 dev enp1s6f1 proto static
10.23.4.0/24 dev lxdbr0 proto kernel scope link src 10.23.4.1
192.168.0.0/24 dev enp1s6f1 proto kernel scope link src 192.168.0.13
192.168.1.0/24 dev enp1s6f0 proto kernel scope link src 192.168.1.1
240.0.0.0/8 dev fanbr0 proto kernel scope link src 240.13.0.1
Humm, @tomp bingo, disabling UFW and reloading lxd correct the situation, now container gets the IP address. Enabling UFW prevent dhcp packets, i suppose.