Currently messing around with lxc containers and trying to add a lxc to more than 10 vlans.
Since this isnt possible via the proxmox ui (can only add max 10 interfaces) i did it inside the container, which works perfectly (see below),
the only issue proxmox overwrites the /etc/systemd/network/eth*.network on every container reboot and i kinda dont want to create a script that runs after every boot just adding it back.
Is there a way to prevent this or alternatively add additional arguments to the interfaces via lxc.conf?
Any advice appreciated![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Setup inside the LXC
One for Each VLAN, just replace the VLAN IDs
Since this isnt possible via the proxmox ui (can only add max 10 interfaces) i did it inside the container, which works perfectly (see below),
the only issue proxmox overwrites the /etc/systemd/network/eth*.network on every container reboot and i kinda dont want to create a script that runs after every boot just adding it back.
Is there a way to prevent this or alternatively add additional arguments to the interfaces via lxc.conf?
Any advice appreciated
Setup inside the LXC
Code:
## /etc/systemd/network/eth1.network
[Match]
Name = eth1
[Network]
Description = Interface eth1 autoconfigured by PVE
DHCP = no
IPv6AcceptRA = false
VLAN=vlan10
VLAN=vlan20
VLAN=vlan30
One for Each VLAN, just replace the VLAN IDs
Code:
## /etc/systemd/network/vlan10.netdev
[NetDev]
Name=vlan10
Kind=vlan
[VLAN]
Id=690
Parent=eth1
Code:
## /etc/systemd/network/vlan10.network
[Match]
Name=vlan10
[Network]
DHCP=yes