手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

bond的配置方法

时间:2024-10-15 16:58:34

1、网卡水瑞侮瑜bond前期准备1.由于服务器网卡比较多,逻辑顺序与物理顺序不一定一致。首先要确定哪几块网卡布置了樘论罪朋网线,一般是有两块网卡对应两根网线,分别连接不同的交换机。查看所有网卡$lspci|grep net查看网卡2的信息,Link detected:yes表示有网线插入$ethtool eth2如果Link detected:no 的话,尝试用命令ifconfig eth2 up,如果用ethtool查看任然为no的话,才能说明此网卡确实没有网线插入。2.注意如果ifcfg-bond0的配置文件如果是从其他网卡配置文件拷贝过来的,HWADDR地址一定要删除,DEVICE名字要改。3.NetworkManager要关闭,建议临时和永久都关闭一下。$chkconfig NetworkManager off $service NetworkManager stop在《linux就该这么学》中查看负载均衡的配置。

2、更改要bo艘绒庳焰nd网卡的配置文件eth2,eth3为bond前的网卡名称,bond0为bond后的网卡名称,我们需要对这三个配置文围泠惶底件做更改。eth2:$vi /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE=eth2 HWADDR=44:A8:42:25:7C:FE BOOTPROTO=none ONBOOT=yes SLAVE=yes MASTER=bond0 TYPE=Etherneteth3:$vi /etc/sysconfig/network-scripts/ifcfg-eth3 DEVICE=eth3 HWADDR=44:A8:42:25:7D:01 BOOTPROTO=none ONBOOT=yes SLAVE=yes MASTER=bond0 TYPE=Ethernetbond0:$vi /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 BOOTPROTO=static ONBOOT=yes IPADDR=100.100.100.100 NETMASK=255.255.255.0 GATEWAY=100.100.100.1 TYPE=Ethernet

3、配置模式为bond6$vi /etc/modprobe.d/dist.conf在最后添加下面2行alias bond0 bonding options bond0 miimon=100 mode=6也可以用下面的命令添加$sed -i '$a alias bond0 bonding' /etc/modprobe.d/dist.conf $sed -i '$a options bond0 miimon=100 mode=6' /etc/modprobe.d/dist.conf

4、重启网络服务$service network restart

5、用nload查看流量$vim /root/.bash_profileexport PATH alias nload='nload -m -s 5 -u m -t 2000 bond0 eth2 eth3'$source /root/.bash_profile$nload

© 手抄报圈