Displaying 1 result from an estimated 1 matches for "vm1_ip".
Did you mean:
my_ip
2007 Feb 28
1
Xen and tc problems
...|
|
+---- vif2.0 -- eth1 in VM2
Say, I want to limit the bandwidth to VM1 to 100mbit and VM2 to 500mbit
(eth0 is a 1gbit interface), I used to following commands.
iptables -t mangle -F POSTROUTING
tc qdisc add dev eth0 root handle 1: htb r2q 1000
iptables -t mangle -A POSTROUTING -s $vm1_ip -j CLASSIFY --set-class 1:1
iptables -t mangle -A POSTROUTING -d $vm1_ip -j CLASSIFY --set-class 1:1
tc class add dev eth0 parent 1: classid 1:1 htb rate 512mbit
iptables -t mangle -A POSTROUTING -s $vm2_ip -j CLASSIFY --set-class 1:2
iptables -t mangle -A POSTROUTING -d $vm2_ip -j CLASSIFY --set-c...