1

I am applying iptables rule to impact outbound traffic into a subnet. I send the traffic into a new chain created and then tc impose some delay using netem. TC is then using that rules. Something like this:

/sbin/iptables -t mangle -I UDESTROY-0x4d81b18-OUT-4051 1 -p tcp 
--destination 10.196.234.0/22 --dport 0:65535 -j MARK --set-mark 0x4d81b18 --wait

/sbin/tc qdisc add dev lo parent 1:1b18 handle 1b18:0 netem delay 10ms

I am setting this rule for all devices I have up and running (e.g. eth0, eth1, lo). Since I am applying the rule into a single subnet (e.g. 10.196.234.0/22), I was expecting to only observe the 10ms delay on traffic going to this subnet. However, I see that traffic to other subnets/hosts are getting impacted which is unexpected as I specify in --destination. My question is whether it is due to using lo or any other reason? I am not sure why this does not work for this case even if it works in other situations that I tested.

0 Answers0