ubuntu ip dns

来源:互联网 发布:淘客软件是什么 编辑:程序博客网 时间:2024/06/06 16:37

sudo vi /etc/resolv.conf

内容:

nameserver 202.96.128.166

nameserver 202.96.128.86

 

---------------------------

sudo vi/etc/network/interfaces

内容:

iface eth0 inet static //指定为static

address 192.168.0.254 //IP地址

gateway 192.168.3.1 //网关

netmask 255.255.255.0 //子网掩码

 

-------------------

sudo /etc/init.d/networking restart