Blame man/man8/tc-route.8

Packit d3f73b
.TH "Route classifier in tc" 8 "21 Oct 2015" "iproute2" "Linux"
Packit d3f73b
Packit d3f73b
.SH NAME
Packit d3f73b
route \- route traffic control filter
Packit d3f73b
.SH SYNOPSIS
Packit d3f73b
.in +8
Packit d3f73b
.ti -8
Packit d3f73b
.BR tc " " filter " ... " route " [ " from
Packit d3f73b
.IR REALM " | "
Packit d3f73b
.B fromif
Packit d3f73b
.IR TAG " ] [ "
Packit d3f73b
.B to
Packit d3f73b
.IR REALM " ] [ "
Packit d3f73b
.B classid
Packit d3f73b
.IR CLASSID " ] [ "
Packit d3f73b
.B action
Packit d3f73b
.IR ACTION_SPEC " ]"
Packit d3f73b
.SH DESCRIPTION
Packit d3f73b
Match packets based on routing table entries. This filter centers around the
Packit d3f73b
possibility to assign a
Packit d3f73b
.B realm
Packit d3f73b
to routing table entries. For any packet to be classified by this filter, a
Packit d3f73b
routing table lookup is performed and the returned
Packit d3f73b
.B realm
Packit d3f73b
is used to decide on whether the packet is a match or not.
Packit d3f73b
.SH OPTIONS
Packit d3f73b
.TP
Packit d3f73b
.BI action " ACTION_SPEC"
Packit d3f73b
Apply an action from the generic actions framework on matching packets.
Packit d3f73b
.TP
Packit d3f73b
.BI classid " CLASSID"
Packit d3f73b
Push matching packets into the class identified by
Packit d3f73b
.IR CLASSID .
Packit d3f73b
.TP
Packit d3f73b
.BI from " REALM"
Packit d3f73b
.TQ
Packit d3f73b
.BI fromif " TAG"
Packit d3f73b
Perform source route lookups.
Packit d3f73b
.I TAG
Packit d3f73b
is the name of an interface which must be present on the system at the time of
Packit d3f73b
.B tc
Packit d3f73b
invocation.
Packit d3f73b
.TP
Packit d3f73b
.BI to " REALM"
Packit d3f73b
Match if normal (i.e., destination) routing returns the given
Packit d3f73b
.IR REALM .
Packit d3f73b
.SH EXAMPLES
Packit d3f73b
Consider the subnet 192.168.2.0/24 being attached to eth0:
Packit d3f73b
Packit d3f73b
.RS
Packit d3f73b
.EX
Packit d3f73b
ip route add 192.168.2.0/24 dev eth0 realm 2
Packit d3f73b
.EE
Packit d3f73b
.RE
Packit d3f73b
Packit d3f73b
The following
Packit d3f73b
.B route
Packit d3f73b
filter will then match packets from that subnet:
Packit d3f73b
Packit d3f73b
.RS
Packit d3f73b
.EX
Packit d3f73b
tc filter add ... route from 2 classid 1:2
Packit d3f73b
.EE
Packit d3f73b
.RE
Packit d3f73b
Packit d3f73b
and pass packets on to class 1:2.
Packit d3f73b
.SH NOTES
Packit d3f73b
Due to implementation details,
Packit d3f73b
.B realm
Packit d3f73b
values must be in a range from 0 to 255, inclusive. Alternatively, a verbose
Packit d3f73b
name defined in /etc/iproute2/rt_realms may be given instead.
Packit d3f73b
.SH SEE ALSO
Packit d3f73b
.BR tc (8),
Packit d3f73b
.BR ip-route (8)