![한 PC에서 Github에 연결할 수 없습니다. 다른 사이트는 모두 잘 작동합니다.](https://linux55.com/image/139994/%ED%95%9C%20PC%EC%97%90%EC%84%9C%20Github%EC%97%90%20%EC%97%B0%EA%B2%B0%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EB%8B%A4%EB%A5%B8%20%EC%82%AC%EC%9D%B4%ED%8A%B8%EB%8A%94%20%EB%AA%A8%EB%91%90%20%EC%9E%98%20%EC%9E%91%EB%8F%99%ED%95%A9%EB%8B%88%EB%8B%A4..png)
Ubuntu 16.04를 실행하면 다른 웹사이트에 정상적으로 연결할 수 있습니다.
ping google.com
PING google.com (172.217.25.206) 56(84) bytes of data.
64 bytes from nrt12s13-in-f14.1e100.net (172.217.25.206): icmp_seq=1 ttl=54 time=42.6 ms
ping yahoo.com
PING yahoo.com (98.137.246.7) 56(84) bytes of data.
64 bytes from media-router-fp1.prod1.media.vip.gq1.yahoo.com (98.137.246.7): icmp_seq=1 ttl=49 time=252 ms
하지만 Github을 핑하거나 브라우저에서 액세스할 수 없습니다.
ping github.com
PING github.com (192.30.255.112) 56(84) bytes of data.
From 192.168.0.60 icmp_seq=1 Destination Host Unreachable
그러나 동일한 네트워크에 있는 다른 컴퓨터에서는 모든 것이 잘 작동합니다.
ping github.com
PING github.com (192.30.255.112) 56(84) bytes of data.
64 bytes from lb-192-30-255-112-sea.github.com (192.30.255.112): icmp_seq=1 ttl=48 time=141 ms
여기서 무슨 일이 일어나고 있는 걸까요? 나는 이것이 Github IP 주소의 첫 번째 옥텟이 로컬 IP 주소와 동일하다는 사실과 관련이 있다고 생각합니다 192.xxx.xxx.xxx
.
편집 : 출력 sudo route -n
:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.179.1 0.0.0.0 UG 600 0 0 wlp3s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s31f6
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.0.0.0 0.0.0.0 255.0.0.0 U 100 0 0 enp0s31f6
192.168.179.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp3s0
답변1
비트마스크가 로 설정된 로컬 네트워크(주소 192.168.xxx.xxx)에 다른 인터페이스가 있는 것으로 나타났습니다 255.0.0.0
. 한때 nmtui
해당 인터페이스의 비트마스크를 255.255.0.0
다음으로 변경하여 문제를 해결했습니다.