Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using netem (TC module) for introducing the delay. My requirment is like this that i want to introduce 5second delay. I am running command :

tc qdisc add dev eth0 root netem delay 5s

Now i am trying to ping at my local network system then i am getting packet lost.

root@localhost ~]# ping 192.168.0.210
PING 192.168.0.210 (192.168.0.210) 56(84) bytes of data.
64 bytes from 192.168.0.210: icmp_seq=1 ttl=64 time=5594 ms
64 bytes from 192.168.0.210: icmp_seq=2 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=3 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=4 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=5 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=6 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=7 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=8 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=9 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=10 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=11 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=12 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=13 ttl=64 time=5000 ms 
64 bytes from 192.168.0.210: icmp_seq=14 ttl=64 time=5000 ms
64 bytes from 192.168.0.210: icmp_seq=15 ttl=64 time=5000 ms

--- 192.168.0.210 ping statistics ---
20 packets transmitted, 15 received, 25% packet loss, time 19003ms
rtt min/avg/max/mdev = 5000.387/5040.003/5594.296/148.154 ms, pipe 6
share|improve this question

migrated from stackoverflow.com Aug 4 '11 at 11:15

This question came from our site for professional and enthusiast programmers.

    
Try ping -c10 192.168.0.210 - Let the ping perform all 10 pings and do not cancle it with ctrl + c. Does that also drop packages? –  artifex Aug 4 '11 at 12:48
    
I tried ur suggetions also, but still varying loss is happening. ping -c 30 192.168.0.78 PING 192.168.0.78 (192.168.0.78) 56(84) bytes of data. 64 bytes from 192.168.0.78: icmp_seq=6 ttl=128 time=5000 ms 64 bytes from 192.168.0.78: icmp_seq=7 ttl=128 time=5000 ms 64 bytes from 192.168.0.78: icmp_seq=8 ttl=128 time=5000 ms 64 bytes from 192.168.0.78: icmp_seq=9 ttl=128 time=5000 ms 64 bytes from 192.168.0.78: icmp_seq=10 ttl=128 time=5000 ms 64 bytes from 192.168.0.78: icmp_seq=11 ttl=128 time=5000 ms 64 bytes from 192.168.0.78: icmp_seq=12 ttl=128 time=5000 ms 64 bytes from 192.168.0.78: icmp_ –  user90599 Aug 5 '11 at 6:49

3 Answers 3

The packets are not lost, they are just delayed. If you look at your ping results you'll see that there are always exactly 5 packets lost. That's because you are sending 1 ping packet every second but they are delayed 5 seconds each. Last 5 packets have not returned yet, but they would return if you didn't terminate ping.

Try doing: ping -c 10 192.168.0.210

share|improve this answer

Have you tried increasing the time that the ping command will wait for a response? I don't know how well it copes by default with round trip times that normally indicate packetloss.

ping -W 20 192.168.0.210

share|improve this answer

You realize that's not actually packet loss, right? You have a 5 second delay after you send a packet. So, you send packet #16, but you ctrl-c it right after that, so it ceases waiting.

share|improve this answer

Your Answer

 
discard

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