Hi, I want to use the prio qdisc for prioritizing outgoing TCP SYNs over all other outgoing traffic. I have managed to attach a prio qdisc to the root of an Ethernet device, by: tc qdisc add dev eth0 root handle 1: prio Now I want to do 2 things: 1. create a filter to catch TCP SYNs, and attach it to band 0 (highest priority). 2. direct all other traffic to higher bands (1 or 2). I know how to define the appropriate filter with u32; there is a similar example in the LARTC HOWTO, for capturing ACKs. What I don''t know is how to direct the traffic captured by a filter to a specific band. In the HOWTO I only see examples for attaching filters to CBQ classes. Can someone advise me on this one ? Best Regards, Oded Oded Shaham Flash Networks 16 Galgalei Haplada, Herzliya, Israel Tel: +972-9-9580666 ext. 215 Fax: +972-9-9564888 Cell phone: +972-5-4552009 Email: oded@flashnetworks.com
I think it''s easier to use ipchains : ipchains -A output -m 1 # Mark every packet with "1" ipchains -A output -m 2 -y -p tcp # Mark SYN with "2" The filter rules : tc filter add $DEV parent 10: protocol ip prio 3 handle 2 fw classid 10:2 # Put SYN in sub class 10:2 tc filter add $DEV parent 10: protocol ip prio 3 handle 2 fw classid 10:2 (I don''t know the exact syntax for the prio-qdisc) Staf More QOS info : http://users.belgacom.net/staf/ Oded Shaham wrote:> > Hi, > I want to use the prio qdisc for prioritizing outgoing TCP SYNs over all > other outgoing traffic. > I have managed to attach a prio qdisc to the root of an Ethernet device, by: > > tc qdisc add dev eth0 root handle 1: prio > > Now I want to do 2 things: > 1. create a filter to catch TCP SYNs, and attach it to band 0 (highest > priority). > 2. direct all other traffic to higher bands (1 or 2). > > I know how to define the appropriate filter with u32; there is a similar > example in the LARTC HOWTO, for capturing ACKs. What I don''t know is how to > direct the traffic captured by a filter to a specific band. In the HOWTO I > only see examples for attaching filters to CBQ classes. > > Can someone advise me on this one ? > > Best Regards, > Oded > > Oded Shaham > Flash Networks > 16 Galgalei Haplada, Herzliya, Israel > Tel: +972-9-9580666 ext. 215 > Fax: +972-9-9564888 > Cell phone: +972-5-4552009 > Email: oded@flashnetworks.com > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Hi there, I have done a lot of testing and I have a few questions about CBQ. You can split the traffic in diffent classes and it works great. But to do this, I have to add as the first class a bounded class with rate available link-bandwidth. I have tried different rates but CBQ isn''t very accurate. I added the testing results at the bottom of the posting (or go to http://users.belgacom.net/staf/) As you can see there are some very strange results (notice the change in throughput when I changed the rate 1kbps around 71475kbps and 135556kbps). I also noticed that the accuracy of splitting the traffic in different classes is very good unless you want to give a class < 25% of the bandwidth. I''m wondering if someone encountered the same problem and/or if it is a problem with tc or the kernel itself. -- Staf More QOS info : http://users.belgacom.net/staf/ RESULTS : RATE_TOT RESULT 1 kbps 1.05 KB/s 2 kbps 2.10 KB/s 3 kbps 3.04 KB/s 4 kbps 4.17 KB/s 5 kbps 5.02 KB/s 10 kbps 9.91 KB/s 15 kbps 14.7 KB/s 20 kbps 18.8 KB/s 30 kbps 29.2 KB/s 40 kbps 36.5 KB/s 50 kbps 49.2 KB/s 60 kbps 49.4 KB/s 65 kbps 49.3 KB/s 67 kbps 49.3 KB/s 68 kbps 49.3 KB/s 69 kbps 49.3 KB/s 71475 bps 51.1 KB/s 71476 bps 69.7 KB/s 70 kbps 69.9 KB/s 80 kbps 69.9 KB/s 90 kbps 70.3 KB/s 100 kbps 75.4 KB/s 130 kbps 75.7 KB/s 135556 bps 78.7 KB/s 135557 bps 139 KB/s 140 kbps 140 KB/s 150 kbps 140 KB/s 200 kbps 140 KB/s 300 kbps 140 KB/s 500 kbps 140 KB/s 1000 kbps 140 KB/s 1310719bps 146 KB/s 1310720bps 940 KB/s 2000 kbps 945 KB/s