RHEL6.x 双网卡绑定配置

1.关闭防火墙

setenforce 0      setenforce 0 表示关闭selinux防火墙
service iptables stop
chkconfig iptables off

2.  关闭selinux

vi /etc/selinux/config
SELINUX=disabled

3.关闭NetworkManager

service NetworkManager stop /status
chkconfig NetworkManager off

4.配置网卡绑定

cd /etc/sysconfig/network-scripts 
cp ifcfg-eth3 ifcfg-bond0     bond1
vi *bond0   bond1
DEVICE=bond0   bond1
        TYPE=Ethernet
ONBOOT=yes    
NM_CONTROLLED=no    
BOOTPROTO=static( none 和static 差别不大)             
IPADDR=xxxxxxxxxxxxxxx   11.2.2.65
NETMASK=xxxxxxxxxxxxxxx 
vi ifcfg-eth3
DEVICE=eth3
TYPE=Ethernet
ONBOOT=no (yes 也可以 开机是否激活设备    )  
NM_CONTROLLED=no
BOOTPROTO=none    
MASTER=bond0  bond1
SLAVE=yes
vi ifcfg-eth5 
DEVICE=eth5
TYPE=Ethernet 
ONBOOT=no
NM_CONTROLLED=no
BOOTPROTO=none
MASTER=bond0  bond1
SLAVE=yes
cd /etc/modprobe.d
vi bonding.conf
alias bond0 bonding
options bond0 mode=2 miimon=100  (负载均衡 load balance xor)

cat /etc/modprobe.d/bonding.conf 
alias bond0 bonding
alias bond1 bonding
options bond0  miimon=100 mode=2
options bond1  miimon=100 mode=2  

5.配置网关

vi /etc/sysconfig/network

加一行:
GATEWAY=XXXXXXXXXXXXXXXxx(bond网关)
    cat /proc/net/bonding/bond0  bond1

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值