LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-22-2006, 07:39 AM   #1
e1605project
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Rep: Reputation: 0
run multiple algorithm qdisc simultaneously (HTB & HFSC)


now i'm read a lot of knowledge paper about traffic control in linux because now i'm try to develop and research about traffic shaper so can everybody tell me about my topic

... Is it can do for real????

my topic is "
now, many organization use traffic shaper for control traffic and bandwidth because don't want something example
some mac address, ip address, traffic in that port or that application use a lot of bandwidth more than it appropriate should use example if people in organization try to use

p2p application ,it may make a lot of problem for all bandwidth in organization

now most famous algorithm to manage queue in mastershaper is "HTB" but i have just read some paper their tell about
"HFSC" algorithm ,it's very good to manage real-time application traffic so i think may be performance when HTB manage real-time application are not work if i comparable

with performance by HFSC"

so my project is ... i want to develop new traffic shaper that use 2 algorithm simultaneously (HTB for manage general traffic and HFSC for manage only real time application)

by when the package come in my shaper outbound i will have one filter for
filtering that package about what kind of that package??(general or real time application package) and then after filtering it will continue send that package to appropriate

queue to separate manage traffic later.

sorry for my bad english so much
may be you don't understand my project topic so looking in my picture.


(general package)
outbound --------HTB
---eth0----filter
------- HFSC
(real time application package)

now my problem is... i read a lot paper they tell if i want to use traffic shaper in outbound side. In linux i must use tc command for setting it, but it's telling me about setting

algoritm will start to set in root qdisc and root qdisc is outboud side
so i fear about i can't setting 2 algorithm simultaneously in tc command



so please advise me , if you think i'm misunderstand and Is it can do for real??? what should i do???


my question
1. In tc command, at root qdisc we must specify what kind of algorithm to use??(htb or etc)
but another class under root qdisc, it's must be only HTB algorthm??? or it may be setting to be another algorithm under root qdisc????
2. i want to have two different qdisc for run simultaneously?? Can i do it for real????
if i can, so what should i do it with tc command?????
3. In the one time, Linux can setting to have 2 root qdisc????

Last edited by e1605project; 06-22-2006 at 07:41 AM.
 
Old 06-23-2006, 12:01 AM   #2
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
Quote:
In tc command, at root qdisc we must specify what kind of algorithm to use??(htb or etc)
but another class under root qdisc, it's must be only HTB algorthm??? or it may be setting to be another algorithm under root qdisc????
AFAIK for every qdisc you create, either at the root or child, it is a must to specify the type: cbq, htb, pfifo,etc..

Quote:
2. i want to have two different qdisc for run simultaneously?? Can i do it for real????
if i can, so what should i do it with tc command?????
yes you can. picture this:

1:0 is the root qdisc, you attach three classes to it say 10:1 (for handling real-time traffic), 10:2 (for handling web-traffic) and 10:3 (for handling all others). then you will need to attach three more qdisc's to these three classes and they could be any of the available htb, cbq any. then you compose filters to selective re-direct traffic to these queues and attach it to the qdisc (preferably to the root qdisc).
Quote:
3. In the one time, Linux can setting to have 2 root qdisc????
if you are thinking of doing egress and ingress both, you will ofcourse need 2 root qdisc, they are totally separate and handle 2 kinds of traffic, outgoing and incoming.

The TLDP site has a very good documentation on tc. google for "LARTC howto", it stands for LINUX ADVANCED ROUTING AND TRAFFIC CONTROL and is the best doc available. also there's a mailing list for LARTC AFAIR.
 
Old 06-24-2006, 07:26 AM   #3
e1605project
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
thank you so much for your reply

i have just find some word in tc command syntax about "tc qdisc"

syntax: tc qdisc [add/del] dev String


2. About linux traffic control atchitecture theory, Is it true or false???(It's only my assumption)
Can i define new qdisc under root qdisc????
Because from theory, we define class under qdisc.

this is my assumption
tc qdisc add dev eth0 root handle 1: fifo
tc qdisc add dev eth0 parent 1: classid 10:1 htb rate 100kbps ceil 100kbps
tc qdisc add dev eth0 parent 1: classid 10:2 hfsc rate 100kbps ceil 100kbps
 
Old 06-24-2006, 07:31 AM   #4
e1605project
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
thank you so much for your reply
i have just find some word in tc command "tc qdisc"

syntax: tc qdisc [add/del] dev String
[handle][root/parent CLASSID]

so this is my assumption
tc qdisc add dev eth0 root handle 1: fifo
tc qdisc add dev eth0 parent 1: classid 10:1 htb rate 100kbps ceil 100kbps
tc qdisc add dev eth0 parent 1: classid 10:2 hfsc rate 100kbps ceil 100kbps

Is it corect?????


and Somebody tell me About linux traffic control atchitecture theory, Is it true or false???(It's only my assumption)
Can i define new qdisc under root qdisc????
Because from theory, we define class under qdisc.
 
Old 06-24-2006, 09:57 AM   #5
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
Quote:
Originally Posted by e1605project
Because from theory, we define class under qdisc.
yes you cannot attach another qdisc to the root qdisc or anyother qdisc. you must first derive classes from it and then attach qdiscs to those classes.
 
Old 06-26-2006, 07:06 AM   #6
e1605project
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you so much for your reply

Quote:
Originally Posted by prozac
you must first derive classes from it and then attach qdiscs to those classes.
i don't understand what's you mean?? can you describe me about..
At first i must derive classes and attach qdisc later????

i can't guess about tc command format how it should be???


err!! now i'm find information for my project about Can it do for real??? so this is true or false (i'm guess from your opinion)???

//first .. define root qdisc
tc qdisc add dev eth0 root handle 1: fifo

//second ... define class under root qdisc but algorithm's not same like root qdisc algorithm
tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
tc class add dev eth0 parent 1: classid 1:2 hfsc rate 100kbps ceil 100kbps

//later attach qdisc to those classes
tc qdisc add dev eth0 parent 1:1 classid 10:11 htb rate 100kbps ceil 100kbps
tc qdisc add dev eth0 parent 1:2 classid 10:21 hfsc rate 100kbps ceil 100kbps

Is is true or false????


And Can you tell me and explain this assumption about true or false too!
tc qdisc add dev eth0 root handle 1: fifo
tc qdisc add dev eth0 parent 1: classid 10:1 htb rate 100kbps ceil 100kbps
tc qdisc add dev eth0 parent 1: classid 10:2 hfsc rate 100kbps ceil 100kbps
Is it fase?? because from the theory we can't not define qdisc under root qdisc???

Thank you so much, and so sorry for my bad english language.
 
Old 06-26-2006, 11:52 PM   #7
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
Quote:
Originally Posted by e1605project
//first .. define root qdisc
tc qdisc add dev eth0 root handle 1: fifo

//second ... define class under root qdisc but algorithm's not same like root qdisc algorithm
tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
tc class add dev eth0 parent 1: classid 1:2 hfsc rate 100kbps ceil 100kbps

//later attach qdisc to those classes
tc qdisc add dev eth0 parent 1:1 classid 10:11 htb rate 100kbps ceil 100kbps
tc qdisc add dev eth0 parent 1:2 classid 10:21 hfsc rate 100kbps ceil 100kbps

Is is true or false????
its damn simple, but yes this is how you do it. at the end of your tree, you must have qdiscs as the leaf nodes AFAIK.

Quote:
And Can you tell me and explain this assumption about true or false too!
tc qdisc add dev eth0 root handle 1: fifo
tc qdisc add dev eth0 parent 1: classid 10:1 htb rate 100kbps ceil 100kbps
tc qdisc add dev eth0 parent 1: classid 10:2 hfsc rate 100kbps ceil 100kbps
Is it fase?? because from the theory we can't not define qdisc under root qdisc???
under root qdisc. no. you can't derive another qdisc under a root or any other qdisc. you must first attach a class.


first you attach a root qdisc to a network device ingress or outgress. Then you derive a root class (the parent of all classes). Next you derive some more classes from the root class. These classes are meant to classify different types of traffic. Then you attach a qdisc to all the leaf classes. These leaf qdisc will hold the traffic belonging to them. lastly you attach filters to a qdisc (preferably the root qdisc). These filters are actually rules that matches against the packets and hence redirect those packets to the concerned classes and to their leaf qdisc. you can picture a tree (only upside down). Why don't you read the TLDP LARTC HOWTO and then we can discuss more about it and I will try my best to clear out any confusion as best as i can.
 
  


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
how to write multiple threads working simultaneously ? indian Programming 3 09-19-2011 11:41 PM
LXer: Execute commands simultaneously on multiple servers LXer Syndicated Linux News 0 02-20-2006 11:31 AM
multiple programs play sound(audio) simultaneously mikepol Debian 7 02-12-2006 01:32 PM
tc qdisc and multiple external IPs tvynr Linux - Networking 2 10-12-2005 07:49 PM
neither cbq nor htb run correctly! saturn_vk Linux - Networking 0 04-27-2003 07:50 AM

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

All times are GMT -5. The time now is 03:45 PM.

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