LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-21-2015, 01:03 PM   #1
shortonbandwidth
LQ Newbie
 
Registered: Mar 2015
Posts: 2

Rep: Reputation: Disabled
Smile Looking for help using tc HTB to manage limited bandwidth shared connection.


Hi all,

I am using tc with HTB to manage a limited bandwidth connection (2255kbps) with high latency (600ms~700ms).

I would like to split the bandwidth into two segments, one is 256kbps and the other is 1999kbps.

My current tc script looks like this:

Code:
tc qdisc add dev eth1 root handle 1: htb default 20
tc class add dev eth1 parent 1: classid 1:1 htb rate 2255kbps
tc class add dev eth1 parent 1:2 classid 1:10 htb rate 256kbit ceil 256kbit prio 1 mtu 1500
tc class add dev eth1 parent 1:2 classid 1:20 htb rate 1999bit ceil 2255kbit prio 0 mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 1 handle 80 fw flowid 1:10
I may be missing something but as I currently understand it the script above would create the two classes one 256kbps and the other 1999kbps with a ceiling of 2255kbps. I use iptables to tag the traffic I am interested in putting in the 256kbps bucket otherwise the default is the 1999kbps 1:20 htb class.

My problem is that when I apply this, my bandwidth is a mess it exceeds 2255kpbs and goes as high as 3000kbps. Where am I screwing this up? Any assistance would be greatly appreciated.
 
Old 03-21-2015, 03:45 PM   #2
shortonbandwidth
LQ Newbie
 
Registered: Mar 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
I figured out part of my problem... typos...kbit not kbps and 1999kbit

Code:
tc qdisc add dev eth1 root handle 1: htb default 20
tc class add dev eth1 parent 1: classid 1:1 htb rate 2255kbit
tc class add dev eth1 parent 1:2 classid 1:10 htb rate 256kbit ceil 256kbit prio 1 mtu 1500
tc class add dev eth1 parent 1:2 classid 1:20 htb rate 1999kbit ceil 2255kbit prio 0 mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 1 handle 80 fw flowid 1:10
I am now getting the throughput I expect but I still feel like I am missing something.
 
  


Reply



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
Universal TC-HTB configurations for varying undeline bandwidth shivakumar.a Linux - Networking 0 10-21-2011 04:35 AM
limit bandwidth rate for scp using tc htb Linux abhelp Linux - Networking 9 08-20-2010 09:45 AM
HTB Problem - bandwidth limit Bart007 Linux - Networking 4 08-15-2006 07:17 AM
bandwidth management,htb, r2q?? quantum?? kartheekpn Linux - Networking 1 03-18-2005 12:32 PM
HTB: how to shape the bandwidth the router may consume? meks Linux - Networking 1 04-30-2004 03:42 PM

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

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