LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-14-2011, 02:42 AM   #1
chuikingman
Member
 
Registered: Aug 2009
Posts: 91

Rep: Reputation: 16
TC command and IP tos in linux


Hi,
I use comand Tc to set the traffic control in linux box .

I use below command to set Qos , search TOS field equal to 0x2 and put it in first queue
other put in to third queue ..


tc qdisc add dev eth0 root handle 1: prio priomap 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2

tc qdisc add dev eth0 parent 1:1 handle 10: pfifo limit 999999
tc qdisc add dev eth0 parent 1:2 handle 20: pfifo limit 999999
tc qdisc add dev eth0 parent 1:3 handle 30: pfifo limit 999999


I also set filter to check Tos =0x2 and put it in to queue 1 ...

tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 \
match ip tos 0x2 0xff \
flowid 1:10


There is no error for commit the command

But when I generate the traffic with TOS=0x2 ,I use comamnd
tc -s qdisc ls dev eth0 to check the queue 1 (first, 10)traffic.

[root@localhost ~]# tc -s qdisc ls dev eth0
qdisc prio 1: bands 3 priomap 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Sent 6960760 bytes 15785 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc pfifo 10: parent 1:1 limit 999999p
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc pfifo 20: parent 1:2 limit 999999p
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc pfifo 30: parent 1:3 limit 999999p
Sent 6945311 bytes 15751 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
[root@localhost ~]#




I cannot see the send packet increase.
I only see the traffic in queue 3 (third ,30 ) increase.
Even I use http or sftp, only queue 3 traffice incrase.
So, it seem the tc cannot filter for the packet mark TOS=0x2 and putit into queue 1...

So, any advice how to fix it ....???
 
  


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
Linux HOW-TOs.. sramelyk Linux - Software 3 03-06-2004 11:36 AM
How to set TOS bits on LINUX ethernet interface markraem Linux - Networking 3 02-26-2004 08:11 AM
C++ How-tos matt3333 Slackware 5 02-03-2004 11:52 AM
Bring order to Linux How-tos oudent Linux - General 7 01-25-2004 06:49 PM
IP TOS in Linux MajorTux Linux - Networking 2 08-05-2002 06:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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