Sponsored Content
Operating Systems Linux Red Hat Tc command and IP tos in linux Post 302581765 by chuikingman on Wednesday 14th of December 2011 03:41:07 AM
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 ....???
 

4 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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
PFIFO_FAST(8)							       Linux							     PFIFO_FAST(8)

NAME
pfifo_fast - three-band first in, first out queue DESCRIPTION
pfifo_fast is the default qdisc of each interface. Whenever an interface is created, the pfifo_fast qdisc is automatically used as a queue. If another qdisc is attached, it preempts the default pfifo_fast, which automatically returns to function when an existing qdisc is detached. In this sense this qdisc is magic, and unlike other qdiscs. ALGORITHM
The algorithm is very similar to that of the classful tc-prio(8) qdisc. pfifo_fast is like three tc-pfifo(8) queues side by side, where packets can be enqueued in any of the three bands based on their Type of Service bits or assigned priority. Not all three bands are dequeued simultaneously - as long as lower bands have traffic, higher bands are never dequeued. This can be used to prioritize interactive traffic or penalize 'lowest cost' traffic. Each band can be txqueuelen packets long, as configured with ifconfig(8) or ip(8). Additional packets coming in are not enqueued but are instead dropped. See tc-prio(8) for complete details on how TOS bits are translated into bands. PARAMETERS
txqueuelen The length of the three bands depends on the interface txqueuelen, as specified with ifconfig(8) or ip(8). BUGS
Does not maintain statistics and does not show up in tc qdisc ls. This is because it is the automatic default in the absence of a config- ured qdisc. SEE ALSO
tc(8) AUTHORS
Alexey N. Kuznetsov, <kuznet@ms2.inr.ac.ru> This manpage maintained by bert hubert <ahu@ds9a.nl> iproute2 10 January 2002 PFIFO_FAST(8)
All times are GMT -4. The time now is 04:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy