how-to Create Virtual Bridge

This is kinda old, but pretty helpful. I find myself referring to these notes often so I thought I would share

1. Create Virtual Bridge
# brctl addbr br0

verify with: brctl show

2. Create network script, edit /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes

3. Edit eth0 network script add…

BRIDGE=br0
4. Add your physical interface to the bridge
# brctl addif br0 eth0

verify with: brctl show

5. Restart your network services
# service network restart

References:

http://www.linux-kvm.com/content/using-bridged-networking-virt-manager

http://www.linux-kvm.com/content/tip-how-get-maximum-network-performance-using-paravirtual-drivers-and-bridged-networking

One response

  1. Was talking with my friend Gareth Jenkins today and he was experiencing an unexpected issues where once the bridge is set up doing a “ifup br0” failed because eth0 was down. We both expected that once the bridge is set up “ifup br0” would also bring up eth0 which looks not to be the case.

    TO fix this either set both eth0 and br0 to “onboot=yes” and restart networking “service network restart”

    or if you’re using RHEL or Fedora, you can use “virsh iface-start br0”, which, under the covers, calls netcf, and netcf ifup’s all the subordinate interfaces before bringing up the main interface.

    05/16/2012 at 10:11 AM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s