Skip to contentSkip to conversation

tc

LARTC Stef Coene 9 participants 13 messages Jan 5, 1980 – Apr 25, 2005

lore
Share & tools
lore

Stef Coene

author
#0 lore raw
Quoted 7 lines · Srikanth Goteti

Hi,
I am using the followings commands to execute to control bandwidth between

192.168.1.5 - 192.168.1.4 to 50Mbps

but when I run these series of commands and check the bandwidth between these I get only 19Mbps.

How do you measure the bandwidth ?

Quoted 5 lines

/sbin/tc qdisc add dev eth0 root handle 10: cbq bandwidth 100Mbit avpkt 1000

/sbin/tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 100Mbit rate 100Mbit weight 10Mbit maxburst 20 avpkt 1000 allot 1514 prio 3

And what if you bound this class as well ?

Stef

Signature · 7 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#1 lore raw

Hi!

I am trying to use tc to provide a certain bandwidth. From the experiments that I have made so far it seems to me that the bandwidth limitation is working, but is not extremely precise. I just wonder whether this is something that can be corrected, and, if yes, how. Or is it just me not knowing very precise how to use the tc parameters?

Regards,

Sebastian

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

#2 lore raw
In reply to Stef Coene
Quoted 9 lines · Sebastian Taralunga

Hi!

I am trying to use tc to provide a certain bandwidth. From the experiments that I have made so far it seems to me that the bandwidth limitation is working, but is not extremely precise. I just wonder whether this is something that can be corrected, and, if yes, how. Or is it just me not knowing very precise how to use the tc parameters?

TBF is very precise, as is HTB. CBQ can guess wrong at times. TBF can also be misconfigured.

CBQ can also be helped to be more precise - if you see CBQ not achieving the rates you configured, consider raising the 'minburst or mtu' parameter a bit. See the HOWTO for exact details what these do.

For more exact help, please post your CBQ configuration.

Regards,

bert

Signature · 8 lines
http://www.PowerDNS.com          Versatile DNS Software & Services
Trilab                                 The Technology People
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
#3 lore raw
In reply to Stef Coene

Hi,
I am using the followings commands to execute to control bandwidth between

192.168.1.5 - 192.168.1.4 to 50Mbps

but when I run these series of commands and check the bandwidth between these I get only 19Mbps.

/sbin/tc qdisc del dev eth0 root

/sbin/tc qdisc add dev eth0 root handle 10: cbq bandwidth 100Mbit avpkt 1000

/sbin/tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 100Mbit rate 100Mbit weight 10Mbit maxburst 20 avpkt 1000 allot 1514 prio 3

/sbin/tc class add dev eth0 parent 10:1 classid 10:10 cbq bandwidth 100Mbit rate 50Mbit weight 5Mbit maxburst 20 avpkt 1000 allot 1514 prio 3 bounded

/sbin/tc filter add dev eth0 parent 10:0 protocol ip prio 3 u32 match ip dst 192.168.1.4 flowid 10:10

I am also displaying the output of qdisc and class of tc

---------------------------------------------------------------

# /sbin/tc -s qdisc show dev eth0

qdisc cbq 10: rate 100Mbit (bounded,isolated) prio no-transmit
Sent 26177842 bytes 18063 pkts (dropped 0, overlimits 5406)
borrowed 0 overactions 0 avgidle 62 undertime 0
-----------------------------------------------------------------

# /sbin/tc -s class show dev eth0

class cbq 10: root rate 100Mbit (bounded,isolated) prio no-transmit
Sent 26792774 bytes 19823 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 62 undertime 0
class cbq 10:10 parent 10:1 rate 50Mbit (bounded) prio 3
Sent 24900652 bytes 16554 pkts (dropped 0, overlimits 7194)
borrowed 0 overactions 1314 avgidle 1657 undertime 0
class cbq 10:1 parent 10: rate 100Mbit prio 3
Sent 24900652 bytes 16554 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 60 undertime 0

Thanks in advance,

regards,
Srikanth Goteti
Research Assitant,
Dept. of Computer Science,
University of Houston

#4 lore raw
In reply to Stef Coene

Hello lartc,

Well, I have some trouble with iproute. I wrote a letter some days
ago that tc is not filtering my traffic (I included script), so could somebody send to me real example? By the way, I have ADSL 384Kbit/s downstream and
128Kbit/s upstream. I need to divide my incoming speed into 3 parts:
1) about 10Kb/s
2) about 10Kb/s
3) about 30Kb/s
How this could be done?

Signature · 6 lines
Best regards,
 Waters                          mailto:[email protected]

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#5 lore raw

[LARTC] TC

In reply to Stef Coene

Thanks for the very prompt reply.

I've been googling already for a few days now trying to understand how bandwidth management works. I came to understand that TC is a utility that I can use to shape up my local network bandwidth consumption. Im hoping I will be guided here through.
Here are my questions:
1. Is TC works on an interface of a physical device only?
2. My objective is to limit the upload/download rate of each computer in our local network attached to CPE. In this case, all PC's are attached to common interface (let's sat eth0), will I be able to filter or limit individiual PC on their UL/DL rate?
Seeing those examples in the net, tc works on device interface only. Hope my understanding is not correct.

Thanks.
More question to come......
grace
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#6 lore raw

Re: [LARTC] TC

In reply to Stef Coene
Quoted 1 line · Grace Baldonasa

1. Is TC works on an interface of a physical device only?

No. There is an virtual device called imq (http://linuximq.net)

Quoted 4 lines

2. My objective is to limit the upload/download rate of each computer in our local network attached to CPE. In this case, all PC's are attached to common interface (let's sat eth0), will I be able to filter or limit individiual PC on their UL/DL rate?

Yes. You can do it with imq+u32 filter ..

Regards,

Daniel

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

#7 lore raw

Re: [LARTC] TC

In reply to Stef Coene

Hi,

Thanks.
I tried the site you gave me below. Looks like it's a restricted site. Any chance I can get access to it?
Thanks.

regards,

Grace

Quoted 13 lines · Daniel Harold L.
Quoted 1 line · Grace Baldonasa

1. Is TC works on an interface of a physical device only?

No. There is an virtual device called imq (http://linuximq.net)

Quoted 4 lines

2. My objective is to limit the upload/download rate of each computer in our local network attached to CPE. In this case, all PC's are attached to common interface (let's sat eth0), will I be able to filter or limit individiual PC on their UL/DL rate?

Yes. You can do it with imq+u32 filter ..

Quoted 9 lines

Regards,

Daniel

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

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