naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0130-man-Add-a-man-page-for-the-mirred-action.patch

049c96
From c38162b8ca4f45f08a99d4aaa44a0e43eb5da54f Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Wed, 30 Mar 2016 16:43:19 +0200
049c96
Subject: [PATCH] man: Add a man page for the mirred action
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1275426
049c96
Upstream Status: iproute2.git commit 61d74eed701f8
049c96
049c96
commit 61d74eed701f8a54c9f0c549cbad0722e53482ff
049c96
Author: Phil Sutter <phil@nwl.cc>
049c96
Date:   Fri Mar 4 13:11:38 2016 +0100
049c96
049c96
    man: Add a man page for the mirred action
049c96
049c96
    Signed-off-by: Phil Sutter <phil@nwl.cc>
049c96
---
049c96
 man/man8/tc-mirred.8 | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
049c96
 1 file changed, 89 insertions(+)
049c96
 create mode 100644 man/man8/tc-mirred.8
049c96
049c96
diff --git a/man/man8/tc-mirred.8 b/man/man8/tc-mirred.8
049c96
new file mode 100644
049c96
index 0000000..52d98bc
049c96
--- /dev/null
049c96
+++ b/man/man8/tc-mirred.8
049c96
@@ -0,0 +1,89 @@
049c96
+.TH "Mirror/redirect action in tc" 8 "11 Jan 2015" "iproute2" "Linux"
049c96
+
049c96
+.SH NAME
049c96
+mirred - mirror/redirect action
049c96
+.SH SYNOPSIS
049c96
+.in +8
049c96
+.ti -8
049c96
+.BR tc " ... " "action mirred"
049c96
+.I DIRECTION ACTION
049c96
+.RB "[ " index
049c96
+.IR INDEX " ] "
049c96
+.BI dev " DEVICENAME"
049c96
+
049c96
+.ti -8
049c96
+.IR DIRECTION " := { "
049c96
+.BR ingress " | " egress " }"
049c96
+
049c96
+.ti -8
049c96
+.IR ACTION " := { "
049c96
+.BR mirror " | " redirect " }"
049c96
+.SH DESCRIPTION
049c96
+The
049c96
+.B mirred
049c96
+action allows to redirect or mirror packets to another network interface on the
049c96
+same system. It is typically used in combination with the
049c96
+.B ifb
049c96
+pseudo device to create a shrared instance where QoS happens, but serves well
049c96
+for debugging or monitoring purposes, too.
049c96
+.SH OPTIONS
049c96
+.TP
049c96
+.B ingress
049c96
+.TQ
049c96
+.B egress
049c96
+Specify the direction in which the packet shall appear on the destination
049c96
+interface. Currently only
049c96
+.B egress
049c96
+is implemented.
049c96
+.TP
049c96
+.B mirror
049c96
+.TQ
049c96
+.B redirect
049c96
+Define whether the packet should be copied
049c96
+.RB ( mirror )
049c96
+or moved
049c96
+.RB ( redirect )
049c96
+to the destination interface.
049c96
+.TP
049c96
+.BI index " INDEX"
049c96
+Assign a unique ID to this action instead of letting the kernel choose one
049c96
+automatically.
049c96
+.I INDEX
049c96
+is a 32bit unsigned integer greater than zero.
049c96
+.TP
049c96
+.BI dev " DEVICENAME"
049c96
+Specify the network interface to redirect or mirror to.
049c96
+.SH EXAMPLES
049c96
+Limit ingress bandwidth on eth0 to 1mbit/s, redirect exceeding traffic to lo for
049c96
+debugging purposes:
049c96
+
049c96
+.RS
049c96
+.EX
049c96
+# tc qdisc add dev eth0 handle ffff: ingress
049c96
+# tc filter add dev eth0 parent ffff: u32 \\
049c96
+	match u32 0 0 \\
049c96
+	action police rate 1mbit burst 100k conform-exceed pipe \\
049c96
+	action mirred egress redirect dev lo
049c96
+.EE
049c96
+.RE
049c96
+
049c96
+Use an
049c96
+.B ifb
049c96
+interface to send ingress traffic on eth0 through an instance of
049c96
+.BR sfq :
049c96
+
049c96
+.RS
049c96
+.EX
049c96
+# modprobe ifb
049c96
+# ip link set ifb0 up
049c96
+# tc qdisc add dev ifb0 root sfq
049c96
+# tc qdisc add dev eth0 handle ffff: ingress
049c96
+# tc filter add dev eth0 parent ffff: u32 \\
049c96
+	match u32 0 0 \\
049c96
+	action mirred egress redirect dev ifb0
049c96
+.EE
049c96
+.RE
049c96
+
049c96
+.SH SEE ALSO
049c96
+.BR tc (8),
049c96
+.BR tc-u32 (8)
049c96
-- 
049c96
1.8.3.1
049c96