From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Pavan Kumar" Date: Tue, 10 May 2005 00:48:39 +0000 Subject: [LARTC] Help with PRIO qdisc and filters Message-Id: <00a801c554fa$01c48260$0201a8c0@PCIRVCPAVANK> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0060705558==" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --===============0060705558== Content-Type: multipart/alternative; boundary="----=_NextPart_000_00A9_01C554BF.5565AA60" This is a multi-part message in MIME format. ------=_NextPart_000_00A9_01C554BF.5565AA60 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi, Sorry to bother you all. I have a typical problem sharing DSL upstream bandwidth with users. I have 3 types of traffic high-priority, medium-priority and low priority. My upstream rate is 960kbits. Traffic = (any priority) can vary in bandwidth from 0 to 960kbits. I have a test setup where I can pump 600kbit of high priority sustained and I have 400kbit = of low priority traffic sustained. I expect after the 600kbit high-priority traffic, the remaining 360kbit should be allocated to the medium and low priority. Since I do not have medium-priority everything should go to low-priority traffic. However, I do not see that behavior with the = following tc script I have =20 ----------- Begin Script ------------- # delete any existing qdiscs tc qdisc del dev ppp0 root # setup PRIO qdisc with 3 bands tc qdisc add dev ppp0 root handle 1: prio band 3 priomap 0 0 0 0 0 0 0 0 = 0 0 0 0 0 0 0 0 # filter traffic for high priority based on TOS field tc filter add dev ppp0 parent 1:0 prio 1 protocol ip u32 match ip tos = 0x28 0xff flowid 1:1 tc filter add dev ppp0 parent 1:0 prio 1 protocol ip u32 match ip tos = 0x48 0xff flowid 1:2 tc filter add dev ppp0 parent 1:0 prio 1 protocol ip u32 match ip tos = 0x58 0xff flowid 1:3 =20 # use ebtables to set the TOS field. First flush the rules ebtables -t broute -F ebtables -t broute -I BROUTING 1 -j ftos --set-ftos 0x28 -p IPv4 = --ip-src 192.168.1.151/32 ebtables -t broute -I BROUTING 2 -j ftos --set-ftos 0x48 -p IPv4 = --ip-src 192.168.1.152/32 ebtables -t broute -I BROUTING 3 -j ftos --set-ftos 0x58 -p IPv4 = --ip-src 192.168.1.153/32 =20 ----------- End Script ------------------ =20 What I see is the high priority traffic is leaving at 600kbits as I = measure it on my test equipment. However, I do not see any low-priority or medium-priority traffic coming out of the box. I would appreciate if you folks can please give me a hint as to what is happening and also any possible solutions. I need hard PRIO but the unused bandwidth should be shared by the other traffic. I am using Linux kernel 2.6.8.1 and = iproute2 (iproute2-2.6.8-ss040730.tar.gz). =20 Regards, Pavan Kumar ------=_NextPart_000_00A9_01C554BF.5565AA60 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message
Hi,
Sorry = to bother you=20 all. I have a typical problem sharing DSL upstream bandwidth with users. = I have=20 3 types of traffic high-priority, medium-priority and low priority. My = upstream=20 rate is 960kbits. Traffic (any priority) can vary in bandwidth from 0 to = 960kbits. I have a test setup where I can pump 600kbit of high priority=20 sustained and I have 400kbit of low priority traffic sustained. I expect = after=20 the 600kbit high-priority traffic, the remaining 360kbit should be = allocated to=20 the medium and low priority. Since I do not have medium-priority = everything=20 should go to low-priority traffic. However, I do not see that behavior = with the=20 following tc script I have
 
----------- Begin=20 Script -------------
# = delete any=20 existing qdiscs
tc = qdisc del dev=20 ppp0 root
# = setup PRIO qdisc=20 with 3 bands
tc = qdisc add dev=20 ppp0 root handle 1: prio band 3 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0=20 0
# = filter traffic for=20 high priority based on TOS field
tc = filter add dev=20 ppp0 parent 1:0 prio 1 protocol ip u32 match ip tos 0x28 = 0xff flowid=20 1:1
tc = filter add dev=20 ppp0 parent 1:0 prio 1 protocol ip u32 match ip tos 0x48 = 0xff flowid=20 1:2
tc = filter add dev=20 ppp0 parent 1:0 prio 1 protocol ip u32 match ip tos 0x58 0xff  = flowid=20 1:3
 
# use = ebtables to=20 set the TOS field. First flush the rules
ebtables -t broute=20 -F
ebtables -t broute=20 -I BROUTING 1 -j ftos --set-ftos 0x28 -p IPv4 --ip-src=20 192.168.1.151/32
ebtables -t broute=20 -I BROUTING 2 -j ftos --set-ftos 0x48 -p IPv4 --ip-src=20 192.168.1.152/32
ebtables -t broute=20 -I BROUTING 3 -j ftos --set-ftos 0x58 -p IPv4 --ip-src=20 192.168.1.153/32
 
----------- End=20 Script ------------------
 
What I = see is the=20 high priority traffic is leaving at 600kbits as I measure it on my test=20 equipment. However, I do not see any low-priority or medium-priority = traffic=20 coming out of the box. I=20 would appreciate if you folks can please give me a hint as to what is = happening=20 and also any possible solutions. I need hard PRIO but the unused = bandwidth=20 should be shared by the other traffic. I am using Linux kernel 2.6.8.1 = and=20 iproute2 = (iproute2-2.6.8-ss040730.tar.gz).
 
Regards,
Pavan=20 Kumar
------=_NextPart_000_00A9_01C554BF.5565AA60-- --===============0060705558== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============0060705558==--