Configuration of a bridge with a static IP with the netplan to be used with linux container

by milanBart   Last Updated January 13, 2018 01:02 AM

Summary: how to configure the netplan on a host machine to create a bridge (with a static IP address) that would be used on guest virtual machine (shall be accessible from a local lan).

I am using Ubuntu 17.10, 32 bit. nplan 0.32~17.10.1.

I am trying to configure a linux virtual container that should be accessible from the local network. But I am failing to configure a bridge on host machine with the nplan.
I have tried to follow the following guide with no luck:
The guide configures a host system with two NICs. My host machine has a single interface.

I am still dealing with the nplan configuration on my host machine. My nplan config on host machine is the following:

  version: 2  
  renderer: networkd  
      dhcp4: no  
      dhcp6: no  
      addresses: []  
        addresses: [,,]  
      interfaces: [ens32]  
      dhcp4: no  
      dhcp6: no  
      addresses: []  
        stp: false  
        forward-delay: 0  

after 'netplan apply' on host machine I can resolve, but I can not ping:

PING ( 56(84) bytes of data.  
From fileserver ( icmp_seq=1 Destination Host Unreachable  

ip a  
1: lo ...  
2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000  
    link/ether 00:01:2e:4c:4c:97 brd ff:ff:ff:ff:ff:ff  
    inet brd scope global ens32  
       valid_lft forever preferred_lft forever  
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000  
    link/ether ba:5f:c3:f0:a8:bd brd ff:ff:ff:ff:ff:ff  
    inet brd scope global br0  
       valid_lft forever preferred_lft forever  

When I remove the complete section 'bridges:' from the nplan config I have to reboot the computer to get rid of the bridge (netplan apply is not enough - why?).

After the reboot, I can ping

Any help with the nplan configuration (on host and also on virtual guest) would be very welcome.

Thank you.

Related Questions

IPless bridge setup

Updated September 04, 2018 13:02 PM

Network setup with Netplan and bridges

Updated April 29, 2018 11:02 AM