On Tue, 12 Dec 2023 19:03:01 -0700
Sbob wrote:
Hi;
I'm running Fedora 39, I have installed qemu / libvirt / kvm
I have found many guides on setting up bridged networking but none have
worked. Can someone point me to a proper guide?
For what it is worth (possibly not much) I'm including the notes I
made about setting up a bridge with the network manager command
line tools (not that any MAC addresses here are unique to my ethernet
and you should substitute your own):
Experimenting with Network Manager (to be able to survive when
they eradicate "network").
eradicate stoopid default virt network
virsh net-destroy default
virsh net-undefine default
add net.ifnames=0 biosdevname=0 to kernelopts in grubenv
(use grub2-editenv).
reboot
https://www.cyberciti.biz/faq/how-to-add-network-bridge-with-nmcli-networ...
nmcli con show
nmcli con add ifname br0 type bridge con-name br0
nmcli con add type bridge-slave ifname eth0 master br0
nmcli con down "Wired connection 1"
nmcli con up br0
nmcli con show
From fedora mailing list:
nmcli con mod br0 ipv4.ignore-auto-dns yes
Also this:
nmcli con mod br0 bridge.mac-address b4:2e:99:a4:67:5c
This all works, but takes forever to start. Found another
web page that says I should turn off stp:
https://bbs.archlinux.org/viewtopic.php?id=207379
The original page mentioned you could do that, but didn't say
why you'd want to. Now I know why :-).
nmcli con modify br0 bridge.stp no
Holy chow! This seems to work, no more delay. I should try this
at work :-).
Now I need a bridge for "bifrost" with no damn slave
nmcli con add ifname bifrost type bridge con-name bifrost
nmcli con modify bifrost bridge.stp no
nmcli con modify bifrost ipv4.method manual
nmcli con modify bifrost ipv4.address 192.168.2.99/24
nmcli con modify bifrost ipv4.gateway 192.168.2.1
nm-connection-editor shows me this definition now (though it
sure as hell didn't let me define it via the gui).
Looks like it works. I got the firewall cranked back up now
that bifrost exists and I can start firewall and midgard
and the network functions in midgard as expected. Perhaps
I finally have everything working with NetworkManager.
Ah-HA! I perhaps need this:
nmcli con modify bifrost ipv4.never-default true
In fedora 33 upgrade I didn't get my.lan search:
Try editing /etc/NetworkManager/NetworkManager.conf and putting
dns=none after the [main] section entry.
Then create a real resolv.conf file:
nameserver 127.0.0.1
search my.lan
New thing since f36, need to install
NetworkManager-initscripts-ifcfg-rh.x86_64
otherwise it won't read the ifcfg scripts.
/fedora37/etc/sysconfig/network-scripts/readme-ifcfg-rh.txt has more info.
I should try migrating to keyfiles as I get f37 installed.