1 配置IP
vim /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
2 配置DNS
vim /etc/resolv.conf
nameserver 192.168.1.1
或者
nameserver 8.8.8.8
3 重启网络