Flow filter in tc(8) Linux Flow filter in tc(8) (NAME) tc-flow - (flow) (SYNOPSIS) (Mapping mode): tc filter ... flow map key KEY [ OPS ] [ OPTIONS ] (Hashing mode): tc filter ... flow hash keys KEY_LIST [ perturb secs ] [ OPTIONS ] OPS := [ OPS ] OP OPTIONS := [ divisor NUM ] [ baseclass ID ] [ match EMATCH_TREE ] [ action ACTION_SPEC ] KEY_LIST := [ KEY_LIST ] KEY OP := { or | and | xor | rshift | addend } NUM ID := X:Y KEY := { src | dst | proto | proto-src | proto-dst | iif | priority | mark | nfct | nfct-src | nfct-dst | nfct-proto-src | nfct-proto-dst | rt-classid | sk-uid | sk-gid | vlan-tag | rxhash } (DESCRIPTION) flow (hashing) SFQ . . (OPTIONS) action ACTION_SPEC (action) . baseclass ID ( ) (class ID) . ID root none () [X:]Y . X qdisc ( ). baseclass Y 1 . divisor NUM () . (modulo) NUM . hash keys KEY-LIST jhash2 KEY-LIST. ( divisor ) baseclass . perturb ( ) jhash2 . map key KEY KEY . OPS . : and NUM AND NUM. or NUM OR NUM. xor NUM XOR NUM. rshift NUM KEY NUM . addend NUM NUM KEY. or and xor rshift NUM . addend NUM ('-') src dst nfct-src nfct-dst IP . . match EMATCH_TREE (extended match). EMATCH_TREE tc-ematch(8) . (KEYS) (mapping mode) ( ) . . (hashing mode) . perturb . divisor (modulo) . src dst . IPv4 TIPC . IPv6 XOR (fold) . ( ) . proto . proto-src () . . proto-dst () . dst_entry XOR . iif . priority . DSCP/ECN IP . mark fwmark netfilter . nfct (conntrack) . nfct-src nfct-dst nfct-proto-src nfct-proto-dst (conntrack-aware) src dst proto-src proto-dst . NAT NAT . rt-classid (realm) . sk-uid sk-gid (UID) (GID) . vlan-tag VLAN . rxhash (flow hash) . (EXAMPLES) SFQ: tc filter add ... flow hash keys src,dst,proto,proto-src,proto-dst divisor 1024 SFQ (conntrack) NAT: tc filter add ... flow hash keys nfct-src,nfct-dst,proto,nfct-proto-src,nfct-proto-dst divisor 1024 IP 192.168.0.0/24 1 256: tc filter add ... flow map key dst addend -192.168.0.0 divisor 256 : tc filter add ... flow map key dst and 0xff : tc filter add ... flow map key dst and 0xff xor 0xff (SEE ALSO) tc(8), tc-ematch(8), tc-sfq(8) iproute2 20 Oct 2015 Flow filter in tc(8)