Iam new to tc and i find it mighty confusing, i was able to find and bit understand little command flow, to issue delay on specific IP, but i dont tink it works properly - delaying all traffic possible for this IP. I think i misunderstood/did not understand some of the parameters.
It sometimes definitely works, but i have my doubts since its not consistent, as if the traffic sometimes takes different priority which is not delayed mabye? Not sure
(how i know - sometime iam able to break app which sends query to server iam delaying traffic to, sometimes it just works as if nothing is delayed even when using like 50000ms)
This is what iam using:
tc qdisc add dev eth1 root handle 1: prio
tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src 1.1.1.1 flowid 1:3
tc qdisc add dev eth1 parent 1:1 handle 2: netem delay 20000ms