mercredi 1 avril 2020

Simulate Network Latency to IP Address

I am attempting to introduce latency in HTTP traffic to an external IP address.

I've tried tc variations like this:

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: prio
tc qdisc add dev eth0 parent 1:3 handle 30: tbf rate 20kbit buffer 1600 limit  3000
tc qdisc add dev eth0 parent 30:1 handle 31: netem  delay 10000ms 10ms distribution normal
tc filter add dev eth0 protocol ip parent 1:0 prio 3 u32 match ip dst 192.168.8.8 flowid 1:3

I expect this to introduce 10 sec delay to all traffic to 192.168.8.8. However, when I execute this curl: curl http://192.168.8.8:8080/status

The response returns immediately. Help in finding a solution would be appreciated.

Aucun commentaire:

Enregistrer un commentaire