qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to configure bridge networking on Ubuntu 21.04 host (Netplan)


From: Adam Kessel
Subject: Re: Unable to configure bridge networking on Ubuntu 21.04 host (Netplan) / MacOS guest
Date: Sat, 18 Sep 2021 16:56:28 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

On 9/17/2021 8:00 PM, Adam Kessel wrote:
I'm running Ubuntu 21.04 host (Netplan networking) and MacOS guest (from macOS-Simple-KVM). Attempting to get bridge networking to work either from qemu CLI or via virt-manager. While NAT works fine, I have not had any luck with bridge networking -- the guest cannot connect to the Internet and is unable to get an IP address via DHCP.

I've followed the various tutorials exactly, e.g. https://fabianlee.org/2019/04/01/kvm-creating-a-bridged-network-with-netplan-on-ubuntu-bionic/ , https://cplatform99.blogspot.com/2019/03/how-to-configure-linux-kvm-bridge-on.html , https://levelup.gitconnected.com/how-to-setup-bridge-networking-with-kvm-on-ubuntu-20-04-9c560b3e3991 , https://www.answertopia.com/ubuntu/creating-an-ubuntu-kvm-networked-bridge-interface/

I've tried setting both the Ethernet interface and the bridge interface to DHCP and with statically configured IP addresses. I've also tried a LAN-valid static IP address on the guest as well as DHCP. No combination of these settings gets me through to the network from the guest. I've tried going through the virt-manager GUI and also manually crafting qemu command-line switches. I've tried tun/tap as well as just connecting directly to br0. I've tried disabling my firewall. I do have IP Forwarding configured on the host.

My host has a very simple setup -- just one network card, IP address set by DHCP.

Can anyone point me to a dead-simple, failproof/foolproof method for enabling bridge networking with this setup? Is there something that changed with Ubuntu 21.04 (either with networking or the latest qemu) such that these older tutorials aren't working? Any suggestions for how to troubleshoot?

Figured it out! For the record, the missing piece was:


create /etc/sysctl.d/99-netfilter-bridge.conf


net.bridge.bridge-nf-call-ip6tables = 0

net.bridge.bridge-nf-call-iptables = 0

net.bridge.bridge-nf-call-arptables = 0


run


sysctl -p /etc/sysctl.d/99-netfilter-bridge.conf


and make sure br_netfilter module is loaded at boot


Now the bridge connects successful to the guest OS regardless of which technique I use.


Adam


reply via email to

[Prev in Thread] Current Thread [Next in Thread]