I am trying to create a bridge using Netplan.
I copied this part of the guide.

But it gives me an error:

root@ubuntu:~# netplan generate
Error in network definition //etc/netplan/01-netcfg.yaml line 9 column 10: br0: interface eth0 is not defined

To reference the eth0 interface as an interface in the bridge, you must also declare that physical interface in your yaml, even if you have no other configuration to attach to it. I.e.:

  version: 2
  renderer: networkd
      dhcp4: false
      dhcp4: yes
        - eth0

The netplan.io example should be updated to reflect this.

  • This seems to be working. How about using static configuration ? – Jevin Gala Dec 5 at 13:50
  • static configuration meaning what, exactly? – slangasek Dec 6 at 14:04
  • I mean static configuration for bridge instead of Dhcp . – Jevin Gala Dec 8 at 6:37
  • You configure a static address on a bridge the same way you configure it on an ethernet, just put the config under the right device: netplan.io/examples#dhcp-and-static-addressing – slangasek Dec 10 at 20:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.