Stef, Lartc people, Hello, im using the above script for my network It works okay, the htb assigns the BW i want for outgoing traffic. But now, im looking foward giving priority to the packets on the first class under the second, i mean the first class packets leave the interface first than the second class. How do i apply that without loosing my conf? Well, thank you all for the help! Esteban tc qdisc add dev $DEV root handle 1: htb default 20 tc class add dev $DEV parent 1: classid 1:1 htb rate 1024kbit burst 6k tc class add dev $DEV parent 1:1 classid 1:10 htb rate 600kbit ceil 600kbit prio 1 tc class add dev $DEV parent 1:1 classid 1:20 htb rate 400kbit ceil 400kbit prio 2 tc class add dev $DEV parent 1:1 classid 1:30 htb rate 74kbit ceil 110kbit prio 3 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 # TOS Minimum Delay (ssh, NOT scp) in 1:10: tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip tos 0x10 0xff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip protocol 1 0xff flowid 1:10 tc filter add dev $DEV parent 1: protocol ip prio 2 u32 match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:10 # icmp tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip protocol 1 0xff flowid 1:10 # IMPORTANT AND FAST! ALWAYS! (all related to web browsing) tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 80 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 80 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 8080 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 8080 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 443 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 443 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 1863 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 22 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 22 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 53 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 53 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 259 0xffff flowid 1:10 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 259 0xffff flowid 1:10 # el pop a la clase 20 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 110 0xffff flowid 1:20 tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 110 0xffff flowid 1:20 tc filter add dev $DEV parent 1: protocol ip prio 18 u32 match ip dst 0.0.0.0/0 flowid 1:20 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Sunday 13 July 2003 22:18, Esteban wrote:> Stef, Lartc people, > > Hello, im using the above script for my network It works okay, the htb > assigns the BW i want for outgoing traffic. But now, im looking foward > giving priority to the packets on the first class under the second, i mean > the first class packets leave the interface first than the second class. > How do i apply that without loosing my conf?Using different prio''s can be tricky. It can speed up some packets, but at the same moment, creating extra delays for the same packets if you send too much of them. At the same time, you have to be carefully with the different rates for the child classes. Make sure the sum is not more then the parent rate. Otherwise it can be difficult to find out what wil happen. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/