Tc command and IP tos in linux

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Tc command and IP tos in linux
# 1  
Old 12-14-2011
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 ....???
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Linux find command seems to not transmit all the result to the '-exec command'

Hello. From a script, a command for a test is use : find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc' Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies

2. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies

3. Shell Programming and Scripting

Linux Command Error for nawk command

Hi All We are migrating our projects from unix environment to linux. I tried running a install script which sets up my project, i.e. the directory structure and all. But in the middle of the script i started receiveing following error : nawk: command not found . So i need to know which... (1 Reply)
Discussion started by: vee_789
1 Replies

4. IP Networking

How to capturing packet data so i can see the Version, IHL, TOS, etc?

Helo Folks :) i had read an answer in this thread unixcom/programming/117551-calculate-ip-header-checksum-manually.html i need to know what the software name that was used to capturing packet data in a network, just like the packet's capture output that showed up in the thread. Thank you :)... (5 Replies)
Discussion started by: polutan
5 Replies
Login or Register to Ask a Question