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
RHEL6.x 双网卡绑定配置
最新推荐文章于 2021-05-11 19:30:31 发布