Hi
I have a traffic shaping issue. I have a 50 Mbps connection and I am trying to shape traffic for my virtual machines. I found this url
http://wiki.openvz.org/Traffic_shaping_with_tc and it has helped me shape the traffic for one VM but I don't know how to shape traffic for multiple VMs.
I have the following code:
Code:
DEV=eth0
tc qdisc del dev $DEV root
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
tc class add dev $DEV parent 1: classid 1:1 cbq rate 4096kbit allot 1500 prio 5 bounded isolated
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 192.168.100.1 flowid 1:1
tc qdisc add dev $DEV parent 1:1 sfq perturb 10
How do I adapt the above
to limit traffic for 192.168.100.1 with 4096 kbits
to limit traffic for 192.168.100.2 with 1024 kbits
to limit traffic for 192.168.100.3 with 2048 kbits
and more ip and speed pairs?