| 1 |
.TH "Match-all classifier in tc" 8 "21 Oct 2015" "iproute2" "Linux" |
| 2 |
|
| 3 |
.SH NAME |
| 4 |
matchall \- traffic control filter that matches every packet |
| 5 |
.SH SYNOPSIS |
| 6 |
.in +8 |
| 7 |
.ti -8 |
| 8 |
.BR tc " " filter " ... " matchall " [ " |
| 9 |
.BR skip_sw " | " skip_hw |
| 10 |
.RI " ] [ " |
| 11 |
.B action |
| 12 |
.IR ACTION_SPEC " ] [ " |
| 13 |
.B classid |
| 14 |
.IR CLASSID " ]" |
| 15 |
.SH DESCRIPTION |
| 16 |
The |
| 17 |
.B matchall |
| 18 |
filter allows one to classify every packet that flows on the port and run a |
| 19 |
action on it. |
| 20 |
.SH OPTIONS |
| 21 |
.TP |
| 22 |
.BI action " ACTION_SPEC" |
| 23 |
Apply an action from the generic actions framework on matching packets. |
| 24 |
.TP |
| 25 |
.BI classid " CLASSID" |
| 26 |
Push matching packets into the class identified by |
| 27 |
.IR CLASSID . |
| 28 |
.TP |
| 29 |
.BI skip_sw |
| 30 |
Do not process filter by software. If hardware has no offload support for this |
| 31 |
filter, or TC offload is not enabled for the interface, operation will fail. |
| 32 |
.TP |
| 33 |
.BI skip_hw |
| 34 |
Do not process filter by hardware. |
| 35 |
.SH EXAMPLES |
| 36 |
To create ingress mirroring from port eth1 to port eth2: |
| 37 |
.RS |
| 38 |
.EX |
| 39 |
|
| 40 |
tc qdisc add dev eth1 handle ffff: clsact |
| 41 |
tc filter add dev eth1 ingress \\ |
| 42 |
matchall skip_sw \\ |
| 43 |
action mirred egress mirror \\ |
| 44 |
dev eth2 |
| 45 |
.EE |
| 46 |
.RE |
| 47 |
|
| 48 |
The first command creates a clsact qdisc with handle |
| 49 |
.BR ffff: |
| 50 |
on device |
| 51 |
.BR eth1 |
| 52 |
where the second command attaches a matchall filters on it that mirrors the |
| 53 |
packets to device eth2 for ingress. |
| 54 |
|
| 55 |
To create egress mirroring from port eth1 to port eth2: |
| 56 |
.RS |
| 57 |
.EX |
| 58 |
|
| 59 |
tc qdisc add dev eth1 handle ffff: clsact |
| 60 |
tc filter add dev eth1 egress \\ |
| 61 |
matchall skip_sw \\ |
| 62 |
action mirred egress mirror \\ |
| 63 |
dev eth2 |
| 64 |
.EE |
| 65 |
.RE |
| 66 |
|
| 67 |
The first command creates a clsact qdisc with handle |
| 68 |
.BR ffff: |
| 69 |
on device |
| 70 |
.BR eth1 |
| 71 |
where the second command attaches a matchall filters on it that mirrors the |
| 72 |
packets to device eth2 for egress. |
| 73 |
|
| 74 |
To sample one of every 100 packets flowing into interface eth0 to psample group |
| 75 |
12: |
| 76 |
.RS |
| 77 |
.EX |
| 78 |
|
| 79 |
tc qdisc add dev eth0 handle ffff: ingress |
| 80 |
tc filter add dev eth0 parent ffff: matchall \\ |
| 81 |
action sample rate 100 group 12 |
| 82 |
.EE |
| 83 |
.RE |
| 84 |
|
| 85 |
.EE |
| 86 |
.SH SEE ALSO |
| 87 |
.BR tc (8), |