man-pages/man4/veth.4

75 lines
2.4 KiB
Groff
Raw Normal View History

.\" 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
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.\"
.TH veth 4 2017-10-03 "Linux" "Linux Programmer's Manual"
.SH NAME
veth \- Virtual Ethernet Device
.SH DESCRIPTION
The
.B veth
devices are virtual Ethernet devices.
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
.B veth
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.
.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
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),
.BR ip-link (8),
.BR ip-netns (8)