Differences between version 12 and previous revision of TrafficControl.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 12 | Last edited on Thursday, March 5, 2009 4:14:31 pm | by PerryLorier | Revert |
Older page: | version 11 | Last edited on Thursday, March 5, 2009 4:00:39 pm | by PerryLorier | Revert |
@@ -85,8 +85,18 @@
the cmp extended basic match appears to be the recommended way to match on layer 2 fields ([ref|http://lists.openwall.net/netdev/2007/08/15/63])
!cmp ematch
This ematch module lets you match on various 8,16 or 32 bit quantities relative to layer 2, layer 3 or transport headers.
+
+An example (that we didn't have time to get to work properly, but it shows a valid syntax), this should match IP packets inside PPPoE sourced from 192.0.2.0/24.:
+<verbatim>
+$TC filter add dev $DEV \
+ parent 1: prio 10 \
+ protocol all \
+ basic match "cmp(u16 at 12 layer 2 eq 0x8864) and cmp(u32 at 34 layer 2 mask 0xFFFFFF00 eq 0xC0000200)" \
+ flowid 1:10
+</verbatim>
+
!meta ematch
This ematch module lets you match on various attributes of the system (such as load average), or metadata about the packet (such as the firewall mark).
<tt>tc filter add dev lo basic match meta(list)</tt> lists all the possible attributes.
!nbyte ematch