主机
ubuntu-server 16.04
$ cat /etc/network/interfaces
source /etc/network/interfaces.d/*
# the loopback network interface
auto lo
iface lo inet loopback
# the primary network interface
auto enp0s3
#iface enp0s3 inet dhcp
iface enp0s3 inet static
address 10.10.11.139
netmask 255.255.255.0
gateway 10.10.11.253
$ cat /etc/resolv.conf
nameserver 8.8.8.8 #设置首选dns
nameserver 8.8.4.4 #设置备用dns
nameserver 10.10.11.253 #设置备用dns
$ sudo /etc/init.d/networking restart