Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-2008, 08:42 PM
D. Stussy
 
Posts: n/a
Rate limiting (old way and new)

Under the old way (using a "shaper#" pseudo-network-device), all one had to
do was to attach it, set the desired speed/maximum bandwidth, then route the
desired destination address(es) through it. The new way uses the "tc"
program from the iproute2 package. I have searched for examples on how to
do this with "tc" and have found some, but am still unclear. The manual
page for "tc" doesn't seem to list all the permutations (or options) of the
command, nor does it really explain what the different queueing disciplines
are. I also don't fully follow what the "classes" are and why they're
needed. The filter subsystem makes sense but also isn't fully explained. I
would have liked to have found an example of the old, depreciated "shaper0"
interface and its comparable "tc" setup but such has eluded me.

Where's a GOOD resource that explains ALL the workings of "tc"?

The resources I printed so far are:
http://linux.die.net/man/8/tc-tbf
http://www.linuxdocs.org/HOWTOs/Adv-...-HOWTO-14.html
http://www.topwebhosts.org/tools/traffic-control.php
http://www.linux.org/docs/ldp/howto/...it.single.html

None of these explain why I need to state the bandwidth for the main device
in the qdisc line. If the value is really used, I have an added
complication of that I cannot necessarily determine the value that will be
used for an ethernet interface (it's a 100Mbit, but the colocation provider
sometimes attaches a slower ethernet segment (10Mbit or effective 20Mbit as
10 full-duplex)). I could just follow the examples, but they're meaningless
unless I understand what they're doing.


Reply With Quote
  #2 (permalink)  
Old 03-05-2008, 06:16 PM
loki harfagr
 
Posts: n/a
Re: Rate limiting (old way and new)

On Mon, 03 Mar 2008 12:42:21 -0800, D. Stussy wrote:


Quick and dirty answer as I don't know what exactly you want
to shape and which parms you want to tune, and sorry but I have
not much time to devine why you didn't find the "lartc" documents
clear enough ;-)
anyway:

> Under the old way (using a "shaper#" pseudo-network-device), all one had
> to do was to attach it, set the desired speed/maximum bandwidth, then
> route the desired destination address(es) through it. The new way uses
> the "tc" program from the iproute2 package.


This was the previous "new" way, you may prefer to try
the "new" new way which uses the 'hashlimit' module and its
relatives. Sincerely I used the 'tc' way for a lot of different
trix and am almost done transfering the most of them rules to
use the new modules. The 'tc' is a really good tool but the
"recent (somehow)" modules are easier to describe to outsourcers ;-)
Reply With Quote
  #3 (permalink)  
Old 03-05-2008, 06:47 PM
buck
 
Posts: n/a
Re: Rate limiting (old way and new)

On Mon, 3 Mar 2008 12:42:21 -0800, "D. Stussy" <spam@bde-arc.ampr.org>
wrote:

>Under the old way (using a "shaper#" pseudo-network-device), all one had to
>do was to attach it, set the desired speed/maximum bandwidth, then route the
>desired destination address(es) through it. The new way uses the "tc"
>program from the iproute2 package. I have searched for examples on how to
>do this with "tc" and have found some, but am still unclear. The manual
>page for "tc" doesn't seem to list all the permutations (or options) of the
>command, nor does it really explain what the different queueing disciplines
>are. I also don't fully follow what the "classes" are and why they're
>needed. The filter subsystem makes sense but also isn't fully explained. I
>would have liked to have found an example of the old, depreciated "shaper0"
>interface and its comparable "tc" setup but such has eluded me.
>
>Where's a GOOD resource that explains ALL the workings of "tc"?


My opinion: Where is good documentation for anything in Linux?
Programmers are poor authors and good authors usually have no clue
what a program really does.

>The resources I printed so far are:
>http://linux.die.net/man/8/tc-tbf
>http://www.linuxdocs.org/HOWTOs/Adv-...-HOWTO-14.html
>http://www.topwebhosts.org/tools/traffic-control.php
>http://www.linux.org/docs/ldp/howto/...it.single.html
>
>None of these explain why I need to state the bandwidth for the main device
>in the qdisc line. If the value is really used, I have an added
>complication of that I cannot necessarily determine the value that will be
>used for an ethernet interface (it's a 100Mbit, but the colocation provider
>sometimes attaches a slower ethernet segment (10Mbit or effective 20Mbit as
>10 full-duplex)). I could just follow the examples, but they're meaningless
>unless I understand what they're doing.


I think you're looking in the wrong place. For simple rate limiting,
check iptables.

TC has no decent docs. You have found what there is. Your situtation
prevents the use of a queueing discipline because these only work when
the available bitrate has an absolute maximum that never varies.
--
buck

Reply With Quote
  #4 (permalink)  
Old 03-06-2008, 02:39 AM
D. Stussy
 
Posts: n/a
Re: Rate limiting (old way and new)

"buck" <buck@private.mil> wrote in message
news:hbqts39fi7p60sgcq7sfu472hfn0pbmhbu@4ax.com...
> On Mon, 3 Mar 2008 12:42:21 -0800, "D. Stussy" <spam@bde-arc.ampr.org>

wrote:
> >Under the old way (using a "shaper#" pseudo-network-device), all one had

to
> >do was to attach it, set the desired speed/maximum bandwidth, then route

the
> >desired destination address(es) through it. The new way uses the "tc"
> >program from the iproute2 package. I have searched for examples on how

to
> >do this with "tc" and have found some, but am still unclear. The manual
> >page for "tc" doesn't seem to list all the permutations (or options) of

the
> >command, nor does it really explain what the different queueing

disciplines
> >are. I also don't fully follow what the "classes" are and why they're
> >needed. The filter subsystem makes sense but also isn't fully explained.

I
> >would have liked to have found an example of the old, depreciated

"shaper0"
> >interface and its comparable "tc" setup but such has eluded me.
> >
> >Where's a GOOD resource that explains ALL the workings of "tc"?

>
> My opinion: Where is good documentation for anything in Linux?
> Programmers are poor authors and good authors usually have no clue
> what a program really does.
>
> >The resources I printed so far are:
> >http://linux.die.net/man/8/tc-tbf
> >http://www.linuxdocs.org/HOWTOs/Adv-...-HOWTO-14.html
> >http://www.topwebhosts.org/tools/traffic-control.php

>
>http://www.linux.org/docs/ldp/howto/...atelimit.singl

e.html
> >
> >None of these explain why I need to state the bandwidth for the main

device
> >in the qdisc line. If the value is really used, I have an added
> >complication of that I cannot necessarily determine the value that will

be
> >used for an ethernet interface (it's a 100Mbit, but the colocation

provider
> >sometimes attaches a slower ethernet segment (10Mbit or effective 20Mbit

as
> >10 full-duplex)). I could just follow the examples, but they're

meaningless
> >unless I understand what they're doing.

>
> I think you're looking in the wrong place. For simple rate limiting,
> check iptables.


Actually, using iptables doesn't do the job as I want the additional packets
queued or delayed (but still eventually sent), not dropped or rejected.

> TC has no decent docs. You have found what there is. Your situtation
> prevents the use of a queueing discipline because these only work when
> the available bitrate has an absolute maximum that never varies.


I have continued to explore and found that only the cbq qdisc had this
brain-dead arrangement. The htb and tbf qdiscs were much more reasonable,
and I think I figured out something that works for me using them. However,
getting all the parameters correctly stated took about an hour as for many
of them, the man pages dont' really cover them well. I probably have some
that are unnecessary - carried from the examples I found.

I really liked the reference to the "tc-filters" man page which doesn't even
exist!

What I needed to do was to rate-limit outbound packets to a particular
destination IP. That should have been obvious from my reference to the
depreciated "shaper0" virtual interface.


Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:41 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Watch Anime Online | Tents | WoW Gold | Unblock Myspace | Debt Consolidation



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114