LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-07-2014, 10:14 PM   #1
Chris E
Member
 
Registered: Jun 2008
Location: Berkshire, UK.
Distribution: CentOS
Posts: 31

Rep: Reputation: 2
Traffic shaping with TC per interface


Hi All

I'm trying to get TC working to limit inbound and outbound traffic on interfaces. Inbound works perfectly, but outbound seems to run at full speed regardless of the settings I use.

Example:
tc qdisc add dev <interface> root handle 1: htb default 10
tc class add dev <interface> parent 1: classid 1:10 htb rate 10mbit

The above works perfectly to limit inbound traffic to 10mbit, but outbound still runs on full. All the documentation out there seems to be based on IP or port, we need it per interface

If anyone can point me in the right direction it would be really appreciated

Thanks!
 
Old 03-09-2014, 08:03 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603Reputation: 3603
Quote:
Originally Posted by Chris E View Post
The above works perfectly to limit inbound
Actually, unless you control both end points, due to how TCP/IP works, it doesn't. Basically if you're the server side then you can influence the remote end point transmission rate by slowing down your responses but you can't force them. At least that's how I understand it, consult the LARTC if unsure.


Quote:
Originally Posted by Chris E View Post
All the documentation out there seems to be based on IP or port, we need it per interface
No, you can actually do something like '/sbin/iptables -t mangle -A POSTROUTING -m mark --mark 0x0 -j MARK --set-mark [whatevermark];'
 
Old 03-09-2014, 05:45 PM   #3
MikeDeltaBrown
Member
 
Registered: Apr 2013
Location: Arlington, WA
Distribution: Slackware
Posts: 96

Rep: Reputation: 10
My favorite book:
http://www.packtpub.com/linux-firewalls/book
 
  


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
Traffic Shaping VoiP using TC (Traffic Control) is this working? Nemus Linux - Networking 0 05-16-2011 02:45 PM
Problem with Traffic Shaping and HTTP Traffic. redvivi Linux - Networking 1 11-29-2008 01:23 PM
Traffic shaping (limiting outgoing bandwidth of all TCP-traffic except FTP/HTTP) ffkodd Linux - Networking 3 10-25-2008 01:09 AM
Traffic shaping works only on one interface ivanatora Linux - Networking 1 05-19-2005 02:25 AM

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

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