ubuntu16.04配置网卡
安装ubuntu16.04到最后选择安装服务时通过空格
勾选
root@ubuntu:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens33
iface ens33 inet static
address 192.168.200.215
netmask 255.255.255.0
gateway 192.168.200.250
dns-nameserve 192.168.200.250
root@ubuntu:~# sudo /etc/init.d/networking restart
ethtool 查看网口状态
ethtool eth0
测试ip a 后显示出来的网卡信息对应的物理网卡口 ,可以观察网卡口指示灯是否闪
ethtool -p eth0
#Business mouth
auto ens5f0
iface ens5f0 inet manual
bond-master bond0
auto ens7f0
iface ens7f0 inet manual
bond-master bond0
auth bond0
iface ens7f0 inet static
address 172.16.4.10
netmask 255.255.255.0
gateway 172.16.4.254
bond-slaves ens5f0 ens7f0
bond-lacp-rate 1
bond-mode 4
bond-miimon 100
#Storage port
auto ens5f1
iface ens5f0 inet manual
bond-master bond1
auto ens7f1
iface ens7f0 inet manual
bond-master bond1
auth bond1
iface ens7f0 inet static
address 172.16.4.10
netmask 255.255.255.0
gateway 172.16.4.254
bond-slaves ens5f1 ens7f1
bond-lacp-rate 1
bond-mode 4
bond-miimon 100