Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Tue Jun 21, 2005 12:01 am 
Offline
Junior Member
User avatar

Joined: Sun Apr 17, 2005 10:34 am
Posts: 45
I'm not sure how the bridge will impact this but maybe what you need are some HTB rules on your bridge interface.

Maybe something like this:
Code:
           1:
           |
          1:1
          /\
         /  \
        /    \
 Laptop 85%   \
   1:10        \
    /\          \
   /  \        Other 15%
  /    \         1:20
[1:11] [1:12]    /  \
 high   low     /    \
              [1:21] [1:22]
               high   low


Children of 10: would be guaranteed 85% of the bandwidth, 11: would be guaranteed the rest. Both classes being able to borrow from the other when it is not in use. Put all high priority traffic from the IP of your laptop into 10:1, all other traffic from that IP into 10:2. High prioirity traffic from all other IP's into 11:1, all other traffic into 11:2. Set the dequeueing priorities of 1:10, 1:11, and 1:21 to 1, set 1:20, 1:22, and 1:12 to 2.

This translates into TC commands like so (i think):

Code:
tc qdisc add dev  root handle 1: htb \
   default 22

tc class add dev br0 parent 1: classid 1:1 htb \
   rate 90000kbit

tc class add dev br0 parent 1:1 classid 1:10 htb \
   rate 76500kbit \
   prio 1

tc class add dev br0 parent 1:10 classid 1:11 htb \
   rate 65025kbit \
   prio 1

tc class add dev br0 parent 1:10 classid 1:12 htb \
   rate 11475kbit \
   prio 2

tc class add dev br0 parent 1:1 classid 1:20 htb \
   rate 13500kbit \
   prio 2

tc class add dev br0 parent 1:20 classid 1:21 htb \
   rate 11475 \
   prio 1

tc class add dev br0 parent 1:20 classid 1:22 htb \
   rate 2025kbit \
   prio 2


This is not a complete TC script because it doesn't have filters to classify traffic, nor does it have SFQ enabled on any leaf. Bascially you'd want to match high priority from the laptop and put it in 1:11, match everything else from the laptop and put it in 1:12, high priority traffic from elsewhere go to 1:21, and the rest go to 1:22.

Think you can come up with the right filter lines and add SFQ (if desired)? I'm too tired to think about those right now.


Last edited by erik.elmore on Tue Jun 21, 2005 12:18 pm, edited 3 times in total.

Top
   
 Post subject:
PostPosted: Tue Jun 21, 2005 4:26 am 
Offline
Senior Newbie

Joined: Thu Jun 16, 2005 7:14 am
Posts: 9
Thanks a lot! I will try this out as soon as I can, but that might take a while because I'm in the middle of my exams right now...


Top
   
 Post subject:
PostPosted: Tue Jun 21, 2005 5:33 am 
Offline
Senior Member

Joined: Sun Jul 20, 2003 8:29 am
Posts: 100
Website: http://www.ipo-australia.com
Location: Tropical Queensland, Australia
Does this work for incoming traffic too? (yes I know there are issues)
eg limit incoming ftp to X kb/sec.


Top
   
 Post subject:
PostPosted: Tue Jun 21, 2005 10:10 am 
Offline
Junior Member
User avatar

Joined: Sun Apr 17, 2005 10:34 am
Posts: 45
Quote:
Does this work for incoming traffic too? (yes I know there are issues)

Assuming that the filters match against source and destination IP of the laptop and considering this is a bridge interface, it may... but I've never tried to shape a bridge interface so I dunno for sure.

The best sources of information on TC is on LARTC and The HTB manual. It really isn't as complicated as it seems.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group