Solved

Bandwidth priority when to/from a certain host.

Posted on 2007-03-28
3
313 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

707 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

11 Experts available now in Live!

Get 1:1 Help Now