LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-09-2006, 03:48 AM   #1
Bart007
LQ Newbie
 
Registered: Aug 2006
Posts: 4

Rep: Reputation: 0
HTB Problem - bandwidth limit


this is my script :

Code:
tc qdisc add dev eth0 root handle 1: htb
tc class add dev eth0 parent 1: classid 1:1 htb
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 512kbit ceil 512kbit burst 5kbit


# Direct traffic to classes based on firewall MARK rules
tc filter add dev eth0 parent 1: protocol ip handle 10 fw classid 1:10

iptables -A OUTPUT -t mangle -d 192.168.1.0/24 -o eth0 -p tcp --sport http -j MARK --set-mark 10
Distrib : Fedora Core 5
The question : Why do i have an http rate of almost 150Ko/s instead of 64Ko/s !? (the rate is the same tested with another protocol in iptables)
 
Old 08-09-2006, 05:58 AM   #2
debloxie
Member
 
Registered: Jul 2003
Posts: 153

Rep: Reputation: 30
I cant c anything 64kbits in ur scripts
 
Old 08-09-2006, 06:27 AM   #3
Bart007
LQ Newbie
 
Registered: Aug 2006
Posts: 4

Original Poster
Rep: Reputation: 0
sure, there isn't 64Kbit
But I was speeking about 64Ko/s = 512kbit/s
 
Old 08-09-2006, 06:32 AM   #4
Bart007
LQ Newbie
 
Registered: Aug 2006
Posts: 4

Original Poster
Rep: Reputation: 0
sure, there isn't 64Kbit
But I was speeking about 64Ko/s = 512kbit/s

I tested the same script on 2 other servers (under Fedora Core 5 and Fedora Core 3) and it works fine !

I tried to reinitalise everything on the server where the problem appears by this commands

Code:
iptables -F
iptables -t mangle -F
tc qdisc del dev eth0 root 2> /dev/null > /dev/null
or
Code:
tc qdisc del dev eth0 root
and the problem stay the same.

see below the result of class show :
Code:
[root@FC5-Service-server ~]# tc -s -d class show dev eth0
class htb 1:1 root rate 512000bit ceil 512000bit burst 1856b/8 mpu 0b overhead 0b cburst 1856b/8 mpu 0b overhead 0b level 7
 Sent 1791380 bytes 479 pkt (dropped 0, overlimits 0 requeues 0)
 rate 149472bit 5pps backlog 0b 0p requeues 0
 lended: 4 borrowed: 0 giants: 426
 tokens: -21102 ctokens: -21102

class htb 1:10 parent 1:1 prio 0 quantum 6400 rate 512000bit ceil 512000bit burst 640b/8 mpu 0b overhead 0b cburst 1856b/8 mpu 0b overhead 0b level 0
 Sent 1791380 bytes 479 pkt (dropped 0, overlimits 0 requeues 0)
 rate 149472bit 5pps backlog 0b 0p requeues 0
 lended: 475 borrowed: 4 giants: 422
 tokens: -15083 ctokens: -21102
 
Old 08-15-2006, 08:17 AM   #5
Bart007
LQ Newbie
 
Registered: Aug 2006
Posts: 4

Original Poster
Rep: Reputation: 0
It is probably a problem with my kernel (few time ago, during my tests, it had an exception ).

I'll reinstall it when the new version of Fedora will appears
 
  


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
Vsftpd - how to limit download bandwidth but unlimited upload bandwidth? mpls mikeg Linux - Software 3 08-13-2005 02:52 PM
bandwidth management,htb, r2q?? quantum?? kartheekpn Linux - Networking 1 03-18-2005 01:32 PM
Limit Bandwidth andy7t Linux - Networking 6 11-30-2004 03:44 AM
HTB.init and "metropolitan" bandwidth shaping Ghitza Linux - Networking 0 11-23-2004 07:47 PM
HTB: how to shape the bandwidth the router may consume? meks Linux - Networking 1 04-30-2004 04:42 PM

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

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