Examples for match by mark in u32 Author: Catalin(ux aka Dino) BOIE Link: http://kernel.umbrella.ro/ . Match mark 6 and dest 4.4.4.4 and redirect this to class 1:6: tc filter add dev eth0 protocol ip parent 1:0 prio 5 u32 \ match mark 0x0006 \ match ip dst 4.4.4.4 \ flowid 1:6 . Match only mark 0x0090 and send traffic to class 1:90: tcmark filter add dev eth0 protocol ip parent 1:0 prio 5 u32 \ match mark 0x0090 \ flowid 1:90 . Complete example of how to match mark 6 and a destination port bigger than 1023: #!/bin/sh # By Catalin(ux aka Dino) BOIE catab at umbrella.ro tc qdisc del dev dummy0 root tc qdisc add dev dummy0 root handle 1: htb default 20 # root class tc class add dev dummy0 parent 1: classid 1:1 \ htb rate 100Kbit ceil 100Kbit # clasa protocol 50 ( = 0x32) tc class add dev dummy0 parent 1:1 classid 1:50 \ htb rate 50Kbit ceil 50Kbit # clasa default tc class add dev dummy0 parent 1:1 classid 1:20 \ htb rate 50Kbit ceil 50Kbit # send a packet with mark 3 and tcp with dport >= 1024 to 1:50 tc filter add dev dummy0 \ protocol ip \ parent 1: prio 13 \ u32 \ match mark 0x0003 0xffff \ match ip dport 0x0400 0x0400 \ flowid 1:50