ローカルホストは、pingを送信すると非常に遅く応答します。

ローカルホストは、pingを送信すると非常に遅く応答します。

私のGentooコンピュータのネットワークが正常に動作しています。接続が確立され、すべてがうまく機能し、速度は正常です。ただし、接続を開始するには時間がかかります。 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 ローカルホスト

おすすめ記事