From ee24ae59cfb698675d0249e8cdd53275a15f7e51 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 3 Oct 2017 21:36:52 +0200 Subject: [PATCH] veth.4: Elaborate on use of ethtool(8) to find veth peer Signed-off-by: Michael Kerrisk --- man4/veth.4 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/man4/veth.4 b/man4/veth.4 index c0c47d829..23c3b32b0 100644 --- a/man4/veth.4 +++ b/man4/veth.4 @@ -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: mtu 1500 qdisc ... +.EE +.in +.PP .SH "SEE ALSO" .BR clone (2), .BR ip (8),