LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-15-2005, 12:20 AM   #1
kartheekpn
Member
 
Registered: Mar 2005
Location: bangalore
Posts: 100

Rep: Reputation: 15
bandwidth management,htb, r2q?? quantum??


Hello Everybody,
I am working on a Bandwidth management project for my company.I am running TCNG 10-b but I am not able to classify packets based on MAC address using tcng, so I am running tc commands in /tcng/bin and they are working. But is there a way out to classify packets based on MAC address using TCNG.
And, I am successful in throttling down the Bandwidth to 8kbit using HTB. Below that I get report to change r2q. I want to bring down the Leaf class Bandwidth to 3kbit.My script is as below:

Tc Script to throttle down the Bandwidth to 8kbit based on MAC address and IP address
tc qdisc del dev eth0 root

tc qdisc add dev eth0 root handle 1:0 htb default 30 r2q 1

tc class add dev eth0 parent 1:0 classid 1:1 htb rate 24kbit ceil 24kbit quantum 1514

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 8kbit ceil 8kbit
tc qdisc add dev eth0 parent 1:10 handle 10:0 sfq

tc class add dev eth0 parent 1:1 classid 1:20 htb rate 8kbit ceil 8kbit
tc qdisc add dev eth0 parent 1:20 handle 20:0 sfq

tc class add dev eth0 parent 1:1 classid 1:30 htb rate 8kbit ceil 8kbit
tc qdisc add dev eth0 parent 1:30 handle 30:0 sfq

tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.10.163 flowid 1:10

tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32
match u32 0x11e6bd53 0xffffffff at -12
match u16 0x0011 0xffff at -14 flowid 1:20

If I am to Throttle down the Leaf class Bandwidth to 3kbit what should be the value of root qdisc r2q?? and what should be the value of root class quantum??
Regards
 
Old 03-18-2005, 12:32 PM   #2
pave
Member
 
Registered: Oct 2004
Posts: 42

Rep: Reputation: 16
Normaly you don't need to specify quantums manualy as HTB chooses precomputed values. It computes classe's quantum (when you add or change it) as its rate divided by r2q global parameter. Its default value is 10 and because typical MTU is 1500 the default is good for rates from 15 kBps (120 kbit). For smaller minimal rates specify r2q 1 when creating qdisc - it is good from 12 kbit which should be enough. If you will need you can specify quantum manualy when adding or changing the class. You can avoid warnings in log if precomputed value would be bad. When you specify quantum on command line the r2q is ignored for that class.
 
1 members found this post helpful.
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IP bandwidth management RandomLinuxNewb Linux - Networking 1 07-23-2005 11:48 PM
HTB.init and "metropolitan" bandwidth shaping Ghitza Linux - Networking 0 11-23-2004 06:47 PM
HTB: how to shape the bandwidth the router may consume? meks Linux - Networking 1 04-30-2004 03:42 PM
bandwidth management louies Linux - Networking 2 12-05-2003 12:32 AM
Bandwidth management sunil_lc Linux - Networking 1 10-30-2003 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration