Blame man/man8/tc-matchall.8

Packit Service 3880ab
.TH "Match-all classifier in tc" 8 "21 Oct 2015" "iproute2" "Linux"
Packit Service 3880ab
Packit Service 3880ab
.SH NAME
Packit Service 3880ab
matchall \- traffic control filter that matches every packet
Packit Service 3880ab
.SH SYNOPSIS
Packit Service 3880ab
.in +8
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR tc " " filter " ... " matchall " [ "
Packit Service 3880ab
.BR skip_sw " | " skip_hw
Packit Service 3880ab
.RI " ] [ "
Packit Service 3880ab
.B action
Packit Service 3880ab
.IR ACTION_SPEC " ] [ "
Packit Service 3880ab
.B classid
Packit Service 3880ab
.IR CLASSID " ]"
Packit Service 3880ab
.SH DESCRIPTION
Packit Service 3880ab
The
Packit Service 3880ab
.B matchall
Packit Service 3880ab
filter allows to classify every packet that flows on the port and run a
Packit Service 3880ab
action on it.
Packit Service 3880ab
.SH OPTIONS
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI action " ACTION_SPEC"
Packit Service 3880ab
Apply an action from the generic actions framework on matching packets.
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI classid " CLASSID"
Packit Service 3880ab
Push matching packets into the class identified by
Packit Service 3880ab
.IR CLASSID .
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI skip_sw
Packit Service 3880ab
Do not process filter by software. If hardware has no offload support for this
Packit Service 3880ab
filter, or TC offload is not enabled for the interface, operation will fail.
Packit Service 3880ab
.TP
Packit Service 3880ab
.BI skip_hw
Packit Service 3880ab
Do not process filter by hardware.
Packit Service 3880ab
.SH EXAMPLES
Packit Service 3880ab
To create ingress mirroring from port eth1 to port eth2:
Packit Service 3880ab
.RS
Packit Service 3880ab
.EX
Packit Service 3880ab
Packit Service 3880ab
tc qdisc  add dev eth1 handle ffff: ingress
Packit Service 3880ab
tc filter add dev eth1 parent ffff:           \\
Packit Service 3880ab
        matchall skip_sw                      \\
Packit Service 3880ab
        action mirred egress mirror           \\
Packit Service 3880ab
        dev eth2
Packit Service 3880ab
.EE
Packit Service 3880ab
.RE
Packit Service 3880ab
Packit Service 3880ab
The first command creats an ingress qdisc with handle
Packit Service 3880ab
.BR ffff:
Packit Service 3880ab
on device
Packit Service 3880ab
.BR eth1
Packit Service 3880ab
where the second command attaches a matchall filters on it that mirrors the
Packit Service 3880ab
packets to device eth2.
Packit Service 3880ab
Packit Service 3880ab
To create egress mirroring from port eth1 to port eth2:
Packit Service 3880ab
.RS
Packit Service 3880ab
.EX
Packit Service 3880ab
Packit Service 3880ab
tc qdisc add dev eth1 handle 1: root prio
Packit Service 3880ab
tc filter add dev eth1 parent 1:               \\
Packit Service 3880ab
        matchall skip_sw                       \\
Packit Service 3880ab
        action mirred egress mirror            \\
Packit Service 3880ab
        dev eth2
Packit Service 3880ab
.EE
Packit Service 3880ab
.RE
Packit Service 3880ab
Packit Service 3880ab
The first command creats an egress qdisc with handle
Packit Service 3880ab
.BR 1:
Packit Service 3880ab
that replaces the root qdisc on device
Packit Service 3880ab
.BR eth1
Packit Service 3880ab
where the second command attaches a matchall filters on it that mirrors the
Packit Service 3880ab
packets to device eth2.
Packit Service 3880ab
Packit Service 3880ab
To sample one of every 100 packets flowing into interface eth0 to psample group
Packit Service 3880ab
12:
Packit Service 3880ab
.RS
Packit Service 3880ab
.EX
Packit Service 3880ab
Packit Service 3880ab
tc qdisc add dev eth0 handle ffff: ingress
Packit Service 3880ab
tc filter add dev eth0 parent ffff: matchall \\
Packit Service 3880ab
     action sample rate 100 group 12
Packit Service 3880ab
.EE
Packit Service 3880ab
.RE
Packit Service 3880ab
Packit Service 3880ab
.EE
Packit Service 3880ab
.SH SEE ALSO
Packit Service 3880ab
.BR tc (8),