* veth(4) draft manual page
@ 2017-10-18 7:49 Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkgWyh_dv=2a2c2poCbwcBmBx+z69Sr7mYiX6EbkwQA7+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-10-18 7:49 UTC (permalink / raw)
To: Tomas Pospisek; +Cc: Eric W. Biederman, linux-man, Pavel Emelyanov
Hello all,
Long ago (http://www.spinics.net/lists/linux-man/msg03193.html), Tomáš
started work on a veth.4 page, and Eric through in some comments as
well, but the effort to complete the page petered out. I decided to
take a shot at picking up what was said so far completing it. Are
there any comments on the page below?
Cheers,
Michael
veth(4) Linux Programmer's Manual veth(4)
NAME
veth - Virtual Ethernet Device
DESCRIPTION
The veth devices are virtual Ethernet devices. They can act as
tunnels between network namespaces to create a bridge to a physi‐
cal network device in another namespace, but can also be used as
standalone network devices.
veth devices are always created in interconnected pairs. A pair
can be created using the command:
# ip link add <p1-name> type veth peer name <p2-name>
In the above, p1-name and p2-name are the names assigned to the
two connected end points.
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.
veth device pairs are useful for combining the network facilities
of the kernel together in interesting ways. A particularly inter‐
esting use case is to place one end of a veth pair in one network
namespace and the other end in another network namespace, thus
allowing communication between network namespaces.
ethtool(8) can be used to find the peer of a veth network inter‐
face, using commands something like:
# ip link add ve_A type veth peer name ve_B # Create veth pair
# ethtool -S ve_A # Discover interface index of peer
NIC statistics:
peer_ifindex: 16
# ip link | grep '^16:' # Look up interface
16: ve_B@ve_A: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc ...
SEE ALSO
clone(2), ip(8), ip-link(8), ip-netns(8)
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: veth(4) draft manual page
[not found] ` <CAKgNAkgWyh_dv=2a2c2poCbwcBmBx+z69Sr7mYiX6EbkwQA7+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-10-19 10:17 ` Tomas Pospisek
2017-10-19 17:12 ` Michael Kerrisk (man-pages)
0 siblings, 1 reply; 3+ messages in thread
From: Tomas Pospisek @ 2017-10-19 10:17 UTC (permalink / raw)
To: Michael Kerrisk (man-pages); +Cc: Eric W. Biederman, linux-man, Pavel Emelyanov
Hello all,
On Wed, 18 Oct 2017, Michael Kerrisk (man-pages) wrote:
> Hello all,
>
> Long ago (http://www.spinics.net/lists/linux-man/msg03193.html), Tomáš
> started work on a veth.4 page, and Eric through in some comments as
> well, but the effort to complete the page petered out. I decided to
> take a shot at picking up what was said so far completing it.
Very nice, thanks!
> Are there any comments on the page below?
Based on the principle that I prefer useful to mathematically orthogonal
man pages, I'd suggest to document how you actually do create a veth in a
different network namespace:
> Cheers,
>
> Michael
>
> veth(4) Linux Programmer's Manual veth(4)
>
> NAME
> veth - Virtual Ethernet Device
>
> DESCRIPTION
> The veth devices are virtual Ethernet devices. They can act as
> tunnels between network namespaces to create a bridge to a physi‐
> cal network device in another namespace, but can also be used as
> standalone network devices.
>
> veth devices are always created in interconnected pairs. A pair
> can be created using the command:
>
> # ip link add <p1-name> type veth peer name <p2-name>
>
> In the above, p1-name and p2-name are the names assigned to the
> two connected end points.
>
> 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.
>
> veth device pairs are useful for combining the network facilities
> of the kernel together in interesting ways. A particularly inter‐
> esting use case is to place one end of a veth pair in one network
> namespace and the other end in another network namespace, thus
> allowing communication between network namespaces:
First you create the veth as above and then you move one side of
the pair to the other namespace:
# ip link set <p2-name> netns <p2-namespace>
> ethtool(8) can be used to find the peer of a veth network inter‐
> face, using commands something like:
>
> # ip link add ve_A type veth peer name ve_B # Create veth pair
> # ethtool -S ve_A # Discover interface index of peer
> NIC statistics:
> peer_ifindex: 16
> # ip link | grep '^16:' # Look up interface
> 16: ve_B@ve_A: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc ...
>
> SEE ALSO
> clone(2), ip(8), ip-link(8), ip-netns(8)
Thanks a lot Michael & best greetings!
*t
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: veth(4) draft manual page
2017-10-19 10:17 ` Tomas Pospisek
@ 2017-10-19 17:12 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-10-19 17:12 UTC (permalink / raw)
To: Tomas Pospisek; +Cc: Eric W. Biederman, linux-man, Pavel Emelyanov
Hi Tomáš,
On 19 October 2017 at 12:17, Tomas Pospisek <tpo-UQchlGytWBLoPl2ZpcX+cw@public.gmane.org> wrote:
> Hello all,
>
> On Wed, 18 Oct 2017, Michael Kerrisk (man-pages) wrote:
>
>> Hello all,
>>
>> Long ago (http://www.spinics.net/lists/linux-man/msg03193.html), Tomáš
>> started work on a veth.4 page, and Eric through in some comments as
>> well, but the effort to complete the page petered out. I decided to
>> take a shot at picking up what was said so far completing it.
>
> Very nice, thanks!
>
>> Are there any comments on the page below?
>
> Based on the principle that I prefer useful to mathematically orthogonal man
> pages, I'd suggest to document how you actually do create a veth in a
> different network namespace:
Agreed.
>> Cheers,
>>
>> Michael
>>
>> veth(4) Linux Programmer's Manual veth(4)
>>
>> NAME
>> veth - Virtual Ethernet Device
>>
>> DESCRIPTION
>> The veth devices are virtual Ethernet devices. They can act as
>> tunnels between network namespaces to create a bridge to a physi‐
>> cal network device in another namespace, but can also be used as
>> standalone network devices.
>>
>> veth devices are always created in interconnected pairs. A pair
>> can be created using the command:
>>
>> # ip link add <p1-name> type veth peer name <p2-name>
>>
>> In the above, p1-name and p2-name are the names assigned to the
>> two connected end points.
>>
>> 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.
>>
>> veth device pairs are useful for combining the network facilities
>> of the kernel together in interesting ways. A particularly inter‐
>> esting use case is to place one end of a veth pair in one network
>> namespace and the other end in another network namespace, thus
>> allowing communication between network namespaces:
>
>
> First you create the veth as above and then you move one side of
> the pair to the other namespace:
>
> # ip link set <p2-name> netns <p2-namespace>
Thanks. I added that.
>> ethtool(8) can be used to find the peer of a veth network inter‐
>> face, using commands something like:
>>
>> # ip link add ve_A type veth peer name ve_B # Create veth pair
>> # ethtool -S ve_A # Discover interface index of peer
>> NIC statistics:
>> peer_ifindex: 16
>> # ip link | grep '^16:' # Look up interface
>> 16: ve_B@ve_A: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc ...
>>
>> SEE ALSO
>> clone(2), ip(8), ip-link(8), ip-netns(8)
>
>
> Thanks a lot Michael & best greetings!
Cheers,
Michael
PS Maybe catch up with you someday again in Bern? I'm there now and then.
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-19 17:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 7:49 veth(4) draft manual page Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkgWyh_dv=2a2c2poCbwcBmBx+z69Sr7mYiX6EbkwQA7+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-19 10:17 ` Tomas Pospisek
2017-10-19 17:12 ` Michael Kerrisk (man-pages)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.