Networking Forums

Networking Forums > Computer Networking > Linux Networking > Problem in using TC Traffic Control

Reply
Thread Tools Display Modes

Problem in using TC Traffic Control

 
 
Asif
Guest
Posts: n/a

 
      11-05-2008, 12:01 PM
Hi
I am new to “tc” Traffic Control but not new to Linux. I am using
Fedora 9 with 2.6.23 kernel with new iproute2 package and preinstalled
“tc” in the fedora. I am using the following rules for the “tc”.


I am using the Linux Box as a router which is forwarding packets
already mark with required parameters such as ToS marking, so I think
I shouldn’t have to use the iptables mangling features.

The linux is accepting the kernel but the problem is that when I do
“tc filter show” or “tc class show” it is not showing any thing.

The packets I am forwarding is not affected by these rules.

I am using HTB, is there any issue in using this.


tc qdisc add dev eth1 root handle 1: htb default 20

tc class add dev eth1 parent 1: classid 1:1 htb rate 100mbit ceil
100mbit

tc class add dev eth1 parent 1:1 classid 1:10 htb rate 1mbit ceil
100mbit tc class add dev eth1 parent 1:1 classid 1:20 htb rate 99mbit
ceil 100mbit

tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip tos
46 0xff flowid 1:10

Can any one guide me what I am doing wrong

Regards
Karim Asif
 
Reply With Quote
 
 
 
 
Andy Furniss
Guest
Posts: n/a

 
      11-05-2008, 01:20 PM
Asif wrote:

> The linux is accepting the kernel but the problem is that when I do
> “tc filter show” or “tc class show” it is not showing any thing.


Hmm I would have thought tc would have thrown an error if you used
those, but it doesn't.

Your rules work for me, to see them -

tc -s filter ls dev eth1
tc -s class ls dev eth1

> tc qdisc add dev eth1 root handle 1: htb default 20


Won't matter in this case, but arp will go to default.

>
> tc class add dev eth1 parent 1: classid 1:1 htb rate 100mbit ceil
> 100mbit


You need to back off from 100mbit if it's a 100mbit nic, try 95 to allow
for overheads.

If it's a gig nic you may get issues with tso (tcp segmentation offload)
causing super size packets. You can turn it off with ethtool -k.

> tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip tos
> 46 0xff flowid 1:10


I've never used tos to mark, but if it doesn't work remember to check
for decimal vs hex problems.
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Should traffic control root qdisc & child class limit traffic? Washington Ratso Linux Networking 1 02-25-2011 06:48 PM
Problem in traffic control with HTB + PRIO banyeer Linux Networking 11 11-12-2008 08:45 AM
Problem in using TC Traffic Control Asif Linux Networking 0 11-05-2008 11:16 AM
traffic control in linux Shashank Khanvilkar Linux Networking 1 06-16-2005 11:39 PM
traffic control =?ISO-8859-1?Q?Hern=E1n_Freschi?= Linux Networking 8 04-27-2005 06:36 PM



1 2 3 4 5 6 7 8 9 10 11