Solved

Bandwidth priority when to/from a certain host.

Posted on 2007-03-28
3
314 Views
Last Modified: 2013-12-16
I think my problem is relatively simple. I tried using different scripts I found on the net for this but I couldn't get anything to work. The best I got was limiting the entire interface traffic (no good).

My external device: eth0
Internal device: eth1

Instead of limiting traffic, I want to reserve it. I can't use cbq, or any of the fancy modules like layer 7, or CONNMARK. I need to do this using basically only "iptables" for marking packets and "tc" for shaping.

I want to make sure ANY kind of traffic for a certain external host (say, 201.202.203.204) has priority over other traffic. ANY and ALL traffic on ANY ports and protocols to OR from the 201.202.203.204 should be allowed ALL the bandwidth it needs. That's it. I think I just need 2 classes right? One for the High priority IP 201.202.203.204, and one for the remaining Internet traffic. I wanna keep it simple.
0
Comment
Question by:tjbraza
3 Comments
 
LVL 1

Accepted Solution

by:
crovaxy earned 500 total points
ID: 18822329
You can use HTB or HFSC to create the two classes. HTB is quite simple to configure:
Create a root class where 'rate' is your link BW, then create two subclasses: One for that IP where 'rate' should be the amount of BW you want to grant and 'ceil' should be the max bandwith permitted by the root class. The second subclass should be the default class, where 'rate' should be the rest of BW and 'ceil' the max BW permitted by the root class.

The qdiscs can be sfq for the first subclass and esfq for the default class.

Mark the packets of the connections from 201.202.203.204 and filter them with tc filters. You can also use the iptables CLASSIFY, if you don't want to use tc filters.

If you want to shape inbound traffic, take a look at IMQ devices.

A useful link: www.lartc.org
0

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now