だから何らかの理由でラズベリーパイに接続の問題があります。奇妙なことに、ローカルネットワーク内の他のすべてのアイテムに簡単にpingを送信できます。結局、手動でパスを追加して問題を「解決」しましたが、根本的な原因を見つけたいと思います。
私がどのコマンドを実行したのか、1つのパスで突然問題がどのように解決されたかを確認できます。
$ ping 192.168.0.109
PING 192.168.0.109 (192.168.0.109) 56(84) bytes of data.
64 bytes from 192.168.0.109: icmp_seq=1 ttl=128 time=6.45 ms
64 bytes from 192.168.0.109: icmp_seq=2 ttl=128 time=2.56 ms
64 bytes from 192.168.0.109: icmp_seq=3 ttl=128 time=5.19 ms
^C
--- 192.168.0.109 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 2.566/4.739/6.454/1.621 ms
$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2040ms
$ sudo route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 202 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
$ sudo route add -net default gw 192.168.0.1 netmask 0.0.0.0 dev eth0 metric 0
$ sudo route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 202 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=32.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=31.5 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=30.6 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=29.2 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 29.255/30.865/32.061/1.060 ms
もし私のルータのルートは次のようになります。
ID Destination Network Subnet Mask Gateway Interface
1 192.168.0.0 255.255.255.0 0.0.0.0 LAN & WLAN
2 192.168.11.0 255.255.255.0 0.0.0.0 Internet Connection
3 0.0.0.0 0.0.0.0 192.168.11.1 Internet Connection
どんなアイデアがありますか?提案?
アップデート(リクエスト時):
$ ping 8.8.8.8
connect: Network is unreachable
$ ip route get 8.8.8.8
RTNETLINK answers: Network is unreachable
$ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::219:bbff:fe00:0000 [censored last part of MAC] prefixlen 64 scopeid 0x20<link>
ether [censored] txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17
$ ip route get 8.8.8.8
RTNETLINK answers: Network is unreachable
$ ip route get 8.8.8.8
RTNETLINK answers: Network is unreachable
$ ip route
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 virbr0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
$ ip route show table all
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.122.0 dev virbr0 table local proto kernel scope link src 192.168.122.1 linkdown
local 192.168.122.1 dev virbr0 table local proto kernel scope host src 192.168.122.1
broadcast 192.168.122.255 dev virbr0 table local proto kernel scope link src 192.168.122.1 linkdown
local ::1 dev lo proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
local ::1 dev lo table local proto kernel metric 0 pref medium
local fe80::219:bbff:fe00:0000 [censored last part of MAC] dev eth0 table local proto kernel metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 pref medium
$ sudo ip route get 8.8.8.8
RTNETLINK answers: Network is unreachable
$ sudo ip route show table all
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.122.0 dev virbr0 table local proto kernel scope link src 192.168.122.1 linkdown
local 192.168.122.1 dev virbr0 table local proto kernel scope host src 192.168.122.1
broadcast 192.168.122.255 dev virbr0 table local proto kernel scope link src 192.168.122.1 linkdown
local ::1 dev lo proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
local ::1 dev lo table local proto kernel metric 0 pref medium
local fe80::219:bbff:fe00:0000 [censored last part of MAC] dev eth0 table local proto kernel metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 pref medium
$ sudo ip route get 8.8.8.8
RTNETLINK answers: Network is unreachable
$ sudo ifconfig eth0 192.168.0.105 netmask 255.255.255.0
$ sudo ip route get 8.8.8.8
RTNETLINK answers: Network is unreachable
$ sudo route add default gw 192.168.0.1 eth0
$ sudo ip route get 8.8.8.8
8.8.8.8 via 192.168.0.1 dev eth0 src 192.168.0.105 uid 0
cache
$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=28.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=30.8 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 28.813/29.841/30.870/1.042 ms