From: Mathew Brown Date: Tue, 04 Jul 2006 13:30:59 +0000 Subject: Re: [LARTC] Simple Rule to Cap P2P Uploads Message-Id: <20060704133059.94157.qmail@web55704.mail.re3.yahoo.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0308012987==" List-Id: References: <978458167.3856.1.camel@hpa.oldum.net> In-Reply-To: <978458167.3856.1.camel@hpa.oldum.net> To: lartc@vger.kernel.org --===============0308012987== Content-Type: multipart/alternative; boundary="0-645450403-1152019859=:93439" Content-Transfer-Encoding: 8bit --0-645450403-1152019859=:93439 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks for your reply Nikolay. I feel my first post was somewhat unclear. = I hope the following information clears things up a little more: 1) The machine that I am trying to run do tc on has a single interface that= connects it to the the rest of the network. 2) I sometimes have to ssh and scp files from that machine. 3) The machine runs various P2P applications. I don't want the sum of thei= r uploads to exceed 3 KB/s. 4) As you mentioned, my ADSL uplink is 64000 bps 5) The machine that I have tc running on and the machine with the P2P uploa= ds are the same machine. Thanks for your comments. I'll try to check out the kbps vs. kbits. But i= s the idea of what I'm trying to do now more clear? Nikolay Kichukov wrote: Hi Mathew, your adsl uplink is 64000 bps, correct? 102400kbps > 64kbps 3kbps !=3D 3KB/sec Another point, tc syntax is 102400kbit, not 102400kbps(as far as I tested that). 3KB =3D 3*8 kbit Test that and let us know if this helps. -Nik On Wed, 2006-06-28 at 09:50 -0700, Mathew Brown wrote: > Hi, > I'm new at traffic control and was reading up on HTB and using it to > put an upper limit on traffic. I have a 256k DSL with 64k upload > (which translates to about 5/6KB uploads). The machine running the > P2P applications keeps filling up the 64K so my browsing from other > machines in the network ends up being very slow. Since there are > several P2P applications, I wanted to set the entire upload cap to > something like 3KB/s so it doesn't disrupt browsing. However, I would > also like to ssh and scp from this machine without having an upload > cap. The machine has a single interface to the network: eth0. I > tried the following tc lines but it appears to affect both the P2P > traffic and my ssh traffic, resulting in a very slow ssh sessions: > =20 > tc qdisc add dev eth0 root handle 1: htb default 3 > tc class add dev eth0 parent 1: classid 1:1 htb rate 102400kbps ceil > 102400kbps > tc class add dev eth0 parent 1:1 classid 1:2 htb rate 102400kbps ceil > 102400kbps > tc class add dev eth0 parent 1:1 classid 1:3 htb rate 3kbps ceil 3kbps > tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip > dport 22 0xffff flowid 1:2 >=20 > Any ideas? Thanks for your time. >=20 >=20 > ______________________________________________________________________ > Do you Yahoo!? > Next-gen email? Have it all with the all-new Yahoo! Mail Beta. > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --=20 =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD= =EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD, =EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD. =EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD = =EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD, = =EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD = =EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD... -=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD =09 --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs.Try it free.=20 --0-645450403-1152019859=:93439 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks for your reply Nikolay.  I feel my first post was somewhat uncl= ear.  I hope the following information clears things up a little more:=

1) The machine that I am trying to run do tc on has a single interf= ace that connects it to the the rest of the network.

2) I sometimes = have to ssh and scp files from that machine.

3) The machine runs var= ious P2P applications.  I don't want the sum of their uploads to excee= d 3 KB/s.

4) As you mentioned, my ADSL uplink is 64000 bps

5)= The machine that I have tc running on and the machine with the P2P uploads= are the same machine.

Thanks for your comments.  I'll try to c= heck out the kbps vs. kbits.  But is the idea of what I'm trying to do= now more clear?

Nikolay Kichukov <hijacker@oldum.net> wrote:
Hi Mathew,
your = adsl uplink is 64000 bps, correct?

102400kbps > 64kbps
3kbps !=3D 3KB/sec
Another point, tc syntax is 102400kbit, not 102400kbps(as far as I
= tested that).

3KB =3D 3*8 kbit

Test that and let us know if t= his helps.

-Nik

On Wed, 2006-06-28 at 09:50 -0700, Mathew Bro= wn wrote:
> Hi,
> I'm new at traffic control and was reading = up on HTB and using it to
> put an upper limit on traffic. I have a = 256k DSL with 64k upload
> (which translates to about 5/6KB uploads).= The machine running the
> P2P applications keeps filling up the 64K= so my browsing from other
> machines in the network ends up being ve= ry slow. Since there are
> several P2P applications, I wanted to set= the entire upload cap to
> something like 3KB/s so it doesn't disrup= t browsing. However, I would
> also like to ssh and scp from this ma= chine without having an upload
> cap. The machine has a single inter= face to the network: eth0. I
> tried the following tc lines but it appears to a= ffect both the P2P
> traffic and my ssh traffic, resulting in a very = slow ssh sessions:
>
> tc qdisc add dev eth0 root handle 1: = htb default 3
> tc class add dev eth0 parent 1: classid 1:1 htb rate = 102400kbps ceil
> 102400kbps
> tc class add dev eth0 parent 1:1= classid 1:2 htb rate 102400kbps ceil
> 102400kbps
> tc class a= dd dev eth0 parent 1:1 classid 1:3 htb rate 3kbps ceil 3kbps
> tc fil= ter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
> dport 2= 2 0xffff flowid 1:2
>
> Any ideas? Thanks for your time.
&= gt;
>
> _____________________________________________________= _________________
> Do you Yahoo!?
> Next-gen email? Have it al= l with the all-new Yahoo! Mail Beta.
> ______________________________= _________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl<= br>> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
--
=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD = =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD, = =EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD.<= br>=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD =EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD, =EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD =EF=BF=BD=EF=BF=BD=EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD=EF=BF=BD=EF=BF=BD=EF=BF=BD...
-=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD



Yahoo! Music Unlimited - Access over 1 million songs. Try it free.=20 --0-645450403-1152019859=:93439-- --===============0308012987== 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 --===============0308012987==--