LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-07-2013, 06:18 PM   #1
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
does tc prio work across different interfaces?


say i have a router with 1 external connection and 2 internal ones. If i'm trying to limit downloads from the external to both of the connections, can I use htb with different prio values, and will the lower-numbered interface be de-prioritized during congestion?

like this:

Code:
tc qdisc add dev eth0 root handle 1: htb default 1
tc class add dev eth0 parent 1: classid 1:1 htb rate 106mbit ceil 106mbit prio 1 burst 15k


tc qdisc add dev eth1 root handle 1: htb default 1
tc class add dev eth1 parent 1: classid 1:1 htb rate 12.5mbit ceil 12.5mbit prio 2 burst 5k
here, i'm expecting that eth1 would be proportionally slowed more than eth0...
 
Old 10-07-2013, 11:56 PM   #2
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
no, it does not make sense; classes should have the same parent class to get priority work
 
Old 10-08-2013, 01:30 AM   #3
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
ok thanks, any way that i might get this idea to work?
 
Old 10-08-2013, 11:06 PM   #4
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
what do you expect to see? with the configuration above bandwidth for both interfaces is limited independently, what is wrong with it in you specific use-case?
 
Old 10-10-2013, 11:15 AM   #5
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
this router has 2 internal connections, 1 for my main network (eth0 in this example) and 1 for a public wifi network (eth1). They both are on different subnets. What I would like to do is prioritize the main network over the wifi one, such that it gets precedence. But it sounds like this isn't something that the prio option of htb can do...

Optionally, I was thinking about setting a minimum rate to be very low on the wifi network, like this:

Code:
tc qdisc add dev eth1 root handle 1: htb default 1
tc class add dev eth1 parent 1: classid 1:1 htb rate 1mbit ceil 12.5mbit burst 5k
thinking that, if eth0 is saturating the download, eth1 will be reduced to 1mbit... but this doesn't work either. essentially I want these 2 interfaces to "draw" from the same HTB rate pool, if that makes any sense...
 
Old 10-11-2013, 10:35 AM   #6
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
I do not think it is possible out-of-box with tc, because each interface has its own queue and these queues do not interact with each other; it is possible with user-space daemon though, that can adjust tc settings in a way of any imaginable complexity; I did not ever see such daemon
 
Old 10-11-2013, 04:19 PM   #7
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
right that's what i was thinking... queues apparently cannot stretch across interfaces.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
something i'm not getting about tc (htb & prio) psycroptic Linux - Networking 1 05-08-2013 06:57 AM
tc qdisc - a prio problem LinuxMatt Linux - Networking 1 10-11-2009 04:50 PM
prio qdisc - does this really work? GSMD Linux - Networking 1 05-28-2008 05:51 PM
kernel: qdisc with PRIO map ohu Linux - Software 0 10-19-2007 09:06 PM
iproute2 ip rule prio question bartmanxxi Linux - Networking 0 10-18-2006 07:32 AM

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

All times are GMT -5. The time now is 05:28 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