Hi all, Supposedly my router is itself streaming traffic to clients. Is it possible for it to mark its packets before going through dsmark?? I have gone through the examples in iproute2/examples, i noticed that there''s always an ingress and egress of which these are 2 different dev. Is it possible for before ingress and egress be the same dev?? I tried the script below but doesn''t seem to work... How to control the bandwidth in this case?? I want to show that AF11, AF21, AF31, AF41, EF, BE traffic has different throughput if 6 fullstreams of traffic is push out from server to client (with 6 different ports). eg: #! /bin/sh -x # device="eth1" client0="192.168.1.1/32" client2="192.168.1.20/32" /sbin/ipchains -A output -i $device -p tcp -s $client0 -d $client2 --sport 42010 -m 1 /sbin/ipchains -A output -i $device -p tcp -s $client0 -d $client2 --sport 42012 -m 2 /sbin/ipchains -A output -i $device -p tcp -s $client0 -d $client2 --sport 42014 -m 3 ######################## Egress side ######################## # attach a dsmarker # tc qdisc del dev $device handle 1:0 root dsmark indices 64 set_tc_index tc qdisc add dev $device handle 1:0 root dsmark indices 64 set_tc_index # values of the DSCP to change depending on the class #becomes EF tc class change dev $device classid 1:1 dsmark mask 0x3 \ value 0xb8 #becomes AF11 tc class change dev $device classid 1:2 dsmark mask 0x3 \ value 0x28 #becomes AF21 tc class change dev $device classid 1:3 dsmark mask 0x3 \ value 0x48 tc filter add dev $device parent 1:0 protocol ip prio 4 handle 1 fw classid 1:1 tc filter add dev $device parent 1:0 protocol ip prio 4 handle 2 fw classid 1:2 tc filter add dev $device parent 1:0 protocol ip prio 4 handle 3 fw classid 1:3