Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Networking is working fine on my gentoo machine. One connection is made, everything works fine with normal speed. But it is slow to wake-up : starting up connection is taking time. Even pinging local-host takes ages (approx 5 seconds).

Any ideas how to make this fast.

UPDATE : Output of some commands.

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet  netmask  broadcast
    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 ( 56(84) bytes of data.
64 bytes from Calvin ( icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from Calvin ( icmp_seq=2 ttl=64 time=0.029 ms
64 bytes from Calvin ( icmp_seq=3 ttl=64 time=0.031 ms
64 bytes from Calvin ( icmp_seq=4 ttl=64 time=0.030 ms
64 bytes from Calvin ( 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
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from icmp_seq=2 ttl=64 time=0.021 ms
64 bytes from icmp_seq=3 ttl=64 time=0.034 ms
64 bytes from icmp_seq=4 ttl=64 time=0.031 ms
64 bytes from icmp_seq=5 ttl=64 time=0.033 ms

--- 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
share|improve this question
Could you post the output of ping -c 5 localhost? Do you still get a delay when you do ping – Flup Mar 18 '13 at 8:59
@Dilawar Please add ifconfig output in your question – Rahul Patil Mar 18 '13 at 8:59
@Flup Add the output. You suspicion was right. Localhost and are giving different response time. – Dilawar Mar 18 '13 at 9:20
@RahulPatil Added ifconfig output. – Dilawar Mar 18 '13 at 9:20
You are pinging it 5 times. One ping = one second. Five pings = five seconds. Please clarify what you mean by "wake-up" and "starting connection". What is taking time? Once which connection has been made? In all my exp. ifconfig eth0 up or DHCP is instantaneous. Doing pppoe takes some seconds, though... Your responses are < 100 ms! What do you mean very slow ?! – Ярослав Рахматуллин Mar 18 '13 at 9:28
up vote 3 down vote accepted

As localhost and are giving different response times, this is a name resolution problem. Check /etc/resolv.conf to make sure that it contains the correct addresses for your nameservers. If you're not sure of the right addresses, you could try


It's slightly odd that localhost doesn't resolve from an entry in /etc/hosts, so you may want to check that it contains a line that looks something like   localhost
share|improve this answer
Added line in /etc/hosts and it is fine now. Thanks. – Dilawar Mar 18 '13 at 11:27
as I see localhost and giving almost the same time: 0.028 and 0.027 – javapowered Oct 21 '14 at 17:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.