イーサネット経由のインターネット: DNS は機能しますが、ping は機能しません (Windows は機能しますが、Linux は機能しません)

イーサネット経由のインターネット: DNS は機能しますが、ping は機能しません (Windows は機能しますが、Linux は機能しません)

イーサネット接続を使用してインターネットに接続された PC があります。Ubuntu を使用すると、nslookup を使用してドメインを解決できますが、「ping google.com」または「ping 74.125.39.104」を実行しようとすると機能しません。

私は 2 台のネットブックで Arch Linux、Mint、Ubuntu Live を使用しましたが、すべて失敗しました。ただし、Windows は問題なく動作します。Windows を使わなくて済むように助けてください!

ifconfig:

sudo ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:26:18:80:79:18  
          inet addr:10.20.6.180  Bcast:10.20.7.255  Mask:255.255.254.0
          inet6 addr: fe80::226:18ff:fe80:7918/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5751 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2397 errors:0 dropped:0 overruns:0 carrier:17
          collisions:0 txqueuelen:1000 
          RX bytes:659976 (659.9 KB)  TX bytes:253881 (253.8 KB)
          Interrupt:40

ルート:

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.20.6.0       0.0.0.0         255.255.254.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
0.0.0.0         10.20.6.1       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         10.20.6.1       0.0.0.0         UG    202    0        0 eth0

ネットスタット:

netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.20.6.0       0.0.0.0         255.255.254.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         10.20.6.1       0.0.0.0         UG        0 0          0 eth0
0.0.0.0         10.20.6.1       0.0.0.0         UG        0 0          0 eth0

iptables:

sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

解決:

cat /etc/resolv.conf
# Generated by resolvconf 
search uni-mannheim.de 
nameserver 134.155.96.51 
nameserver 134.155.96.53

トレースパスが機能していません:

sudo tracepath www.google.com
 1:  laptop.local                                          0.342ms pmtu 1500
 1:  no reply
 2:  no reply
 3:  no reply
 4:  no reply

ホスト

sudo cat /etc/host.conf
# The "order" line is only used by old versions of the C library.
order hosts,bind
multi on

設定ファイル

sudo cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

nslookup google.com

nslookup google.com
Server:     134.155.96.51
Address:    134.155.96.51#53

Non-authoritative answer:
Name:   google.com
Address: 74.125.39.104
Name:   google.com
Address: 74.125.39.105
Name:   google.com
Address: 74.125.39.106
Name:   google.com
Address: 74.125.39.147
Name:   google.com
Address: 74.125.39.99
Name:   google.com
Address: 74.125.39.103

google.com で取得

wget google.com
--2011-08-17 11:05:01--  http://google.com/
Resolving google.com... 74.125.39.99, 74.125.39.103, 74.125.39.104, ...
Connecting to google.com|74.125.39.99|:80...

google.com を掘る

tracepathは機能しないがdigは機能する

dig google.com

; <<>> DiG 9.7.3 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2643
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;google.com.            IN  A

;; ANSWER SECTION:
google.com.     175 IN  A   74.125.39.103
google.com.     175 IN  A   74.125.39.104
google.com.     175 IN  A   74.125.39.105
google.com.     175 IN  A   74.125.39.106
google.com.     175 IN  A   74.125.39.147
google.com.     175 IN  A   74.125.39.99

;; AUTHORITY SECTION:
google.com.     104161  IN  NS  ns4.google.com.
google.com.     104161  IN  NS  ns3.google.com.
google.com.     104161  IN  NS  ns1.google.com.
google.com.     104161  IN  NS  ns2.google.com.

;; ADDITIONAL SECTION:
ns1.google.com.     277325  IN  A   216.239.32.10
ns2.google.com.     277325  IN  A   216.239.34.10
ns3.google.com.     277325  IN  A   216.239.36.10
ns4.google.com.     277325  IN  A   216.239.38.10

;; Query time: 2 msec
;; SERVER: 134.155.96.51#53(134.155.96.51)
;; WHEN: Wed Aug 17 11:06:14 2011
;; MSG SIZE  rcvd: 260

答え1

ping についてはあまり心配する必要はありません。ping がサーバー インフラストラクチャによってブロックされることは珍しくありません。ping と traceroute は通常 ICMP を使用します。よりよいテストはwget http://www.google.comHTTP を使用することです。

まずhost www.google.comDNSをテストするために使用します(古いLinuxシステムでは の代わりにnslookupまたは が使われていました)dighost

$ ホスト www.google.com
www.google.com は www.l.google.com のエイリアスです。
www.l.google.com のアドレスは 209.85.143.104 です
www.l.google.com のアドレスは 209.85.143.99 です


$ wget http://www.google.com
--12:21:13-- http://www.google.com/
           => `index.html'
www.google.com を解決しています...完了しました。
www.google.com[209.85.143.99]:80に接続しています...接続されました。
HTTP リクエストが送信されました。応答を待っています... 200 OK
長さ: 未指定 [text/html]

    [ ] 9,931 167.21K/s

12:21:14 (167.21 KB/s) - `index.html' が保存されました [9931]

答え2

/etc/resolve.confとは何ですか?ルーターを指しているはずです

このファイルはインターネットに接続するために非常に重要です。

答え3

Firestarter ファイアウォールを確認します。

chkconfig -l | grep ファイアスターター

ファイアスターター 0:オフ 1:オフ 2:オフ 3:オフ 4:オフ 5:オフ 6:オフ S:オン

Firestarter ファイアウォールを無効にします。

sudo chkconfig ファイアスターターをオフ

もう一度確認してください:

chkconfig -l | grep ファイアスターター

ファイアスターター 0:オフ 1:オフ 2:オフ 3:オフ 4:オフ 5:オフ 6:オフ

ファイアウォールを停止します。

sudo ファイアスターター -p

もう一度pingを実行してみてください。

関連情報