|
|
为什么我配置的 resolve.conf,interfaces文件都不起作用那?配置好后也尝试过重启,还是不起作用。另外,使用ifconfig 配置后,可以ping通网关,但是提示无法解析域名,dns 配置正确,也可以正常工作(我现在就在win下上网,相同的dns)。
谢谢!下面是相关配置文件,及ifconfig -a 的显示结果。
/etc/resolve.conf 如下:
- nameserver 202.118.176.4
- nameserver 202.118.176.2
复制代码
/etc/network/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
- allow lo eth0
- iface eth0 inet static
- hwaddress ether 00:E0:4C:43:B2:8B
- address 58.155.108.130
- netmask 255.255.255.0
- network 58.155.0.0
- broadcast 255.255.255.255
- gateway 58.155.0.1
- # dns-* options are implemented by the resolvconf package, if installed
- dns-nameservers 202.118.176.4 202.118.176.2
- allow lo eth1
- iface eth1 inet static
- address 192.168.0.1
- network 192.168.0.0
- broadcast 255.255.255.255
- # gateway 192.168.0.1
- dns-nameservers 202.118.176.4 202.118.176.2
复制代码
ifconfig -a 显示如下:
- eth0 Link encap:Ethernet HWaddr 00:11:11:33:a6:dd
- BROADCAST MULTICAST MTU:1500 Metric:1
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
- eth1 Link encap:Ethernet HWaddr 00:e0:4c:b1:d5:14
- BROADCAST MULTICAST MTU:1500 Metric:1
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
- Interrupt:201 Base address:0xd800
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:16436 Metric:1
- RX packets:16 errors:0 dropped:0 overruns:0 frame:0
- TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:800 (800.0 B) TX bytes:800 (800.0 B)
- sit0 Link encap:IPv6-in-IPv4
- NOARP MTU:1480 Metric:1
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
复制代码 |
|