- 论坛徽章:
- 0
|
在centos 5.6下配置双网卡绑定,网卡:broadcom5709千兆网卡,交换机已做端口汇聚。配置后,显示eth0、eth1工作在100M,反而慢了,和解?求助!
配置如下:
1.编辑虚拟网络接口配置文件,指定网卡IP
[root@localhost root]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 ifcfg-bond0
2 #vi ifcfg-bond0,修改成如下内容
DEVICE=bond0
BOOTPROTO=static
IPADDR=172.17.0.226
NETMASK=255.255.0.0
GATEWAY=172.17.0.254
ONBOOT=yes
3 分别修改eth0和eth1的配置文件成下面格式
[root@localhost network-scripts]# cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
[root@localhost network-scripts]# cat ifcfg-eth1
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
4 # vi /etc/modprobe.conf
添加alias bond0 bonding
options bond0 miimon=100 mode=0
5 编辑# vi /etc/rc.d/rc.local ,加入两行
ifenslave bond0 eth0 eth1
route add -net 172.17.255.254 netmask 255.255.0.0 bond0
6 重起服务器,配置完成................
Bringing up interface bond0 OK
Bringing up interface eth0 OK
Bringing up interface eth1 OK
7 cat /proc/net/bonding/bond0,通过查看bond0的工作状态,如下:
Ethernet Channel Bonding Driver: v3.4.0-1 (October 7, 200
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 2
Permanent HW addr: 78:2b:cb:30:81:34
Slave Interface: eth1
MII Status: up
Speed:100 Mbps
Duplex: full
Link Failure Count: 4
Permanent HW addr: 78:2b:cb:30:81:36 |
|