aboutsummaryrefslogtreecommitdiffstats
path: root/man4
diff options
context:
space:
mode:
Diffstat (limited to 'man4')
-rw-r--r--man4/veth.416
1 files changed, 13 insertions, 3 deletions
diff --git a/man4/veth.4 b/man4/veth.4
index 20294c097d..2d59882a07 100644
--- a/man4/veth.4
+++ b/man4/veth.4
@@ -63,13 +63,23 @@ A particularly interesting use case is to place one end of a
.B veth
pair in one network namespace and the other end in another network namespace,
thus allowing communication between network namespaces.
-To do this, one first creates the
+To do this, one can provide the
+.B netns
+parameter when creating the interfaces:
+.PP
+.in +4n
+.EX
+# ip link add <p1-name> netns <p1-ns> type veth peer <p2-name> netns <p2-ns>
+.EE
+.in
+.PP
+or, for an existing
.B veth
-device as above and then moves one side of the pair to the other namespace:
+pair, move one side to the other namespace:
.PP
.in +4n
.EX
-# ip link set <p2-name> netns <p2-namespace>
+# ip link set <p2-name> netns <p2-ns>
.EE
.in
.PP