Install the following:
Bridge-utils and tunctl
Yum search:
Yum install bridge-utils.noarch
Yum install tunctl. x86_64
1. Check whether the logical (virtual) Bridge interface exists
Brctl show
If it already exists, use brctl delbr + bridge name to delete it.
2. Add a new logical (virtual) Bridge interface br0
Brctl addbr br0
3. Create a New tap0, which can be used by virtual machines.
Tunctl-B // It should be a tap0
4. Add eth0 and tap0 to the logical (virtual) Bridge br0
Brctl addif br0 eth0
Brctl addif br0 tap0
5. Combine eth0 and tap0 into a hybrid mode.
Ifconfig eth0 0.0.0.0
Ifconfig tap0 0.0.0.0
6. Configure and start the Bridge IP Address
Ifconfig br0 10.239.54.105 up
7. Disable the Bridge command
Brctl delif ENA eth1;
Brctl delif ENA eth0;
Ifconfig ENA down;
Brctl delbr ENA;
8. Start the Bridge command
Ifconfig ENA up;
Summary:
The main command is brctl.
1. Create a bridge device br0: brctl addbr br0
2. Add the network adapter eth0 eth1 to br0
Brctl addif eth0
Brctl addif eth1
3. Delete the network adapter eth0 eth1 from the bridge
Brctl delif eth0
Brctl delif eth1
4. Delete the bridge br0: brctl delbr br0
PS: the above steps can be manually configured to create a ifcfg-br0 under the/etc/sysconfig/network-scripts/directory (br0 is the bridge interface name), configure ifcfg-br0, ifcfg-eth0, etc.
Refer:
Http://www.cnblogs.com/iceocean/articles/1594193.html
Http://sqxsqx84.blog.163.com/blog/static/2343305120095872539938/