Im currently working on a traffic shaping in linux. We have a client connected to a server running nat and dhcp. What we want to do is limit both the upload and download speed of the client/clients.
However only download limit works.
Download limit(Part of the script) WORKING
tc class add dev eth1 parent 1:1 classid 1:4 htb rate 30000kbit
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.101/32 flowid 1:4
Upload limit(Part of the script)
tc class add dev eth1 parent 1:1 classid 1:4 htb rate 30000kbit
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip src 192.168.0.101/32 flowid 1:4
The only thing that is changed in the upload part is "dst" to "src" Problem is when we replace the download part of the script with the upload part, no limiting is done.? what is wrong
Edited after David Schwartz answered me:
My qdisc that i used both upload and download limiting on.
tc qdisc add dev eth1 root handle 1: htb default 30
Qdisc i am adding now
tc qdisc add dev eth1 ingress