添加网络接口
修改网络接口
cd /etc/sysconfig/network-scripts/
cp ifcfg-ens{33,37}
cp ifcfg-{ens33,bond0}
vim ifcfg-ens33
DEVICE=ens33
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
MASTER=bond0
SLAVE=yes
vim ifcfg-ens37
DEVICE=ens37
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
MASTER=bond0
SLAVE=yes
vim ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=10.30.161.236
GATEWAY=10.30.161.1
PREFIX=24
IPV6INIT=no
USERCTL=no
- 在 /etc/modprobe.d/ 下添加bond0.conf文件
vim /etc/modprobe.d/bond0.conf
alias bond0 bonding
options bonding mode=0 miimon=100
systemctl restart network
vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 114.114.114.114
ping www.baidu.com
ip a