Julius
2007-12-04 11:32:52 UTC
Hi,
the script below should allow to get ssh connections running well while
downloading, but even the 100kbps (100kbyte/s?) doesnt work - can still
download with 500+kb/s. Whats wrong?
INTERFACE=eth0
#clear all on $INTERFACE
tc qdisc del dev $INTERFACE root
tc qdisc add dev $INTERFACE root handle 1:0 htb default 15
#root qdics, allows borrowing for its children
tc class add dev $INTERFACE parent 1:0 classid 1:1 htb rate 100kbps ceil
100kbps
#ssh qdisc
tc class add dev $INTERFACE parent 1:1 classid 1:5 htb rate 20kbps ceil
100kbps prio 2
#other traffic
tc class add dev $INTERFACE parent 1:1 classid 1:15 htb rate 80kbps ceil
100kbps prio 10
#filter ssh
tc filter add dev $INTERFACE protocol ip parent 1:0 prio 1 u32 match ip dport
22 0xffff flowid 1:5
tc filter add dev $INTERFACE protocol ip parent 1:0 prio 1 u32 match ip sport
22 0xffff flowid 1:5
greets
Julius
the script below should allow to get ssh connections running well while
downloading, but even the 100kbps (100kbyte/s?) doesnt work - can still
download with 500+kb/s. Whats wrong?
INTERFACE=eth0
#clear all on $INTERFACE
tc qdisc del dev $INTERFACE root
tc qdisc add dev $INTERFACE root handle 1:0 htb default 15
#root qdics, allows borrowing for its children
tc class add dev $INTERFACE parent 1:0 classid 1:1 htb rate 100kbps ceil
100kbps
#ssh qdisc
tc class add dev $INTERFACE parent 1:1 classid 1:5 htb rate 20kbps ceil
100kbps prio 2
#other traffic
tc class add dev $INTERFACE parent 1:1 classid 1:15 htb rate 80kbps ceil
100kbps prio 10
#filter ssh
tc filter add dev $INTERFACE protocol ip parent 1:0 prio 1 u32 match ip dport
22 0xffff flowid 1:5
tc filter add dev $INTERFACE protocol ip parent 1:0 prio 1 u32 match ip sport
22 0xffff flowid 1:5
greets
Julius