OpenWrt Forum Archive

Topic: tc script not work~~

The content of this topic has been archived on 14 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I want to mark tos byte of all the ICMP packet ot 0x8, all the TCP packet to 0xe0... my scripts are below. It doesn' work properly,only ICMP packet can be marked.....  I don't know what's wrong with it, please help me

----------------------------------------------------------------------------------------------------------------------------------
tc qdisc add dev br0 handle 1: root dsmark indices 64

tc class change dev br0 classid 1:10 dsmark mask 0x0 value 0xe0
tc class change dev br0 classid 1:20 dsmark mask 0x0 value 0x8

tc filter add dev br0 protocol ip parent 1: prio 1 u32 match ip protocol 6 0xff flowid 1:10
tc filter add dev br0 protocol ip parent 1: prio 2 u32 match ip protocol 1 0xff flowid 1:20

You could try marking packets by using iptables (/sbin/iptables -A POSTROUTING -t mangle -o br0 -p icmp -j TOS --set-tos 0x08).

(Last edited by Adze15021979 on 11 Aug 2005, 13:17)

The discussion might have continued from here.