Hi,
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 192.168.10.164
PING 192.168.10.164 (192.168.10.164): 56 data bytes
64 bytes from 192.168.10.164: seq=0 ttl=64 time=2001.956 ms
64 bytes from 192.168.10.164: seq=1 ttl=64 time=2010.677 ms
64 bytes from 192.168.10.164: seq=2 ttl=64 time=2004.216 ms
64 bytes from 192.168.10.164: seq=3 ttl=64 time=2001.451 ms
64 bytes from 192.168.10.164: 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 |
| (192.168.10.164) | 192.168.10.186 |
|---------------------|--------------------------------|
| $ nc -l 2389 | |
| | $ nc 192.168.10.164 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?