Skip to contentSkip to conversation

How to use tc to limit bandwidth of a special IP in LAN

LARTC Chuanbo Xu 6 participants 10 messages Jun 13, 2001 – Jun 14, 2001

lore
Share & tools
lore

Chuanbo Xu

author
#0 lore raw

I have seen this document, but I don't understand means of options.
Usage: tc qdisc [ add | del | replace | change | get ] dev STRING
[ handle QHANDLE ] [ root | ingress | parent CLASSID ] [ estimator INTERVAL TIME_CONSTANT ]
[ [ QDISC_KIND ] [ help | OPTIONS ] ]

What are root,ingress and parent?
What is CLASSID?
What is handle?
..

Quoted 14 lines

http://www.ibiblio.org/pub/Linux/docs/HOWTO/Adv-Routing-HOWTO

----- Original Message -----
From: "Chuanbo Xu" <[email protected]>
To: <[email protected]>
Sent: Tuesday, June 12, 2001 1:00 AM
Subject: [LARTC] How to use tc to limit bandwidth of a special IP in LAN

Quoted 3 lines

hi,

I want to limit bandwidth of a special IP in LAN, when it upload or

download from Internet through Linux server. How to use tc to do?

Quoted 1 line
Quoted 8 lines
Quoted 6 lines

Thanks.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a

..nl/2.4Routing/

Quoted 1 line

Chuanbo Xu
[email protected]

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

#1 lore raw

Re: Re: [LARTC] How to use tc to limit bandwidth of a special IP in

Quoted 9 lines · Chuanbo Xu

I have seen this document, but I don't understand means of options.
Usage: tc qdisc [ add | del | replace | change | get ] dev STRING
[ handle QHANDLE ] [ root | ingress | parent CLASSID ] [ estimator INTERVAL TIME_CONSTANT ]
[ [ QDISC_KIND ] [ help | OPTIONS ] ]

What are root,ingress and parent?
What is CLASSID?
What is handle?

You don't have to understand all details to setup a working bandwidth limiting Linux router, try the example setups and experiment. That's the only way to lear to use it.

CLASSID and handle are just identifiers to point the the right classes. Just think about them like names. Root is the root of the class tree.

RTFM means "Read The Fucking Manual". You can find it back at:
http://www.astro.umd.edu/~marshall/abbrev.html#R

There is even a Chinese version of the manual:
http://www.e-infomax.com/ipmasq/ipmasq-howto.html

Signature · 8 lines
GnuPG public key: http://win-www.uia.ac.be/u/s965817/pub.key
fingerprint = A3C4 DE50 712D 4FA8 C564  4D96 5E06 C9CC ECFA 19C5
Please type your text BELOW the qoute.


_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
#2 lore raw
In reply to Chuanbo Xu
Quoted 9 lines · Chuanbo Xu

I have seen this document, but I don't understand means of options.
Usage: tc qdisc [ add | del | replace | change | get ] dev STRING
[ handle QHANDLE ] [ root | ingress | parent CLASSID ] [ estimator INTERVAL TIME_CONSTANT ]
[ [ QDISC_KIND ] [ help | OPTIONS ] ]

What are root,ingress and parent?
What is CLASSID?
What is handle?

Good question. If anybody has any idea what all these keywords mean I'd really appreciate the answer.

Ramin

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

#3 lore raw
In reply to Chuanbo Xu
Quoted 8 lines · Wingtung.Leung
Quoted 6 lines · Chuanbo Xu

I have seen this document, but I don't understand means of options.
Usage: tc qdisc [ add | del | replace | change | get ] dev STRING
[ handle QHANDLE ] [ root | ingress | parent CLASSID ] [ estimator INTERVAL TIME_CONSTANT ]
[ [ QDISC_KIND ] [ help | OPTIONS ] ]

Quoted 7 lines
Quoted 3 lines

What are root,ingress and parent?
What is CLASSID?
What is handle?

You don't have to understand all details to setup a working bandwidth limiting Linux router, try the example setups and experiment. That's the only way to lear to use it.

You mean there is no-one (even not the one who wrote this QoS thing) has a decent doc on that? Trial and error is evil and waste of time.

Ramin

Quoted 9 lines

CLASSID and handle are just identifiers to point the the right classes. Just think about them like names. Root is the root of the class tree.

RTFM means "Read The Fucking Manual". You can find it back at:
http://www.astro.umd.edu/~marshall/abbrev.html#R

There is even a Chinese version of the manual:
http://www.e-infomax.com/ipmasq/ipmasq-howto.html

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

#4 lore raw

Re: Re: [LARTC] How to use tc to limit bandwidth of a special IP in

In reply to Chuanbo Xu
Quoted 2 lines · Ramin Alidousti

You mean there is no-one (even not the one who wrote this QoS thing) has a decent doc on that? Trial and error is evil and waste of time.

First, the best way to learn things is to try it. If you think that's a waste of time, you shouldn't be using GNU/Linux in the first place, but consider a commercial boxed Cisco router or something alike.

And secondly, the best and most accurate documentation: the source code. Every detail is explained there.

No offence.

A handle is just a tool or way to hold something, in this case a pointer or reference to the previously constructed class.

(Please don't CC me, I'm already subscribed to the list.)

Signature · 8 lines
GnuPG public key: http://www.keyserver.net
fingerprint = A3C4 DE50 712D 4FA8 C564  4D96 5E06 C9CC ECFA 19C5



_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
#5 lore raw
In reply to Chuanbo Xu
Quoted 1 line · Wingtung.Leung

First, the best way to learn things is to try it. If you think that's a

I'm not opposed to trying. But just think how much time you'd waste if you had to start from nowhere with apache/sendmail/bash/netfilter and many many other applications. Of course you have the source and can figure out what they do by going through the code line by line, but that's not the point.

Why do you think that your "GNU/Linux" has "Linux Documentation Project"????

Quoted 2 lines

waste of time, you shouldn't be using GNU/Linux in the first place, but consider a commercial boxed Cisco router or something alike.

Actually, one of the reasons that I don't like the commercial products like cisco is that you get:

Command Comment
------- -------
ip cef enables cef
no ip cef disables cef

but what the heck is cef in the first place?

Most of the Linux applications have an excellent documentation. iproute2 is an exception.

Quoted 2 lines

And secondly, the best and most accurate documentation: the source code. Every detail is explained there.

I'm glad that it's not coded in machine language...

Quoted 1 line

No offence.

non taken.

Quoted 4 lines

A handle is just a tool or way to hold something, in this case a pointer or reference to the previously constructed class.

(Please don't CC me, I'm already subscribed to the list.)

I'd expected more from an academicus as yourself. They used to have many courses like "formele specificaties". Did they remove them from the programs?

Ramin

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

#6 lore raw
In reply to Chuanbo Xu

Nothing like trial and error, but cone on, let's not have have each person individually reinvent the wheel. Many man hours are wasted trying to figure out how the most basic commands work by experimentation, when it would be so easy to just make a clear explanation of them in the documentation. Some examples of the command line would be most helpful.

While Linux, in general is not for the faint of heart, the doccumentation for this particular set of tools is overly cryptic. I, for one, am not a programmer and can't "read the source code". Not that that should be necessary for anyone not refining it anyway. With a good explanation of the cammands and variables, those man hours could be spent working on innovative ways to impliment these wonderful tools, rather than trying to figure out which end goes up.

I have spent days trying to do the most basic things with these new tools that I accomplished in hours with 2.2.x, and have made some progress but it does not have to be so difficult.

The Linux project is a wonderful thing! Millons of people from all over the world, working together and sharing their knowledge and ideas. And creating a first rate OS in the process. Linux is gaining more and more support every day. I believe that it will soon find it's place in the commonwealth that it is so deserving of, but for that to happen it's features must be accessable to users other than the Elete.

Finally, the power is in the right place. In the hands of the users. Let's try and get along. We are all on the same team.

----- Original Message -----
From: "Ramin Alidousti" <[email protected]>
To: <[email protected]>
Sent: Wednesday, June 13, 2001 4:49 PM
Subject: Re: Re: [LARTC] How to use tc to limit bandwidth of a special IP in LAN

Quoted 5 lines · Wingtung.Leung
Quoted 2 lines

First, the best way to learn things is to try it. If you think that's a

I'm not opposed to trying. But just think how much time you'd waste if you

had

Quoted 1 line

to start from nowhere with apache/sendmail/bash/netfilter and many many

other

Quoted 1 line

applications. Of course you have the source and can figure out what they

do

Quoted 3 lines

by going through the code line by line, but that's not the point.

Why do you think that your "GNU/Linux" has "Linux Documentation

Project"????

Quoted 5 lines
Quoted 3 lines

waste of time, you shouldn't be using GNU/Linux in the first place, but consider a commercial boxed Cisco router or something alike.

Actually, one of the reasons that I don't like the commercial products

like

Quoted 10 lines

cisco is that you get:

Command Comment
------- -------
ip cef enables cef
no ip cef disables cef

but what the heck is cef in the first place?

Most of the Linux applications have an excellent documentation. iproute2

is

Quoted 11 lines

an exception.

Quoted 2 lines

And secondly, the best and most accurate documentation: the source code. Every detail is explained there.

I'm glad that it's not coded in machine language...

Quoted 1 line

No offence.

non taken.

Quoted 7 lines
Quoted 4 lines

A handle is just a tool or way to hold something, in this case a pointer or reference to the previously constructed class.

(Please don't CC me, I'm already subscribed to the list.)

I'd expected more from an academicus as yourself. They used to have many courses like "formele specificaties". Did they remove them from the

programs?

Quoted 6 lines

Ramin

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:

http://ds9a.nl/2.4Routing/

Quoted 1 line

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

#7 lore raw

Re: Re: [LARTC] How to use tc to limit bandwidth of a special IP in

In reply to Chuanbo Xu
Quoted 8 lines · streeterk

Nothing like trial and error, but cone on, let's not have have each person individually reinvent the wheel. Many man hours are wasted trying to figure out how the most basic commands work by experimentation, when it would be so easy to just make a clear explanation of them in the documentation. Some examples of the command line would be most helpful.

While Linux, in general is not for the faint of heart, the doccumentation for this particular set of tools is overly cryptic.

Maybe I'm using a different iproute2 package than you, but my iproute2 came with a massive 60 page manual: ip-cref.dvi. It really is way more documentation than you get with most tools.

I've often cursed iproute2 for its command syntax, but the root problem always turns out to be my own ignorance of routing and internetworking.

-jwb

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

#8 lore raw
In reply to Chuanbo Xu
Quoted 11 lines · Jeffrey W. Baker
Quoted 8 lines · streeterk

Nothing like trial and error, but cone on, let's not have have each person individually reinvent the wheel. Many man hours are wasted trying to figure out how the most basic commands work by experimentation, when it would be so easy to just make a clear explanation of them in the documentation. Some examples of the command line would be most helpful.

While Linux, in general is not for the faint of heart, the doccumentation for this particular set of tools is overly cryptic.

Quoted 6 lines

Maybe I'm using a different iproute2 package than you, but my iproute2 came with a massive 60 page manual: ip-cref.dvi. It really is way more documentation than you get with most tools.

I've often cursed iproute2 for its command syntax, but the root problem always turns out to be my own ignorance of routing and internetworking.

Yes. I have these .tex files as well. Much beter than scanning through the source code...

"ip" is kind of easy to follow (maybe because I already know what I'm looking for) but when it comes down to "tc", my head spins. Take the following (easy) example:

tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 1Mbit \
allot 1514 cell 8 weight 100Kbit prio 3 maxburst 20 avpkt 1000 split 1:0 \
defmap c0

A small note on all these options would have saved me a lot of guess-work.

But anyway, don't take me wrong. I think that iproute2 is one of the coolest networking tools I've ever seen.

Ramin

Quoted 2 lines

-jwb

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

#9 lore raw
In reply to Chuanbo Xu

Due to the lack of documentation for TC, I have started to write a TC command reference. It's not finished but maybe you will find it usefull.

http://linux.bergqvist.se/tc/

Regards,
Daniel

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Ramin Alidousti
Sent: Thursday, June 14, 2001 5:18 AM
To: Jeffrey W. Baker
Cc: streeterk; Linux Advanced Routing
Subject: Re: Re: [LARTC] How to use tc to limit bandwidth of a special IP in LAN

On Wed, Jun 13, 2001 at 07:10:00PM -0700, Jeffrey W. Baker wrote:

Yes. I have these .tex files as well. Much beter than scanning through the source code...

"ip" is kind of easy to follow (maybe because I already know what I'm looking
for) but when it comes down to "tc", my head spins. Take the following (easy)
example:

tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 1Mbit \
allot 1514 cell 8 weight 100Kbit prio 3 maxburst 20 avpkt 1000 split 1:0 \
defmap c0

A small note on all these options would have saved me a lot of guess-work.

But anyway, don't take me wrong. I think that iproute2 is one of the coolest networking tools I've ever seen.

Ramin

Quoted 2 lines

-jwb

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
http://ds9a.nl/2.4Routing/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/