우선순위가 더 높은 경로를 추가하여 통신을 활성화할 수 있나요?

우선순위가 더 높은 경로를 추가하여 통신을 활성화할 수 있나요?

그래서 어떤 이유로 라즈베리 파이에 연결 문제가 있습니다. 이상하게도 로컬 네트워크의 다른 모든 항목에 쉽게 ping을 보낼 수 있습니다. 결국 수동으로 경로를 추가하여 문제를 "해결"했지만 근본 원인을 찾고 싶습니다.

내가 어떤 명령을 실행했는지, 한 경로에서 갑자기 문제가 어떻게 해결되었는지 확인할 수 있습니다.

$ 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

관련 정보