- 论坛徽章:
- 14
|
chenyx 发表于 2012-09-21 13:10
把你的dns服务器的ip写到/etc/resolv.conf里面,写成
然后再nslookup一个外网的域名,看看解析正常不 - root@kvstore:/etc/network# cat interfaces
- # This file describes the network interfaces available on your system
- # and how to activate them. For more information, see interfaces(5).
- # The loopback network interface
- auto lo
- iface lo inet loopback
- # The primary network interface
- auto eth0
- allow-hotplug eth0
- iface eth0 inet static
- address 192.168.1.12
- netmask 255.255.255.0
- network 192.168.1.0
- broadcast 192.168.1.255
- gateway 192.168.1.255
- #dns-nameservers 219.141.136.10 202.106.0.20
复制代码- root@kvstore:/etc/network# cat /etc/resolv.conf
- nameserver 219.141.136.10
- nameserver 202.106.0.20
- root@kvstore:/etc/network#
复制代码 这是我的配置文件内容,interface里面dns配置的已经注释掉了,但是重启网卡的时候依然报错- root@kvstore:/etc/network# /etc/init.d/networking restart
- Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
- Reconfiguring network interfaces...SIOCADDRT: No such process
- Failed to bring up eth0.
- done.
- root@kvstore:/etc/network#
复制代码 nslookup依然不能解析 |
|