로컬 호스트는 핑을 보낼 때 매우 느리게 응답합니다.

로컬 호스트는 핑을 보낼 때 매우 느리게 응답합니다.

내 젠투 컴퓨터의 네트워크가 제대로 작동하고 있습니다. 연결이 설정되고 모든 것이 잘 작동하며 속도는 정상입니다. 그러나 연결을 시작하는 데는 시간이 걸립니다. localhost에 ping을 쳐도 시간이 오래 걸립니다(약 5초).

더 빠르게 만드는 방법에 대한 아이디어가 있습니까?

일부 명령의 출력:

ifconfig 
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 10.107.105.13  netmask 255.255.240.0  broadcast 10.107.111.255
    inet6 fe80::e269:95ff:fe24:8d3a  prefixlen 64  scopeid 0x20<link>
    ether e0:69:95:24:8d:3a  txqueuelen 1000  (Ethernet)
    RX packets 1071380  bytes 978317595 (932.9 MiB)
    RX errors 0  dropped 1979  overruns 0  frame 0
    TX packets 310432  bytes 30846997 (29.4 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 20  memory 0xfe400000-fe420000  

ping -c 5 localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from Calvin (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from Calvin (127.0.0.1): icmp_seq=2 ttl=64 time=0.029 ms
64 bytes from Calvin (127.0.0.1): icmp_seq=3 ttl=64 time=0.031 ms
64 bytes from Calvin (127.0.0.1): icmp_seq=4 ttl=64 time=0.030 ms
64 bytes from Calvin (127.0.0.1): icmp_seq=5 ttl=64 time=0.033 ms

--- localhost ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.017/0.028/0.033/0.005 ms

ping -c 5 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.021 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.034 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.031 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.033 ms

--- 127.0.0.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 0.018/0.027/0.034/0.008 ms

답변1

localhost127.0.0.1응답 시간이 다르기 때문에 이름 확인 문제입니다. /etc/resolv.conf이름 서버에 대한 올바른 주소가 포함되어 있는지 확인하세요 . 정확한 주소가 확실하지 않은 경우 시도해 볼 수 있습니다.

네임서버 8.8.8.8
네임서버 8.8.4.4

localhost그 안에 있는 항목에서 구문 분석할 수 없다는 것이 조금 이상하므로 /etc/hosts다음과 같은 줄이 포함되어 있는지 확인하고 싶을 수도 있습니다.

127.0.0.1 로컬호스트

관련 정보