Hi LQ people, please need your help related to a script.
I already try to LARC mailist, and try to subscript myself, without success.
I need to shape the bandwidth to a very large numbers of IPs in severals VLANs with normal routin (No Nat, and No Firewalling)
The traffic are not shaped....
I'm doing the next:
Make a base qdisc
Code:
tc qdisc add dev $iface root handle 1: htb
Then make a base class to send all national traffic
Code:
tc class add dev $iface parent 1: classid 1:1 htb rate 1gbit.
Next I iterate over a lists of nets to salve national traffic (disable for now, until all works)
Then I create a base class and qdisc per Range I mean ...
Code:
tc class add dev $iface parent 1: classid 1:$clase htb rate 1gbit # where $clase is 224 or 225... (C class address)
tc qdisc add dev $iface parent 1:$clase handle $clase: htb
Next I iterate with every IP
Code:
tc class add dev $iface parent $clase: classid $clase:$n htb rate 256kbit
To be more clare.
If I get a IP
200.114.225.4
Code:
tc class add dev $iface parent 1: classid 1:225 htb rate 1gbit ### base
tc qdisc add dev $iface parent 1:225 handle 225: htb # to by more "nemotechnical"
tc class add dev $iface parent 225: classid 225:4 htb rate 256kbit ## 4 is for 225.'4' another nemo
Then I try with CLASSIFY and didn't work
Then I try with MARK and don't work either -- whit this filter:
Code:
tc filter add dev $iface protocol ip parent $clase:$n prio 0 handle $clase$n fw flowid $clase:$n
I don't know really where is my error if any,
Can you please give me an idea why this are not working????
Thanks
PS: I'm sorry if my very poor english disturbing you in any way.