Lxd network managed bridge if-up script

networking

(Beyers Cronje) #1

TLDR How do run a if-up type script on lxd managed bridges? I need to disable nic offloading.

I need to disable nic offloading features on all my bridges. In earlier lxd versions I used ifupdown to manually configure my bridges and disable offloading features in if-up. With latest lxd versions we want to manage the network configuration via “lxd network”. How would I run if-up type scripts to disable nic offloading on lxd managed networks? If there a config setting that can be applied maybe?


(Stéphane Graber) #2

I think the easiest is likely a systemd unit file which uses BindsTo=sys-devices-virtual-net-lxdbr0.device or similar configuration to trigger every time the particular network device shows up.