1Match-all classifier in tc(8) Linux Match-all classifier in tc(8)
2
3
4
6 matchall - traffic control filter that matches every packet
7
9 tc filter ... matchall [ skip_sw | skip_hw ] [ action ACTION_SPEC ] [
10 classid CLASSID ]
11
13 The matchall filter allows to classify every packet that flows on the
14 port and run a action on it.
15
17 action ACTION_SPEC
18 Apply an action from the generic actions framework on matching
19 packets.
20
21 classid CLASSID
22 Push matching packets into the class identified by CLASSID.
23
24 skip_sw
25 Do not process filter by software. If hardware has no offload
26 support for this filter, or TC offload is not enabled for the
27 interface, operation will fail.
28
29 skip_hw
30 Do not process filter by hardware.
31
33 To create ingress mirroring from port eth1 to port eth2:
34
35 tc qdisc add dev eth1 handle ffff: ingress
36 tc filter add dev eth1 parent ffff: \
37 matchall skip_sw \
38 action mirred egress mirror \
39 dev eth2
40
41 The first command creats an ingress qdisc with handle ffff: on device
42 eth1 where the second command attaches a matchall filters on it that
43 mirrors the packets to device eth2.
44
45 To create egress mirroring from port eth1 to port eth2:
46
47 tc qdisc add dev eth1 handle 1: root prio
48 tc filter add dev eth1 parent 1: \
49 matchall skip_sw \
50 action mirred egress mirror \
51 dev eth2
52
53 The first command creats an egress qdisc with handle 1: that replaces
54 the root qdisc on device eth1 where the second command attaches a
55 matchall filters on it that mirrors the packets to device eth2.
56
57 To sample one of every 100 packets flowing into interface eth0 to psam‐
58 ple group 12:
59
60 tc qdisc add dev eth0 handle ffff: ingress
61 tc filter add dev eth0 parent ffff: matchall \
62 action sample rate 100 group 12
63
64
66 tc(8),
67
68
69
70iproute2 21 Oct 2015 Match-all classifier in tc(8)