rsenykoff@harrislogic.com
2005-Jan-30 15:00 UTC
PRIO inside HTB - trouble attaching filters correctly?
Hello everyone! I''m simply trying to put a PRIO inside an HTB (used to throttle). I''ve got interactive traffic on the network that I want to give priority (VoIP + Citrix + Video). I''ve used the filters in a CBQ script fine, but am having trouble adjusting them to this setup such that they properly assign the traffic. tc qdisc del root dev $e tc qdisc add dev $e root handle 1: htb default 3 tc class add dev $e parent 1: classid 1:1 htb rate $wanRate # now that we''ve throttled the interface, we create the PRIO queue tc qdisc add dev $e parent 1:1 handle 10: prio # instantly creates classes 10:1, 10:2, 10:2 tc qdisc add dev $e parent 10:1 handle 1: pfifo tc qdisc add dev $e parent 10:2 handle 2: pfifo tc qdisc add dev $e parent 10:3 handle 3: sfq ############### VoIP ################ # IAX # this is the old format - IAX2 should be what''s really seen going on tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip sport 5036 0xffff flowid 10:1 tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip dport 5036 0xffff flowid 10:1 # IAX2 # tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip sport 4569 0xffff flowid 10:1 tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip dport 4569 0xffff flowid 10:1 # match icmp echo request tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip icmp_type 0x08 0xff flowid 10:1 # match icmp echo reply tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip icmp_type 0x00 0xff flowid 10:1 ## etc........... TIA! -Ron
rsenykoff@harrislogic.com
2005-Jan-31 06:05 UTC
Re: PRIO inside HTB - trouble attaching filters correctly?
<snip> Hello everyone! I''m simply trying to put a PRIO inside an HTB (used to throttle). I''ve got interactive traffic on the network that I want to give priority (VoIP + Citrix + Video). I''ve used the filters in a CBQ script fine, but am having trouble adjusting them to this setup such that they properly assign the traffic. tc qdisc del root dev $e tc qdisc add dev $e root handle 1: htb default 3 tc class add dev $e parent 1: classid 1:1 htb rate $wanRate # now that we''ve throttled the interface, we create the PRIO queue tc qdisc add dev $e parent 1:1 handle 10: prio # instantly creates classes 10:1, 10:2, 10:2 tc qdisc add dev $e parent 10:1 handle 1: pfifo tc qdisc add dev $e parent 10:2 handle 2: pfifo tc qdisc add dev $e parent 10:3 handle 3: sfq </snip> Fixed! The problem is that htb was not seeing any of the rules that I applied to the lower stuff, so it wasn''t forwarding traffic there. The fix: tc qdisc add dev $e root handle 1: htb default 1 By saying default 1, all htb traffic gets forwarded to classid 1:1, which has the PRIO queue attached. -Ron _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Stef Coene
2005-Jan-31 16:16 UTC
Re: PRIO inside HTB - trouble attaching filters correctly?
On Sunday 30 January 2005 16:00, rsenykoff@harrislogic.com wrote:> Hello everyone! > > I''m simply trying to put a PRIO inside an HTB (used to throttle). I''ve got > interactive traffic on the network that I want to give priority (VoIP + > Citrix + Video). > > I''ve used the filters in a CBQ script fine, but am having trouble > adjusting them to this setup such that they properly assign the traffic. > > tc qdisc del root dev $e > > tc qdisc add dev $e root handle 1: htb default 3 > > tc class add dev $e parent 1: classid 1:1 htb rate $wanRate > > # now that we''ve throttled the interface, we create the PRIO queue > tc qdisc add dev $e parent 1:1 handle 10: prio > # instantly creates classes 10:1, 10:2, 10:2 > > tc qdisc add dev $e parent 10:1 handle 1: pfifo > tc qdisc add dev $e parent 10:2 handle 2: pfifo > tc qdisc add dev $e parent 10:3 handle 3: sfq > > ############### VoIP ################ > > # IAX # this is the old format - IAX2 should be what''s really seen going > on > tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip sport 5036 > 0xffff flowid 10:1 > tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip dport 5036 > 0xffff flowid 10:1 > > # IAX2 # > tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip sport 4569 > 0xffff flowid 10:1 > tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip dport 4569 > 0xffff flowid 10:1 > > # match icmp echo request > tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip icmp_type > 0x08 0xff flowid 10:1 > > # match icmp echo reply > tc filter add dev $e protocol ip parent 10: prio 1 u32 match ip icmp_type > 0x00 0xff flowid 10:1 > > ## etc...........Where do you redirect the traffic to the prio qdisc ?????? Stef _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/