While attending the Virtualization Track at LinuxTag I’ve noticed setting up bridged networking troubles alot of people, so here is how I’m doing it. The problem with bridge setup is that it works best without any surprising side effects when it is done using the network startup scripts of your linux distribution. And unfortunaly each distribution goes its own ways here. So this applies to RHEL and Fedora only.
First make sure you are using the classic network setup scripts instead of the network manager:
# chkconfig NetworkManager off
# chkconfig network on
Then go to /etc/sysconfig/network-scripts, there are ifcfg-* files, one for each interface. Create a ifcfg-br0 file there:
This will make the network scripts create a bridge named br0. The bridge settings are marked bold. The other settings are the usual stuff you can put in there, the example uses autoconfig for IPv6 and DHCP for IPv4.
Then edit the file for your physical network interface (probably ifcfg-eth0) to make the network scripts hook eth0 up in br0, so your bridge is connected to the real network:
Finally restart the network using
service network restart
and you should be set. Libvirt should detect the new br0 bridge just fine and offer to use it to hook up your virtual machines to the network.