On 18.04, I have figured out how to get bonds, vlans, and bridges all working similarly to ifupdown. However, I am running a KVM server, and need the ability to add tagged vlan interfaces on the fly and bring them up individually without interrupting networking on the production box.
For example, ifup vlan123
However, it seems if I ran netplan apply to apply changes to yaml file, networking is interrupted to the server for at least 10-15 seconds. This would not bode well for production boxes.
Is there a way to add new vlans on the fly and bring them up without interrupting networking to the whole server?
Many thanks in advance.
You can do this using
ip
commands:The above adds a new VLAN to enp3s0, using VLAN ID 101, named lan3.
You'd then want to add that VLAN to the netplan YAML as well, so it is persistant across reboots.
From there, you can also add addresses to the interface or do other manipulations necessary to bring up the interface:
Additionally, you may want to add:
To an interface if the issue is that it will rerequest an IP from DHCP. That field in netplan tells systemd-networkd not to bring it down at all, it might help here.