Below there's a modified piece of script found from:
http://www.ittc.ukans.edu/~rsarav/howto/node17.html
I use it to create two filters for sending traffic to best effort and
realtime class. But now I would like to remove for example the rule
that classifies packets with destination of 10.128.1.1 and destination
port of 0x16 without removing the other rule. I tried using 'tc filter
del dev eth0 handle X:Y:Z...', but couldn't figure out what is the
correct syntax for removing filter and/or how can I get the correct
filterid X:Y:Z for the del command.
Here's part of the script that makes those filters and rules.
# Installing a u32 classifier for the traffic
tc filter add dev eth0 parent 1:0 prio 3 protocol ip u32
# Creating hash tables for classification of the packets
tc filter add dev eth0 parent 1:0 prio 3 handle 1: u32 divisor 256
tc filter add dev eth0 parent 1:0 prio 3 handle 2: u32 divisor 256
# Configuring the 6th slot of the hash table 1 to select packets with
# destination set to 10.128.1.1 and the port set to 6010 (0x177a) and direct
# these to class 2:2 (which was just set up).
tc filter add dev eth0 parent 1:0 prio 3 u32 ht 1:6: match ip dst \
10.128.1.1 match tcp dst 0x16 0xffff flowid 1:2
# Configuring the 6th slot of the hash table 2 to select packets with
# destination set to 10.128.1.1 and the port set to 6011 (0x177b) and direct
# these to class 2:3 (which was just set up).
tc filter add dev eth0 parent 1:0 prio 3 u32 ht 2:6: match ip dst \
10.128.1.1 match tcp dst 0x14 0xffff flowid 1:3
# Lookup hash table and it it is not fragmented, use the protocol as the hash
# key.
tc filter add dev eth0 parent 1:0 prio 3 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 1:
tc filter add dev eth0 parent 1:0 prio 3 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 2:
-- Karri Huhtanen khuhtanen@iki.fi- To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.rutgers.edu
This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:12 EST