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

Ingress



Hi,
	I'm trying to police the input interface of a machine (machine3) with
the script attached below. My scenarie is a network with 3 machines:
machine1 is running an application of videoconferencing with machine 3
and machine2 is sending interferent traffic to machine3. All the
machines are in the same network.
	---------		---------		---------
	+machine1+		+machine2+		+machine3+
	+	 +		+	 +		+	 +
	---------		---------		---------
	    |			    |			    |
	---------------------------------------------------------- 
	
When I try to get the statistics, I didn't get any packet drop, sending
different rates...

	Can someone tell me what I'm doing wrong???

	Thanks in advance,
				Marival	


tc qdisc add dev eth0 handle ffff: ingress
tc filter add dev eth0 parent ffff: protocol ip prio 4 handle 1: u32
divisor 256
tc filter add dev eth0 parent ffff: protocol ip prio 5 handle 2: u32
divisor 256
tc filter add dev eth0 parent ffff: protocol ip prio 6 handle 3: u32
divisor 256
 
tc filter add dev eth0 parent ffff: protocol ip prio 4 u32 \
        match ip protocol 6 0xff \
        match ip sport 0x3038 0xffff \
        police index 1 rate 50Kbit burst 200B \
        continue
tc filter add dev eth0 parent ffff: protocol ip prio 5 u32 \
        match ip protocol 17 0xff \
        match ip sport 0x7d00 0xffff \
        police index 2 rate 256Kbit burst 2092B \
        continue
tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 \
        match ip protocol 6 0xff \
        match ip sport 0x3038 0xffff \
        police index 3 rate 2.5Mbit burst 20K \
        drop
tc filter add dev eth0 parent ffff: protocol ip prio 4 u32 \
        match ip protocol 17 0xff \
        match ip sport 0x7d03 0xffff \
        police index 4 rate 1536Kbit burst 100B \
        drop
tc filter add dev eth0 parent ffff: protocol ip prio 4 u32 \
        match ip protocol 17 0xff \
        match ip sport 0x7d01 0xffff \
        police index 5 rate 500Kbit burst 4500B \
        continue        
tc filter add dev eth0 parent ffff: protocol ip prio 5 u32 \
        match ip protocol 17 0xff \
        match ip sport 0x7d01 0xffff \
        police index 6 rate 500Kbit burst 7400B \
        continue
tc filter add dev eth0 parent ffff: protocol ip prio 4 u32 \
        match ip protocol 17 0xff \
        match ip sport 0x7d02 0xffff \
        police index 7 rate 500Kbit burst 2888B \
        continue
tc filter add dev eth0 parent ffff: protocol ip prio 4 u32 \
        match ip protocol 17 0xff \
        match ip sport 0x7d05 0xffff \
        police index 8 rate 500Kbit burst 10K \
        continue
tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 \
        match ip src 0/0 \
        police rate 100Kbit burst 125B drop 

-----------------------------------------------------------------------------
Marival Cruz Romero			Dep. Ing. Telemática
e-mail: marival@dit.upm.es		ETSI Telecomunicación
Tel: (+034) 91 336 73 66 +809		Ciudad Universitaria