I'm trying to connect the Ubuntu 18.04 guest machine to the network on my Kubuntu 18.04 host laptop via bridge adapter. The Ubuntu guest won't recognize it, however.

I read about how I should be modifying netplan .yaml file, but I'm not exactly sure how to set up bridge network with it.

This is what the yaml file looks like so far:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

# Added everything from here myself
  ethernets:
    enp1s0:
      dhcp4: true
      dhcp6: true

  wifis:
    wlp2s0:
      dhcp4: true
      dhcp6: true

  bridges:
    br0:
      interfaces: [enp1s0, wlp2s0]
      dhcp4: true
      dhcp6: true
    br1:
      interfaces: [enp1s0]
      dhcp4: true
      dhcp6: true

I got this when I ran # netplan generate:

Error in network definition //etc/netplan/01-network-manager-all.yaml line 12 column 6: wlp2s0: No access points defined

I'm not sure what I'm doing wrong exactly. Was I supposed to list every access point the interface is using?

Couple of sites I checked out:

  • Does wlp2s0 exist on your system in an active state? And where is the netplan YAML you're editing, on the guest or on the host? – Thomas Ward Oct 2 at 18:58
  • Yes. That's the only WiFi interface on my laptop. I updated the post because I pasted the wrong error. – YamiYukiSenpai Oct 2 at 18:58
  • And the netplan YAML file is on the host @ThomasWard – YamiYukiSenpai Oct 2 at 21:12

Might I suggest KVM over Virtualbox. The advantages are numerous. I have a Netplan bridged VLAN for my virtual machines. Here is my YAML:

network:
 version: 2
 renderer: networkd
 ethernets:
  enp65s0f0:
    dhcp4: false
    dhcp6: false
  enp65s0f1:
    dhcp4: false
    dhcp6: false
  enp5s0:
    dhcp4: true
    dhcp6: true
  enp0s31f6:
    dhcp4: false
    dhcp6: false
 bonds:
  bond-lan:
    dhcp4: true
    dhcp6: true
    interfaces:
      - enp65s0f0
      - enp65s0f1
    parameters:
      mode: 802.3ad
 bridges:
   br0:
     addresses: [ 10.0.1.1/24 ]
     nameservers:
       search: [local]
       addresses: [10.0.0.3]
     interfaces: [ enp5s0 ]
 vlans:
   vlan15:
   accept-ra: no
   id: 15
   link: enp5s0

This has 4 nics, two bonded together, and a bridged vlan on one for my virtual machines. Be careful with you YAML files, they are very sensitive to formatting. I am pretty sure there is also a firewall option in your kernel parameters that needs to be set in order to not check bridged traffic. You can also put in the appropriate rules. If you go the KVM was, install Virt-Manager and in the VM's prefs, set the interface to br0 (at least in my config).

  • What about WiFi? Do I have to manually enter access-points and their passwords? Is there a way to make a WiFi entry without creating multiple access-points entries? – YamiYukiSenpai Oct 3 at 14:42

I am not familiar with netplan, but presumably this creates connection profiles for NetworkManager.

A WiFi connection profile in NetworkManager must always specify an SSID. That means, you cannot create a WiFi profiles that isn't tied to a particular network. That makes sense (??), because the profile essentially contains the parameters necessary to connect to the WiFi network. As these parameters commonly differ between networks (except for open networks), you need a profile per network.

In NetworkManager, the properties to enslave the device to a bridge (connextion.slave-type and connection.master) are also part of the connection profile.

In netplan, if you specify a WiFi network, this could only map to the entity which NetworkManager understands: the profile. Since you specify no SSIDs, it cannot create any profiles and fails.

It's unclear what netplan or NetworkManager could do better here.

  • A more helpful suggestion might be: configure the wifi profiles in NetworkManager directly. Make sure that for every profile you create, to set Slave-Type and master – thaller Oct 4 at 7:03

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.