I have a new network model working on VLANS that seems to work well, then I noticed Incus can also manage VLAN’s, so naturally I thought this would be better than hand-configuring my network setup in systemd-networkd (!)
I’m clearly doing something wrong in this regard, as soon as I start a container attached to my new managed VLAN, the vlan seems to disappear!
# incus network create dhcp --type=physical parent=eth1 --target=worf
# incus network create dhcp --type=physical parent=eth1 --target=p400
# incus network create dhcp --type=physical vlan=100
Network dhcp created
# ifconfig eth1.100
eth1.100: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::6e6e:7ff:fe16:a598 prefixlen 64 scopeid 0x20<link>
ether 6c:6e:07:16:a5:98 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 19 bytes 3241 (3.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
All good, eth1.100 also shows up in the UI.
Now attach a container to the network.
# incus network attach dhcp demo
root@worf:~# ifconfig eth1.100
eth1.100: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::6e6e:7ff:fe16:a598 prefixlen 64 scopeid 0x20<link>
ether 6c:6e:07:16:a5:98 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 19 bytes 3241 (3.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Looks Ok, so now start the container …
# incus start demo
# ifconfig eth1.100
eth1.100: error fetching interface information: Device not found
What just happened?!
I’m seeing this in the logs;
Jun 21 11:32:26 worf systemd-networkd[334]: eth1.100: Link DOWN
Jun 21 11:32:26 worf avahi-daemon[776]: Interface eth1.100.IPv6 no longer relevant for mDNS.
Jun 21 11:32:26 worf systemd-networkd[334]: eth1.100: Lost carrier
Jun 21 11:32:26 worf avahi-daemon[776]: Leaving mDNS multicast group on interface eth1.100.IPv6 with address fe80::6e6e:7ff:fe16:a598.
Jun 21 11:32:26 worf avahi-daemon[776]: Withdrawing address record for fe80::6e6e:7ff:fe16:a598 on eth1.100.
Jun 21 11:32:26 worf avahi-daemon[776]: Withdrawing workstation service for eth1.100.
Jun 21 11:32:26 worf kernel: physwIhXug: renamed from eth1.100
Jun 21 11:32:26 worf kernel: eth0: renamed from physwIhXug
which doesn’t make a lot of sense to me … can anyone tell me what’s going on here, and even better, how the network still seems to be working without the vlan present … (?)