man-pages/man8/tc-route.8.html
2021-03-31 01:06:50 +01:00

146 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Route classifier in tc</TITLE>
</HEAD><BODY>
<H1>Route classifier in tc</H1>
Section: Linux (8)<BR>Updated: 21 Oct 2015<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<P>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
route - route traffic control filter
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<BR>
<B>tc</B> <B>filter</B> ... <B>route</B> [ <B>from</B>
<I>REALM</I> |
<B>fromif</B>
<I>TAG</I> ] [
<B>to</B>
<I>REALM</I> ] [
<B>classid</B>
<I>CLASSID</I> ] [
<B>action</B>
<I>ACTION_SPEC</I> ]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
Match packets based on routing table entries. This filter centers around the
possibility to assign a
<B>realm</B>
to routing table entries. For any packet to be classified by this filter, a
routing table lookup is performed and the returned
<B>realm</B>
is used to decide on whether the packet is a match or not.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>action</B><I> ACTION_SPEC</I>
<DD>
Apply an action from the generic actions framework on matching packets.
<DT id="2"><B>classid</B><I> CLASSID</I>
<DD>
Push matching packets into the class identified by
<I>CLASSID</I>.
<DT id="3"><B>from</B><I> REALM</I>
<DD>
<B>fromif</B><I> TAG</I>
Perform source route lookups.
<I>TAG</I>
is the name of an interface which must be present on the system at the time of
<B>tc</B>
invocation.
<DT id="4"><B>to</B><I> REALM</I>
<DD>
Match if normal (i.e., destination) routing returns the given
<I>REALM</I>.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>EXAMPLES</H2>
Consider the subnet 192.168.2.0/24 being attached to eth0:
<P>
<DL COMPACT><DT id="5"><DD>
ip route add 192.168.2.0/24 dev eth0 realm 2
</DL>
<P>
The following
<B>route</B>
filter will then match packets from that subnet:
<P>
<DL COMPACT><DT id="6"><DD>
tc filter add ... route from 2 classid 1:2
</DL>
<P>
and pass packets on to class 1:2.
<A NAME="lbAG">&nbsp;</A>
<H2>NOTES</H2>
Due to implementation details,
<B>realm</B>
values must be in a range from 0 to 255, inclusive. Alternatively, a verbose
name defined in /etc/iproute2/rt_realms may be given instead.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?8+tc">tc</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+ip-route">ip-route</A></B>(8)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="11"><A HREF="#lbAF">EXAMPLES</A><DD>
<DT id="12"><A HREF="#lbAG">NOTES</A><DD>
<DT id="13"><A HREF="#lbAH">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:17 GMT, March 31, 2021
</BODY>
</HTML>