Setup bridge device on CentOS
Posted on Di 19 April 2011 in misc
Howto setup a bridge device on CentOS or Fedora.
If you need to bring your KVM VM's into the same local area network like your host is in you need to configure a bridge device.
Install all needed packages:
yum install bridge-utils
yum install tunctl
Disable NetworkManager and enable network at boot time:
chkconfig NetworkManager off
chkconfig --levels 35 network on
/etc/init.d/NetworkManager stop
/etc/init.d/network restart
Create br0 configuration
vi /etc/sysconfig/network-scripts/ifcfg-br0
Change following configuration to your needs.
DEVICE=br0TYPE=BridgeBOOTPROTO=staticDNS1=192.168.0.1GATEWAY=192.168.0.1IPADDR=192.168.0.100NETMASK=255.255.255.0ONBOOT=yesSEARCH="example.com"
Modify eth0 configuration:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0HWADDR=00:1e:90:f3:f0:02ONBOOT=yesTYPE=EthernetIPV6INIT=noUSERCTL=noBRIDGE=br0
5. Restart network or reboot machine to see if everything is configured persistent
/etc/init.d/network restart
or
reboot
Here are some additional information on the libvirt page. If you have performance problems with your bridge device you maybe need to disable the netfilter on the bridge interface.