Apply an action from the generic actions framework on matching
An offset for the resulting class ID. ID may be root, none or
a hexadecimal class ID in the form [X:]Y. X must match
qdisc's/class's major handle (if omitted, the correct value is
chosen automatically). If the whole baseclass is omitted, Y
defaults to 1.
Number of buckets to use for sorting into. Keys are calculated
hash keys KEY-LIST
Perform a jhash2 operation over the keys in KEY-LIST, the
result (modulo the divisor if given) is taken as class ID,
optionally offset by the value of baseclass. It is possible
to specify an interval (in seconds) after which jhash2's
entropy source is recreated using the perturb parameter.
map key KEY
Packet data identified by KEY is translated into class IDs to
push the packet into. The value may be mangled by OPS before
using it for the mapping. They are applied in the order listed
Perform bitwise AND operation with numeric value NUM.
Perform bitwise OR operation with numeric value NUM.
Perform bitwise XOR operation with numeric value NUM.
Shift the value of KEY to the right by NUM bits.
Add NUM to the value of KEY.
For the or, and, xor and rshift operations, NUM is assumed to
be an unsigned, 32bit integer value. For the addend operation,
NUM may be much more complex: It may be prefixed by a minus
('-') sign to cause subtraction instead of addition and for
keys of src, dst, nfct-src and nfct-dst it may be given in IP
address notation. See below for an illustrating example.
Match packets using the extended match infrastructure. See
tc-ematch(8) for a detailed description of the allowed syntax
In mapping mode, a single key is used (after optional permutation) to
build a class ID. The resulting ID is deducible in most cases. In
hashing more, a number of keys may be specified which are then hashed
and the output used as class ID. This ID is not deducible in
beforehand, and may even change over time for a given flow if a
perturb interval has been given.
The range of class IDs can be limited by the divisor option, which is
used for a modulus.
Use source or destination address as key. In case of IPv4 and
TIPC, this is the actual address value. For IPv6, the 128bit
address is folded into a 32bit value by XOR'ing the four 32bit
words. In all other cases, the kernel-internal socket address
is used (after folding into 32bits on 64bit systems).
proto Use the layer four protocol number as key.
Use the layer four source port as key. If not available, the
kernel-internal socket address is used instead.
Use the layer four destination port as key. If not available,
the associated kernel-internal dst_entry address is used after
XOR'ing with the packet's layer three protocol number.
iif Use the incoming interface index as key.
Use the packet's priority as key. Usually this is the IP
header's DSCP/ECN value.
mark Use the netfilter fwmark as key.
nfct Use the associated conntrack entry address as key.
nfct-src, nfct-dst, nfct-proto-src, nfct-proto-dst
These are conntrack-aware variants of src, dst, proto-src and
proto-dst. In case of NAT, these are basically the packet
header's values before NAT was applied.
Use the packet's destination routing table entry's realm as
sk-uidsk-gid For locally generated packets, use the user or group ID the
originating socket belongs to as key.
Use the packet's vlan ID as key.
rxhash Use the flow hash as key.
This page is part of the iproute2 (utilities for controlling TCP/IP
networking and traffic) project. Information about the project can
be found at
If you have a bug report for this manual page, send it to
email@example.com, firstname.lastname@example.org. This page was obtained
from the project's upstream Git repository
on 2017-03-13. If you discover any rendering problems in this HTML
version of the page, or you believe there is a better or more up-to-
date source for the page, or you have corrections or improvements to
the information in this COLOPHON (which is not part of the original
manual page), send a mail to email@example.com
iproute2 20 Oct 2015 Flow filter in tc(8)