系统版本 ubuntu16.04
修改文件 /etc/network/interfaces ,在其中添加接口设置,所有接口配置都写到该文件中,如
auto eth0
iface eth0 inet static
address 192.168.0.101
netmask 255.255.255.0
auto eth1
iface eth1 inet static
address 10.0.0.28
netmask 255.255.255.0
#网关
gateway 10.0.0.5
#dns
dns-nameserver 8.8.8.8
dns-nameserver 114.114.114.114