veth.4: Integrate content from Eric Biederman

Cowritten-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-10-03 20:47:37 +02:00
parent 394eea352b
commit 9354c155a0
1 changed files with 30 additions and 13 deletions

View File

@ -1,5 +1,6 @@
.\" Copyright (c) 2012 Tomáš Pospíšek (tpo_deb@sourcepole.ch),
.\" Fri, 03 Nov 2012 22:35:33 +0100
.\" and Copyright (c) 2012 Eric W. Biederman <ebiederm@xmission.com>
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
@ -29,27 +30,43 @@ veth \- Virtual Ethernet Device
The
.B veth
devices are virtual Ethernet devices.
.PP
They can act as tunnels between network namespaces to create
a bridge to a physical network device in another namespace, but
can also be used as standalone network devices.
.PP
Because of their original purpose for tunneling
.B veth
devices are always created in pairs, that are
devices are always created in interconnected pairs.
A pair can be created using the command:
.PP
.in +4n
.EX
# ip link add <p1-name> type veth peer name <p2-name>
.EE
.in
.PP
In the above,
.I p1-name
and
.I p2-name
are the names assigned to the two connected end points.
interconnected with each other.
When one
.PP
Packets transmitted on one device in the pair are immediately received on
the other device.
When either devices is down the link state of the pair is down.
.PP
.B veth
end receives a packet it appears on its pair and vice versa.
.PP
.B Veth
devices can be manipulated with the
.BR ip (8)
tool.
See
.I "ip link help"
for more information.
device pairs are useful for combining the network
facilities of the kernel together in interesting ways.
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.
.PP
.BR ethtool (8)
can be used to test if a networking device is a
.B veth
device, and to find the peer network interface.
.SH "SEE ALSO"
.BR clone (2),
.BR ip (8),