多个网卡绑定一个IP地址(bonding)
3月 23rd, 2005 by 剑气凌人, 1,189Views
使用多块网卡虚拟成为一块网卡,具有相同的IP地址。这项技术其实在sun和cisco中已经存在,分别称为Trunking和etherchannel技术,在linux中,这种技术称为bonding。
因为bonding在内核2.4.x以上的中已经包含了,只需要在编译的时候把网络设备选项中的 Bonding driver support选中就可以…
然后,重新编译核心,重新起动计算机,执行如下命令:
ismod bonding
ifconfig eth0 down
ifconfig eth1 down
ifconfig bond0 ipaddress
ifenslave bond0 eth0
ifenslave bond0 eth1
ifconfig eth0 down
ifconfig eth1 down
ifconfig bond0 ipaddress
ifenslave bond0 eth0
ifenslave bond0 eth1
现在两块网卡已经象一块一样工作了,这样可以提高集群节点间的数据传输。
你最好把这几句写成一个脚本,再由/etc/rc.d/rc.local调用,以便一开机就生效。
bonding对于服务器来是个比较好的选择,在没有千兆网卡时,用两三块100兆网卡作 bonding,可大大提高服务器到交换机之间的带宽。但是需要在交换机上设置连接bonding 网卡的两个口子映射为同一个虚拟接口。
Filed under 系统 having
3月 23rd, 2005 at 5:11 下午
偶公司的就是这一种!