HTB problem...

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've tryed to make a script, some of you, who thinks it looks ok?

DEV=eth2
DOWNLINK=1024
UPLINK=512

DOWN1=768
UP1=384

DOWN2=256
UP2=128

tc qdisc add dev $DEV root handle 1: htb default 20

tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst
6k
tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \
    burst 6k prio 1
tc class add dev $DEV parent 1:1 classid 1:20 htb rate ${UP1}kbit \
   burst 6k prio 2
tc class add dev $DEV parent 1:1 classid 1:30 htb rate ${UP2}kbit \
   burst 6k prio 2

tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
           match ip src 192.168.0.2 flowid 1:20
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
           match ip src 192.168.0.3 flowid 1:30

Not tested yet...
If it works, feel free to letting me know, how to make something like
this, just for download rate.
If it doesn't work, please let me know, what you think is wrong.

- Rune Johannesen

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux