Limit traffic for venet0 with tc

From vpsget wiki
Jump to: navigation, search

DRAFT

we can use tc and htb to limit traffic for our server node and vpses:: assuming eth0 - our main HW node interface. venet0 - openvz interface for CTs

Should work as income block:

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb default 10
tc class add dev eth0 parent 1: classid 1:10 htb rate 600mbit

venet0 income limit: (working as outgoing block!!):

tc qdisc del dev venet0 root
tc qdisc add dev venet0 root handle 1: htb default 10
tc class add dev venet0 parent 1: classid 1:10 htb rate 600mbit