1.登录系统切换目录:
# cd /etc/sysconfig/network-scripts/
2.添加绑定网卡bond#的配置
# vim ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=59.151.2.134
NETMASK=255.255.255.240
GATEWAY=59.151.2.129
# vim ifcfg-bond1
DEVICE=bond1
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.16.10.134
NETMASK=255.255.255.0
3.修改原来的网卡配置文件内容为:
# cat ifcfg-em*
DEVICE=em1
ONBOOT=yes
BOOTPROTO=none
DEVICE=em2
ONBOOT=yes
BOOTPROTO=none
DEVICE=em3
ONBOOT=yes
BOOTPROTO=none
DEVICE=em4
ONBOOT=yes
BOOTPROTO=none
4.在dist.conf文件中添加
# vim/etc/modprobe.d/dist.conf
alias bond0bonding
options bond0miimon=100 mode=6
alias bond1bonding
options bond1miimon=100 mode=6
alias net-pf-10off
alias ipv6 off
5.在/etc/rc.local中添加
ifenslave bond0em1 em2
ifenslave bond1em3 em4
时间: 2024-10-06 04:22:58