Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i'm using ubuntu 10.10

i've a local backup user called "backup". :)

i would like to give this user just a bandwidth of 1Mbit. No matter which software wants to connect to the network.

this solution limits:

iptables -t mangle -A OUTPUT -p tcp -m owner --uid-owner 1001 -j MARK --set-mark 12
iptables -t mangle -A POSTROUTING -p tcp -m owner --uid-owner 1001 -j MARK --set-mark 12

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 2 htb default 1
tc filter add dev eth0 parent 2: protocol ip pref 2 handle 12 fw classid 2:6
tc class add dev eth0 parent 2: classid 2:6 htb rate 10Kbit ceil 1Mbit

tc qdisc show dev eth0
tc class show dev eth0
tc filter show dev eth0
share|improve this question

1 Answer 1

up vote 1 down vote accepted

I'm not sure if this can be done with tc, but how can I limit per user bandwidth? may be a good starting point.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.