0

I hope you can help me. I'm pretty sure the solution is quite simple, but so far I'm unable to put the finger on the problem....

I'm trying to setup a network bridge adapter with Netplan to use it with my KVM guest machine. I followed a couple of tutorial, including the one on Netplan.io and so far none of these worked.

As of right now, my configure looks like this (01-netcfg.yaml) :

network:
  version: 2
#  renderer: networkd
  renderer: NetworkManager

  ethernets:
    enp3s0:
      dhcp4: yes

  bridges:
    br0:
      dhcp4: yes
      interfaces:
        - enp3s0

which is "almost" a copy-paste from the Netplan website tutorial. But when I check with networkctl, i got this :

● 1: lo
       Link File: /usr/lib/systemd/network/99-default.link
    Network File: n/a
            Type: loopback
           State: n/a (unmanaged)
         Address: 127.0.0.1
                  ::1

● 2: enp3s0
       Link File: /usr/lib/systemd/network/99-default.link
    Network File: n/a
            Type: ether
           State: n/a (unmanaged)
            Path: pci-0000:03:00.0
          Driver: r8169
          Vendor: Realtek Semiconductor Co., Ltd.
           Model: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (Onboard Ethernet)
      HW Address: 1c:1b:0d:ef:08:d6 (GIGA-BYTE TECHNOLOGY CO.,LTD.)
         Address: 10.0.0.50
                  fe80::d47d:fce7:1e9c:54f4
         Gateway: 10.0.0.1 (TP-LINK TECHNOLOGIES CO.,LTD.)

● 3: virbr0
       Link File: /usr/lib/systemd/network/99-default.link
    Network File: n/a
            Type: bridge
           State: n/a (unmanaged)
          Driver: bridge
      HW Address: 52:54:00:b9:f4:aa

● 4: virbr0-nic
       Link File: /usr/lib/systemd/network/99-default.link
    Network File: n/a
            Type: ether
           State: n/a (unmanaged)
          Driver: tun
      HW Address: 52:54:00:b9:f4:aa

● 23: br0
       Link File: /usr/lib/systemd/network/99-default.link
    Network File: n/a
            Type: bridge
           State: n/a (unmanaged)
          Driver: bridge
      HW Address: c6:d9:4f:71:c2:62

The br0 bridge I've just created is always with the State unmanaged, and when I check my KVM host to which the card is connected, the network is not detected.

As i said at the beginning, I'm pretty sure the error is obvious but I can't find it. So any help is appreciated :)

1

I think you may have a problem with who is trying to get an address through DHCP (it should be the bridge, NOT the physical device).

Both your OS and the KVM guests will get their DHCP config from the bridge.

This is my working configuration:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp5s0:
      dhcp4: no
      dhcp6: no
  bridges:
    br0:
      interfaces:
        - enp5s0
      dhcp4: yes
      dhcp6: no

Make sure there is NO DHCP in the interface and only on the bridge.

Also, after sudo netplan apply, make sure to reboot, it is more reliable than restarting the network.

Any particular reason you're getting NetworkManager to be the renderer? (makes sense if this is a laptop or desktop, but it's unnecessary in a server).

|improve this answer|||||
  • Well, it seemed that switching from NetworkManager to networkd was the trick! I now need to learn to use openVPN with networkd....how hard can it be ;) – Patrick Pruneau Mar 13 at 0:32
  • I would think that NetworkManager should still be able to manage a VPN connection through a device managed by networkd, but it's just a feeling, I have nothing solid to base it on. – Kurankat Mar 13 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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