Nov 9

[原]配置双网卡绑定bonding 晴

linuxing , 18:25 , 基础知识 » 硬件处理 , 评论(1) , 引用(0) , 阅读(42191) , Via 本站原创 | |


四、多个bond设备
若您需要激活多个bond设备,例如bond0、bond1对应不用的网卡。配置方法略微有点不
同。
1、ifcfg-bondX的配置和单个bond的配置没有区别

2、修改modprobe.conf
有2种修改方法:
a) 当2个或者多个bond网卡的所有参数(即bonding模块的参数,如mode、miimon 等)都相同时,加载bonding模块时设置 max_bonds参数即可。如max_bonds=2时,加载bonding驱动之后可以创建2个bond网卡bond0,bond1,修改后的modprobe.conf和下面的情形类似:
引用
....
alias bond0 bonding
alias bond1 bonding
options bond0 miimon=100 mode=1 max_bonds=2
....


b)当2个或者多个bond网卡的参数(即bonding模块的参数,如mode、miimon等)不同时,需要在加载bonding模块时修改模块的名称(文档中的说法是linux的模块加载系统要求系统加载的模块甚至相同模块的不同实例都需要有一个唯一的命名),修改后的modprobe.conf和下面的情形类似:
引用
....
install bond0 /sbin/modprobe --ignore-install bonding -o bond0
miimon=100 mode=0
install bond1 /sbin/modprobe --ignore-install bonding -o bond1
miimon=100 mode=1
....

※ 多bond设备的内容,来自赵超 zhaochao#redflag-linux.com

五、附录
1、详细的文档请参考内核文档
/usr/src/linux-x.x.x-xx.x/Documentation/networking/bonding.txt
2、其他配置方法
除了使用bond模块外,部分网卡驱动也能实现热备和负载均衡的绑定功能。前提是,要绑定的网卡必须为同一品牌,甚至同一型号的产品。这里提供一份文档供参考:Linux 下实现网卡高可用性的几种方法
内文分页: [1] [2]
Tags: ,
ticia
2008/11/09 18:27
niubilityzan
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]