Tcp connection packets ignoring network delays, ping shows delays

I've introduced a 2000ms latency to all network packets using openwrt netem module.

# This is run on the terminal of the OpenWRT router
tc qdisc add dev wlan1 root netem delay 2000ms

I can clearly see the effects of this when pinging devices in the network.

# ping
PING ( 56 data bytes
64 bytes from seq=0 ttl=64 time=2001.956 ms
64 bytes from seq=1 ttl=64 time=2010.677 ms
64 bytes from seq=2 ttl=64 time=2004.216 ms
64 bytes from seq=3 ttl=64 time=2001.451 ms
64 bytes from seq=4 ttl=64 time=2005.981 ms

However if I attempt to notice this delay while exchanging messages via nc, it seems to be ignored.

|    Terminal 1       |   Terminal 2                   |     
|   (  |               |
|  $ nc -l 2389       |                                |
|                     | $ nc 2389       |
|                     |      Hello                     |
|  # NO 2s DELAY      |                                |
|  # ALMOST INSTANT   |                                |
|    Hello            |                                |

My questions are:

  • Is there some fundamental way in which a ICMP is different than a TCP packet so that one would be affected and the other wouldn't?
  • If it's just an case of a miss-configured netem module, what would be toe correct one which would apply delays on all IP packets?

When doing the "nc" test, are both "" and "" devices in your LAN?

Unless you made some significant changes to the configuration, traffic between devices in the LAN go straight through the embedded switch, before reaching the router's CPU, and is out-of-reach for any traffic control.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.