Bandwidth limit using tc commands in firewall

guys, I used to use these firewall commands on dd-wrt to limit the bandwidth for a certain ip on my network. would those same commands work on openwrt ?

here are the commands:

tc qdisc del dev br0 root
tc qdisc add dev br0 root handle 1: cbq avpkt 1000 bandwidth 11mbit
tc class add dev br0 parent 1: classid 1:1 cbq rate 999kbit allot 1500 prio 5 bounded isolated
tc filter add dev br0 parent 1: protocol ip prio 16 u32 match ip dst 192.168.1.66 flowid 1:1
tc filter add dev br0 parent 1: protocol ip prio 16 u32 match ip src 192.168.1.66 flowid 1:1
tc qdisc add dev br0 parent 1:1 sfq perturb 10
iptables -t mangle -A PREROUTING -i `nvram get wan_ifname` -j DSCP --set-dscp 0

probably, try it by yourself...
Just remember that br0 should be renamed to br-lan probably.
and replace the 'nvram get wan_ifname' with eth0 or whatever iface you have on wan interface.
Please post here if it works or not.

1 Like