I would like to impose an arbitrary latency on outbound UDP packets using a fw filter in tc; however, I cannot get the filter to work properly:
tc qdisc add dev eth0 root handle 1: prio tc qdisc add dev eth0 parent 1:3 handle 30: netem delay 200ms tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 1 fw flowid 1:3 iptables -A PREROUTING -i eth0 -t mangle -p udp -j MARK --set-mark 1
If I use the following u32 filter instead I get the desired effect:
tc filter add dev eth0 parent 1:0 protocol ip prio 3 u32 match ip dport 53 0xffff flowid 1:3
I don't wish to use the u32 filters, and what is more troubling I can't get the
--set-tos manglers to work in Ubuntu 10.04.
The two may be completely unrelated, but I am concerned that the packets aren't being marked by iptables. I have been unable to find a way to test marking.