[LARTC] Ingress Filter Problem using TOS

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

I am attempting to police the incoming rate by using the ingress filter
based on the TOS of the incoming packet.

I used the following commands:

tc qdisc add dev eth0 handle ffff: ingress

tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip tos 0x10
0xff police rate 24kbit burst 1k drop flowid :1

On downloading a 6 Mb file which was TCP and TOS 0x10, this filter made on
difference to the download rate. (I used tcpdump to check that the packets
were in fact TOS 0x10)

by substituting the TOS filter with a TCP filter, like so:

tc filter add dev eth0 parent ffff: protocol ip prio 2 u32 match ip protocol
6 0xff police rate 36kbit burst 1k drop flowid :1

and then running the same download, this filter worked and restricted the
rate of download.

Why didn't the TOS filter work??

As the TCP filter is far too broad, I will eventually intend on combining
the two filters to be more specific, as so:

tc filter add dev eth0 parent ffff: protocol ip prio 2 u32 match ip protocol
6 0xff match ip tos 0x10 0xff police rate 36kbit burst 1k drop flowid :1

It would be great if someone could point out my error....

Regards

Rod Blennerhassett

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux