LinuxQuestions.org
Review your favorite Linux distribution.
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 12-16-2009, 06:57 PM   #1
jackz
LQ Newbie
 
Registered: Dec 2009
Location: Edmonton, CA
Distribution: Ubuntu
Posts: 1

Rep: Reputation: 0
tcng and HTB problem


Hi there,

I have been trying out tcng and HTB on a loopback.

I wrote a tcng script like this:

#include "fields.tc"
#include "ports.tc"

#define ISCSI_IF lo

dev ISCSI_IF {
egress {
class (<$iperf_1>) if tcp_dport == 5001;


htb() {
class (rate 40 Mbps, ceil 40 Mbps) {
$iperf_1 = class (rate 40 Mbps, ceil 40 Mbps) {};

}
}
}
}

However, tcng generated the tc script like the following. Note that
the rate and ceil value is 5 Mbps instead of the 40 Mbps specified in
the tcng script. Anyone has any idea about that?

Another problem is that even if I modify the tc script manually
changing 5,000,000bps to 40,000,000bps, I still only get around
5,000,000bps from the test traffic, which is measured using Wireshark.
Is it a limit of HTB or I missed something?

Any help would be highly appreciated!

Thanks,
Jack

tc script generated:

# ================================= Device lo =================================

tc qdisc add dev lo handle 1:0 root dsmark indices 2 default_index 0
tc qdisc add dev lo handle 2:0 parent 1:0 htb
tc class add dev lo parent 2:0 classid 2:1 htb rate 5000000bps ceil 5000000bps
tc class add dev lo parent 2:1 classid 2:2 htb rate 5000000bps ceil 5000000bps
tc filter add dev lo parent 2:0 protocol all prio 1 tcindex mask 0x1 shift 0
tc filter add dev lo parent 2:0 protocol all prio 1 handle 1 tcindex classid 2:2
tc filter add dev lo parent 1:0 protocol all prio 1 handle 1:0:0 u32 divisor 1
tc filter add dev lo parent 1:0 protocol all prio 1 u32 match u8 0x6
0xff at 9 offset at 0 mask 0f00 shift 6 eat link 1:0:0
tc filter add dev lo parent 1:0 protocol all prio 1 handle 1:0:1 u32
ht 1:0:0 match u16 0x1389 0xffff at 2 classid 1:1

Last edited by jackz; 12-16-2009 at 07:18 PM. Reason: make it shorter to read
 
  


Reply

Tags
htb



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
TCNG installation ronban Linux - Networking 1 08-03-2007 02:58 AM
what has tcc (tcng) has become? eantoranz Linux - Networking 2 11-10-2005 01:05 AM
HTB as a child of another HTB - doesn't work ddaas Linux - Networking 5 07-25-2005 03:21 AM
HTB configuration problem laotalax Linux - Networking 3 04-21-2005 04:42 AM
problem configuring htb abhishekg Linux - Networking 2 04-02-2005 12:15 PM

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

All times are GMT -5. The time now is 12:12 PM.

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