1. Install the bridge package
yum install bridge-utils
2, modify the file/etc/sysconfig/network-scropts/ifcfg-eth0;
Bridge = br0
Delete the following
ONBOOT=yesIPADDR=10.0.0.23NETMASK=255.255.255.0GATEWAY=10.0.0.1DNS1=61.134.1.4
3. Create the file/etc/sysconfig/network-scripts/ifcfg-br0;
Bevice = br0bootproto = nonetype = bridgeonboot = yesdelay = 0 ipaddr = 10.0.0.23netmask = 255.255.255.0gateway = 10.0.0.1dns1 = 61.134.1.4)
4. Restart;
5. Check whether the bridge exists;
/Usr/sbin/brct1 show
If successful
[[email protected] ~]# brctl showbridge name bridge id STP enabled interfacesbr0 8000.000c297c68aa no eth0[[email protected] ~]# ifconfig br0br0 Link encap:Ethernet HWaddr 00:0C:29:7C:68:AA inet addr:10.0.0.22 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe7c:68aa/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2268 errors:0 dropped:0 overruns:0 frame:0 TX packets:558 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:134076 (130.9 KiB) TX bytes:76172 (74.3 KiB)
W view current user
ip addr show eth0ip -s link show eth0ip route/traceroute/dig