ubuntu 12.04 以固定 IP 地址连接网络并配置DNS

sudo vim /etc/network/interfaces  

auto eth0
iface eth0 inet static
    address 192.168.2.155
    netmask 255.255.255.0
    gateway 192.168.2.1
    dns-nameservers 218.85.157.99 218.85.152.99


sudo /etc/init.d/networking restart

 

posted @ 2013-12-24 09:35  天王星天  阅读(251)  评论(0编辑  收藏  举报