Solved

Bandwidth priority when to/from a certain host.

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why VNC doesn't work in Redhat? 11 61
i can not do linux commands in cygwin windows 10 6 75
Rate limit for DNS queries 7 74
installing docker on ubuntu 6 29
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.…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

770 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