.\" -*- coding: UTF-8 -*- .\" 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 .\" .\" %%%LICENSE_START(GPLv2+_DOC_FULL) .\" 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. .\" %%%LICENSE_END .\" .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH VETH 4 "1 ноября 2020 г." Linux "Руководство программиста Linux" .SH ИМЯ veth \- виртуальное устройство Ethernet .SH ОПИСАНИЕ Устройства \fBveth\fP — это виртуальные устройства Ethernet. Они могут служить туннелями между сетевыми пространствами имён для создания моста к физическому сетевому устройству в другом пространстве имён, а также использоваться как самостоятельные сетевые устройства. .PP Устройства \fBveth\fP всегда создаются парами. Пара может быть создана с помощью команды: .PP .in +4n .EX # ip link add <имя\-p1> type veth peer name <имя\-p2> .EE .in .PP Здесь \fIимя\-p1\fP и \fIимя\-p2\fP это имена, назначенные двум соединённым конечным точкам. .PP Пакеты, переданные в одно устройство пары сразу же принимаются другим устройством. Если у какого\-то устройства выключается связь (down), то то выключается пара целиком. .PP \fBveth\fP 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 \fBveth\fP pair in one network namespace and the other end in another network namespace, thus allowing communication between network namespaces. To do this, one can provide the \fBnetns\fP parameter when creating the interfaces: .PP .in +4n .EX # ip link add netns type veth peer netns .EE .in .PP or, for an existing \fBveth\fP pair, move one side to the other namespace: .PP .in +4n .EX # ip link set netns .EE .in .PP Для нахождения конца сетевого интерфейса \fBveth\fP можно использовать \fBethtool\fP(8) следующим образом: .PP .in +4n .EX # \fBip link add ve_A type veth peer name ve_B\fP # создаём пару veth # \fBethtool \-S ve_A\fP # находим индекс интерфейса статистики NIC: peer_ifindex: 16 # \fBip link | grep \(aq\(ha16:\(aq\fP # ищем интерфейс 16: ve_B@ve_A: mtu 1500 qdisc ... .EE .in .PP .SH "СМ. ТАКЖЕ" \fBclone\fP(2), \fBnetwork_namespaces\fP(7), \fBip\fP(8), \fBip\-link\fP(8), \fBip\-netns\fP(8) .SH ЗАМЕЧАНИЯ Эта страница является частью проекта Linux \fIman\-pages\fP версии 5.10. Описание проекта, информацию об ошибках и последнюю версию этой страницы можно найти по адресу \%https://www.kernel.org/doc/man\-pages/. .PP .SH ПЕРЕВОД Русский перевод этой страницы руководства был сделан Azamat Hackimov , Dmitriy Ovchinnikov , Dmitry Bolkhovskikh , Katrin Kutepova , Yuri Kozlov и Иван Павлов . .PP Этот перевод является бесплатной документацией; прочитайте .UR https://www.gnu.org/licenses/gpl-3.0.html Стандартную общественную лицензию GNU версии 3 .UE или более позднюю, чтобы узнать об условиях авторского права. Мы не несем НИКАКОЙ ОТВЕТСТВЕННОСТИ. .PP Если вы обнаружите ошибки в переводе этой страницы руководства, пожалуйста, отправьте электронное письмо на .MT man-pages-ru-talks@lists.sourceforge.net .ME .