
私は Ubuntu でのネットワークに非常に不慣れなので、この問題に数時間も苦労しています。Ubuntu 12.10 を新規インストールしていますが、ワイヤレス接続を使用すると DNS を解決できません。Google で見つけた多くの解決策を試しましたが、まだうまくいきません。Google ネーム サーバーを追加してみましたが、役に立ちませんでした。/etc/resolv.conf
また、ネットワーク マネージャーから静的ネーム サーバーを追加してみましたが、これも失敗しました。ifcongig -a
コマンド ラインに入力すると、次のメッセージが表示されます。
eth0 Link encap:Ethernet HWaddr 00:26:2d:7f:ea:7c
UP 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:16
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:247 errors:0 dropped:0 overruns:0 frame:0
TX packets:247 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22898 (22.8 KB) TX bytes:22898 (22.8 KB)
wlan0 Link encap:Ethernet HWaddr 70:1a:04:e9:3a:4b
inet addr:10.0.0.28 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::721a:4ff:fee9:3a4b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:121 errors:0 dropped:0 overruns:0 frame:0
TX packets:403 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41374 (41.3 KB) TX bytes:38438 (38.4 KB)
私の/etc/resolv.conf
現在の状態は次のようになります:
nameserver 8.8.8.8
nameserver 8.8.4.4
そして、dig google.com
私はこうします:
; <<>> DiG 9.8.1-P1 <<>> google.com
;; global options: +cmd
;; connection timed out; no servers could be reached
ではping -c 10 8.8.8.8
、次のようになります:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 10.0.0.28 icmp_seq=1 Destination Host Unreachable
From 10.0.0.28 icmp_seq=2 Destination Host Unreachable
From 10.0.0.28 icmp_seq=3 Destination Host Unreachable
From 10.0.0.28 icmp_seq=5 Destination Host Unreachable
From 10.0.0.28 icmp_seq=6 Destination Host Unreachable
From 10.0.0.28 icmp_seq=7 Destination Host Unreachable
From 10.0.0.28 icmp_seq=8 Destination Host Unreachable
From 10.0.0.28 icmp_seq=10 Destination Host Unreachable
--- 8.8.8.8 ping statistics ---
10 packets transmitted, 0 received, +8 errors, 100% packet loss, time 8999ms
pipe 4
以下は私の出力ですsudo route -n
:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 wlan0
10.0.0.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
そして私の出力は次のようになりますtraceroute -n 8.8.8.8
:
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 10.0.0.28 1804.234 ms !H 1804.210 ms !H 1804.199 ms !H
また、他のデバイスや同じマシン上の Windows インストールでワイヤレス ネットワークに接続できることにも注目したいと思います。イーサネット経由で接続すると、Web にアクセスすることもできます。
ipconfig
Windows マシンでワイヤレス接続を実行すると、次のスニペットが表示されます。
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : hsd1.ma.comcast.net.
Description . . . . . . . . . . . : Atheros AR5B93 Wireless Network Adapter
Physical Address. . . . . . . . . : 70-1A-04-E9-3A-4B
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::b153:23b2:2384:d341%12(Preferred)
IPv4 Address. . . . . . . . . . . : 10.0.0.28(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Thursday, May 09, 2013 1:50:10 PM
Lease Expires . . . . . . . . . . : Thursday, May 16, 2013 3:39:12 PM
Default Gateway . . . . . . . . . : 10.0.0.1
DHCP Server . . . . . . . . . . . : 10.0.0.1
DHCPv6 IAID . . . . . . . . . . . : 225450500
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-17-D9-81-3A-00-26-2D-7F-EA-7C
DNS Servers . . . . . . . . . . . : 75.75.75.75
75.75.76.76
NetBIOS over Tcpip. . . . . . . . : Enabled
本当にイライラしているので、どんな助けでも大歓迎です。
答え1
/etc/resolv.conf は正しいようです。これは DNS の問題ではなく、ネットワークの問題であると思われます。
eth0 をダウンしてみてください (GUI ネットワーク マネージャーの中には、ワイヤレスよりも有線接続を好むものがあり、何らかの理由で信号があると認識することがあります)。ダウンさせるコマンドは「sudo ifdown eth0」です。その後、google.com を掘り下げてみてください。あるいは、Ubuntu が ifdown スクリプトを削除した場合 (削除したかどうかはわかりません)、「sudo ifconfig eth0 down」を実行できます。
元に戻したい場合は、「sudo ifup eth0」または「sudo ifconfig eth0 up」を実行してください。
答え2
Ubuntu で DNS を自動的に管理しようとしたことがありますか?
簡単に言うと、「resolvconf」を使用する
sudo apt-get install resolvconf
sudo dpkg-reconfigure resolvconf
参照: