修改IP地址
sudo vi  /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.2.2
netmask 255.255.255.0
gateway 192.168.2.1

保存退出

修改DNS 

sudo nano /etc/resolv.conf

nameserver 223.5.5.5
nameserver 223.6.6.6

保存退出

重启网络服务 

sudo systemctl restart networking