veth.4: Elaborate on use of ethtool(8) to find veth peer

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-10-03 21:36:52 +02:00
parent eab9cf18f8
commit ee24ae59cf
1 changed files with 14 additions and 3 deletions

View File

@ -49,7 +49,6 @@ In the above,
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.
@ -64,9 +63,21 @@ 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
can be used to find the peer of a
.B veth
device, and to find the peer network interface.
network interface, using commands something like:
.PP
.in +4n
.EX
# \fBip link add ve_A type veth peer name ve_B\fP # Create veth pair
# \fBethtool -S ve_A\fP # Discover interface index of peer
NIC statistics:
peer_ifindex: 16
# \fBip link | grep '^16:'\fP # Look up interface
16: ve_B@ve_A: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc ...
.EE
.in
.PP
.SH "SEE ALSO"
.BR clone (2),
.BR ip (8),