tc command and TOS in linux

December 14, 2011 at 00:33:15
Specs: 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 ....???


See More: tc command and TOS in linux

Report •

#1
December 16, 2011 at 18:53:06
#lartc on irc.oftc.net

I can't answer you question but I found an IRC channel that might help.

How do you know when a politician is lying? His mouth is moving.


Report •
Related Solutions


Ask Question