系统相关
首页 > 系统相关> > centos网卡做bond

centos网卡做bond

作者:互联网

1: 单个bond设备举例说明: 创建bond网卡(vim /etc/sysconfig/network-scripts/ifcfg-bond0): DEVICE=bond0 IPADDR=192.168.1.20 NETMASK=255.255.255.0 USERCTL=no BOOTPROTO=none ONBOOT=yes   修改eth0网卡文件(vim /etc/sysconfig/network-scripts/ifcfg-eth0): DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none   修改eth1网卡文件(vim /etc/sysconfig/network-scripts/ifcfg-eth1): DEVICE=eth1 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none   创建modprobe.conf文件(vim /etc/modprobe.d/modprobe.conf)添加下面内容: alias bond0 bonding options bond0 miimon=100 mode=1   输入下面命令 echo “ifenslave  bond0 eth0 eth1”>>/etc/rc.d/rc.local ifconfig  bond0 192.168.1.20 up ifenslave  bond0 eth0 eth1   2:多个bond设备举例说明 若您需要激活多个bond设备,例如bond0、bond1对应不用的网卡。配置方法略微有点不 同。 1、ifcfg-bondX的配置和单个bond的配置没有区别 2、修改modprobe.conf 1) 当2个或者多个bond网卡的所有参数(即bonding模块的参数,如mode、miimon 等)都相同时,加载bonding模块时设置 max_bonds参数即可。如max_bonds=2时,加载bonding驱动之后可以创建2个bond网卡bond0,bond1,修改后的modprobe.conf和下面的情形类似: alias bond0 bonding alias bond1 bonding alias bond2 bonding options bond0 miimon=100 mode=1 max_bonds=3

标签:bond0,centos,网卡,bonding,yes,eth1,bond
来源: https://www.cnblogs.com/liqshome/p/14892702.html