{"id":489664,"date":"2026-08-04T09:04:01","date_gmt":"2026-08-04T09:04:01","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=489664"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=489664","title":{"rendered":"\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Linux"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ed\/07c\/6fd\/5ed07c6fda35015f7609e6b7072d878b.png\" width=\"1678\" height=\"937\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/5ed\/07c\/6fd\/5ed07c6fda35015f7609e6b7072d878b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ed\/07c\/6fd\/5ed07c6fda35015f7609e6b7072d878b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>Linux \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0442\u0438 \u2014 \u043d\u0430 \u043d\u0438\u0445 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d (\u0412\u041c), \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0441\u0440\u0435\u0434. \u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432: \u0447\u0435\u043c \u043e\u043d\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0438 \u043a\u0430\u043a \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c. \u0421\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043a\u043e\u0434\u0430. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0441\u0435\u0442\u0435\u0439. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0443\u0442\u0430\u044e\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439.<\/p>\n<blockquote>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>ip link<\/code> \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 iproute2. \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u0442 root.<\/p>\n<\/blockquote>\n<p><strong>\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"#1\">Bridge (\u043c\u043e\u0441\u0442)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\">Bonded-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\">VLAN (Virtual LAN)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">VXLAN (Virtual eXtensible Local Area Network)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#5\">MACVLAN<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#6\">IPVLAN<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">MACVTAP\/IPVTAP<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#8\">MACsec (Media Access Control Security)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#9\">VETH (Virtual Ethernet)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#10\">Netkit<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#11\">VCAN (\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 CAN)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#12\">VXCAN (\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e CAN)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#13\">IPOIB (IP-over-InfiniBand)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#14\">NLMON (NetLink MONitor)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#15\">Netconsole<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#16\">Dummy-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#17\">Blackhole-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#18\">IFB (Intermediate Functional Block)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#19\">netdevsim<\/a><\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u041e \u0442\u0443\u043d\u043d\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/developers.redhat.com\/blog\/2019\/05\/17\/an-introduction-to-linux-virtual-interfaces-tunnels\/\">\u00abAn introduction to Linux virtual interfaces: Tunnels\u00bb<\/a>.<\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h3>Bridge<\/h3>\n<p>\u041c\u043e\u0441\u0442 \u0432 Linux \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u041e\u0431\u044b\u0447\u043d\u043e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445 \u0438 \u0448\u043b\u044e\u0437\u0430\u0445 \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0412\u041c \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d (network namespaces) \u043d\u0430 \u0445\u043e\u0441\u0442\u0435. \u041c\u043e\u0441\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b STP (Spanning Tree Protocol), \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e VLAN \u0438 multicast snooping.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c0b\/218\/4ca\/c0b2184ca5d6b8a642bb618ba351e9c9.png\" alt=\"\u041c\u043e\u0441\u0442 Linux (br0) \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u044c\u044e \u2014 \u0412\u041c \u0447\u0435\u0440\u0435\u0437 tap-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0447\u0435\u0440\u0435\u0437 veth-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b\" title=\"\u041c\u043e\u0441\u0442 Linux (br0) \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u044c\u044e \u2014 \u0412\u041c \u0447\u0435\u0440\u0435\u0437 tap-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0447\u0435\u0440\u0435\u0437 veth-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c0b\/218\/4ca\/c0b2184ca5d6b8a642bb618ba351e9c9.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c0b\/218\/4ca\/c0b2184ca5d6b8a642bb618ba351e9c9.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u041c\u043e\u0441\u0442 Linux (br0) \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u044c\u044e \u2014 \u0412\u041c \u0447\u0435\u0440\u0435\u0437 tap-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0447\u0435\u0440\u0435\u0437 veth-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b<\/em><\/figcaption><\/div>\n<\/figure>\n<h4>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0441\u0442<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u043e\u0441\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0412\u041c \u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432) \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0438\u043b\u0438 \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u044c\u044e \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043e\u043d\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0443.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043e\u0441\u0442 \u0432 Linux<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0441\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>ip link<\/code>:<\/p>\n<pre><code class=\"bash\">sudo ip link add br0 type bridgesudo ip link set br0 up<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0440\u0442 \u0432 \u043c\u043e\u0441\u0442:<\/p>\n<pre><code class=\"bash\">sudo ip link set eth0 master br0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h4>Spanning Tree Protocol (STP)<\/h4>\n<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b STP \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e Ethernet-\u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u043f\u0435\u0442\u0435\u043b\u044c, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044f \u0437\u0430\u043a\u043e\u043b\u044c\u0446\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0441\u0442\u043e\u0432 \u0438 \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0442\u043e\u0440\u043c\u044b. \u041c\u043e\u0441\u0442 Linux \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b RSTP (Rapid Spanning Tree Protocol) \u0438 MSTP (Multiple Spanning Tree Protocol). \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c STP \u043d\u0430 \u043c\u043e\u0441\u0442\u0443, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<p>bash<\/p>\n<pre><code class=\"bash\">ip link set br0 type bridge stp_state 1<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 multicast<\/strong><\/p>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043c\u043e\u0441\u0442\u0430 Linux \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443: \u043e\u043d \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 IGMP (Internet Group Management Protocol) \u0438 MLD (Multicast Listener Discovery), \u0447\u0442\u043e\u0431\u044b \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f IGMPv2\/IGMPv3 \u0438 MLDv1\/MLDv2. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c multicast snooping \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 IGMP\/MLD:<\/p>\n<pre><code class=\"bash\">ip link set br0 mcast_snooping 1ip link set br0 mcast_querier 1<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f VLAN<\/strong><\/p>\n<p>\u041c\u043e\u0441\u0442 Linux \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u0433\u0438 VLAN \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u2014 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e VLAN \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u043f\u043e\u0440\u0442\u0430\u043c VLAN ID 2:<\/p>\n<pre><code class=\"bash\">ip link set br0 type bridge vlan_filtering 1ip link set eth1 master br0bridge vlan add dev eth1 vid 2 pvid untagged<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 pvid \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u0433\u0438 VLAN 2 \u043d\u0435\u0442\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u0430\u0434\u0440\u0430\u043c \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 (\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a). \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 untagged \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u0433\u0438 VLAN 2 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 (\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a).<\/p>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/strong><\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 STP \u0438 multicast \u2014 \u0432 <code>ip link help bridge<\/code> \u0438 man-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 ip-link. \u041e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 VLAN \u2014 \u0432 <code>bridge help<\/code> \u0438 man bridge.<\/p>\n<p>\u041c\u043e\u0441\u0442 Linux \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 (FDB) \u0438 \u0431\u0430\u0437\u0435 \u043c\u043d\u043e\u0433\u043e\u0430\u0434\u0440\u0435\u0441\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f (MDB). \u0421\u0440\u0435\u0434\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u2014 MAC Authentication Bypass (MAB), IEEE 802.11 Proxy ARP \u0438 switchdev. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u2014 \u0432 man-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 bridge \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u0434\u0440\u0430 \u043f\u043e \u043c\u043e\u0441\u0442\u0430\u043c.<\/p>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h3>Bonded-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/h3>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 bonding \u0432 Linux \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430: \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u044d\u0442\u043e \u0433\u043e\u0440\u044f\u0447\u0438\u0439 \u0440\u0435\u0437\u0435\u0440\u0432 (hot standby) \u0438\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4a0\/2d5\/650\/4a02d56504bd6988004e5b7e522d9a4c.png\" alt=\"\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bond0 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b eth0 \u0438 eth1 \u0432 \u043e\u0434\u043d\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0443\" title=\"\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bond0 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b eth0 \u0438 eth1 \u0432 \u043e\u0434\u043d\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0443\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4a0\/2d5\/650\/4a02d56504bd6988004e5b7e522d9a4c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4a0\/2d5\/650\/4a02d56504bd6988004e5b7e522d9a4c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bond0 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b eth0 \u0438 eth1 \u0432 \u043e\u0434\u043d\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0443<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c bonded-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u0430\u043d\u0430\u043b\u0430 \u0438\u043b\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c bonded-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/strong><\/p>\n<pre><code class=\"bash\">ip link add bond1 type bond miimon 100 mode active-backupip link set eth0 master bond1ip link set eth1 master bond1<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bond1 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 active-backup. \u0414\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u0434\u0440\u0430.<\/p>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 net_failover \u2014 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041e\u043d \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, pass-through \u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, VF) \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/175\/379\/4e9\/1753794e9716cefac68aee9608ff4aea.png\" alt=\"\u0414\u0440\u0430\u0439\u0432\u0435\u0440 net_failover \u0432\u043d\u0443\u0442\u0440\u0438 \u0412\u041c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c VF-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c (eth1) \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c (eth0)\" title=\"\u0414\u0440\u0430\u0439\u0432\u0435\u0440 net_failover \u0432\u043d\u0443\u0442\u0440\u0438 \u0412\u041c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c VF-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c (eth1) \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c (eth0)\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/175\/379\/4e9\/1753794e9716cefac68aee9608ff4aea.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/175\/379\/4e9\/1753794e9716cefac68aee9608ff4aea.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 net_failover \u0432\u043d\u0443\u0442\u0440\u0438 \u0412\u041c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c VF-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c (eth1) \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c (eth0)<\/em><\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h3>VLAN<\/h3>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c (VLAN) \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u043c\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0421 VLAN \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044e\u0442 \u0445\u043e\u0441\u0442\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a VLAN.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/638\/96f\/ca0\/63896fca030fe13fe9d69990d1d8abeb.png\" alt=\"\u0422\u0435\u0433 802.1Q \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 Ethernet-\u043a\u0430\u0434\u0440 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 VLAN \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435\" title=\"\u0422\u0435\u0433 802.1Q \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 Ethernet-\u043a\u0430\u0434\u0440 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 VLAN \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/638\/96f\/ca0\/63896fca030fe13fe9d69990d1d8abeb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/638\/96f\/ca0\/63896fca030fe13fe9d69990d1d8abeb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0422\u0435\u0433 802.1Q \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 Ethernet-\u043a\u0430\u0434\u0440 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 VLAN \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VLAN<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 VLAN, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0412\u041c, \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d \u0438\u043b\u0438 \u0445\u043e\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c VLAN<\/strong><\/p>\n<pre><code class=\"bash\">ip link add link eth0 name eth0.2 type vlan id 2ip link add link eth0 name eth0.3 type vlan id 3<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 VLAN 2 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c eth0.2 \u0438 VLAN 3 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c eth0.3.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a2e\/b59\/ece\/a2eb59ece5490853ed1f501ef1f4ac7a.png\" alt=\"\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth0 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b eth0.2 \u0438 eth0.3 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 VLAN ID\" title=\"\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth0 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b eth0.2 \u0438 eth0.3 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 VLAN ID\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a2e\/b59\/ece\/a2eb59ece5490853ed1f501ef1f4ac7a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a2e\/b59\/ece\/a2eb59ece5490853ed1f501ef1f4ac7a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth0 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b eth0.2 \u0438 eth0.3 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 VLAN ID<\/em><\/figcaption><\/div>\n<\/figure>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 VLAN \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0445\u043e\u0441\u0442, \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0435\u0433\u0430\u043c\u0438 VLAN. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u043e\u0440\u0442 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c trunk.<\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h3>VXLAN<\/h3>\n<p>VXLAN (Virtual eXtensible Local Area Network) \u2014 \u0442\u0443\u043d\u043d\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0441\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432 4 096 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 VLAN \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 IEEE 802.1Q. \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0432 IETF RFC 7348.<\/p>\n<p>VXLAN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 24-\u0431\u0438\u0442\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 \u2014 VNI (VXLAN network identifier). \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0434\u043e 16 777 216 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u2014 \u0432 4 096 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e VLAN.<\/p>\n<p>VXLAN \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0434\u0440\u044b \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (L2) \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c VXLAN \u0432 \u043f\u0430\u043a\u0435\u0442 UDP-IP, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7e0\/82f\/0ac\/7e082f0acea2de0d78545e2b13c09498.png\" alt=\"VXLAN \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 Ethernet-\u043a\u0430\u0434\u0440\u044b L2 \u0432 \u043f\u0430\u043a\u0435\u0442 UDP-IP, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f 24-\u0431\u0438\u0442\u043d\u044b\u0439 VNI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439\" title=\"VXLAN \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 Ethernet-\u043a\u0430\u0434\u0440\u044b L2 \u0432 \u043f\u0430\u043a\u0435\u0442 UDP-IP, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f 24-\u0431\u0438\u0442\u043d\u044b\u0439 VNI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7e0\/82f\/0ac\/7e082f0acea2de0d78545e2b13c09498.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7e0\/82f\/0ac\/7e082f0acea2de0d78545e2b13c09498.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>VXLAN \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 Ethernet-\u043a\u0430\u0434\u0440\u044b L2 \u0432 \u043f\u0430\u043a\u0435\u0442 UDP-IP, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f 24-\u0431\u0438\u0442\u043d\u044b\u0439 VNI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VXLAN<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 VXLAN, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b 4 096 VLAN \u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0432\u0435\u0440\u043b\u0435\u0439\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445. VXLAN \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0432 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0430\u0445 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u0430\u0445, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0442\u043e\u0439\u043a\u0430\u043c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb1\/a7a\/e0d\/cb1a7ae0d6b5c044f4328ecc5b4e2496.png\" alt=\"\u0412 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0435 VXLAN \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c L2, \u0442\u0443\u043d\u043d\u0435\u043b\u0438\u0440\u0443\u044f \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 (vx0) \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c\" title=\"\u0412 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0435 VXLAN \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c L2, \u0442\u0443\u043d\u043d\u0435\u043b\u0438\u0440\u0443\u044f \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 (vx0) \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cb1\/a7a\/e0d\/cb1a7ae0d6b5c044f4328ecc5b4e2496.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb1\/a7a\/e0d\/cb1a7ae0d6b5c044f4328ecc5b4e2496.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0412 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0435 VXLAN \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c L2, \u0442\u0443\u043d\u043d\u0435\u043b\u0438\u0440\u0443\u044f \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 (vx0) \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c VXLAN<\/strong><\/p>\n<pre><code class=\"bash\">ip link add vx0 type vxlan id 100 local 1.1.1.1 remote 2.2.2.2 dev eth0 dstport 4789<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<blockquote>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u0435 <a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/networking\/vxlan.txt\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u044f\u0434\u0440\u0430<\/a> \u043f\u043e VXLAN \u0438\u043b\u0438 <a href=\"https:\/\/vincent.bernat.ch\/en\/blog\/2017-vxlan-linux\">\u0432\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043e VXLAN<\/a>.<\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h3>MACVLAN<\/h3>\n<p>\u0421 VLAN \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u043e \u0442\u0435\u0433\u0443 VLAN. \u0421 MACVLAN \u2014 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (\u0442\u043e \u0435\u0441\u0442\u044c MAC-\u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 Ethernet) \u043f\u043e\u0432\u0435\u0440\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e.<\/p>\n<p>\u0414\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f MACVLAN, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0412\u041c \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 TAP \u0438\u043b\u0438 VETH \u0438 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0438\u0445 \u043a \u043c\u043e\u0441\u0442\u0443 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3bc\/427\/319\/3bc427319ab742fa1b8d29ec345f6f97.png\" alt=\"\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u2014 \u043c\u043e\u0441\u0442 (br0) \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c\" title=\"\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u2014 \u043c\u043e\u0441\u0442 (br0) \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3bc\/427\/319\/3bc427319ab742fa1b8d29ec345f6f97.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3bc\/427\/319\/3bc427319ab742fa1b8d29ec345f6f97.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u2014 \u043c\u043e\u0441\u0442 (br0) \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0421 MACVLAN \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c \u0438\u043c\u0435\u043d \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0431\u0435\u0437 \u043c\u043e\u0441\u0442\u0430.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9fd\/d0b\/04d\/9fdd0b04dd51309dbc57e4a1169ec00c.png\" alt=\"MACVLAN \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u0435\u043a \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 eth0 \u0431\u0435\u0437 \u043c\u043e\u0441\u0442\u0430\" title=\"MACVLAN \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u0435\u043a \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 eth0 \u0431\u0435\u0437 \u043c\u043e\u0441\u0442\u0430\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9fd\/d0b\/04d\/9fdd0b04dd51309dbc57e4a1169ec00c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9fd\/d0b\/04d\/9fdd0b04dd51309dbc57e4a1169ec00c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>MACVLAN \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u0435\u043a \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 eth0 \u0431\u0435\u0437 \u043c\u043e\u0441\u0442\u0430<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0423 MACVLAN \u043f\u044f\u0442\u044c \u0440\u0435\u0436\u0438\u043c\u043e\u0432.<\/p>\n<ul>\n<li>\n<p><strong>Private.<\/strong> \u0420\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043e\u0431\u043c\u0435\u043d \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 MACVLAN \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u2014 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c hairpin.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a33\/439\/3b5\/a334393b559491d3a1797836dcb3e4ba.png\" alt=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 private \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e eth0\" title=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 private \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e eth0\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a33\/439\/3b5\/a334393b559491d3a1797836dcb3e4ba.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a33\/439\/3b5\/a334393b559491d3a1797836dcb3e4ba.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 private \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e eth0<\/em><\/figcaption><\/div>\n<\/figure>\n<\/li>\n<li>\n<p><strong>VEPA.<\/strong> \u0414\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 MACVLAN \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0414\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b \u0440\u0435\u0436\u0438\u043c hairpin, \u043b\u0438\u0431\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u043b TCP\/IP-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e46\/8cc\/654\/e468cc6541f2969c7df91dbd86611668.png\" alt=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 VEPA (Virtual Ethernet Port Aggregator) \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 MACVLAN \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c\" title=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 VEPA (Virtual Ethernet Port Aggregator) \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 MACVLAN \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e46\/8cc\/654\/e468cc6541f2969c7df91dbd86611668.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e46\/8cc\/654\/e468cc6541f2969c7df91dbd86611668.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 VEPA (Virtual Ethernet Port Aggregator) \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 MACVLAN \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c<\/em><\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>Bridge.<\/strong> \u0412\u0441\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u043e\u0441\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7b5\/293\/aad\/7b5293aad87a41cb6e55fdbf2db31d6e.png\" alt=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 bridge \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u044f \u0445\u043e\u0441\u0442\" title=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 bridge \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u044f \u0445\u043e\u0441\u0442\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7b5\/293\/aad\/7b5293aad87a41cb6e55fdbf2db31d6e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7b5\/293\/aad\/7b5293aad87a41cb6e55fdbf2db31d6e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 bridge \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u044f \u0445\u043e\u0441\u0442<\/em><\/figcaption><\/div>\n<\/figure>\n<\/li>\n<li>\n<p><strong>Passthru.<\/strong> \u0420\u0435\u0436\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u0412\u041c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/23a\/f39\/d1d\/23af39d1d9411c8754e27dc08f85046f.png\" alt=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 passthru \u043e\u0434\u0438\u043d \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 eth0, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439\" title=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 passthru \u043e\u0434\u0438\u043d \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 eth0, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/23a\/f39\/d1d\/23af39d1d9411c8754e27dc08f85046f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/23a\/f39\/d1d\/23af39d1d9411c8754e27dc08f85046f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 passthru \u043e\u0434\u0438\u043d \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 eth0, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439<\/em><\/figcaption><\/div>\n<\/figure>\n<\/li>\n<li>\n<p><strong>Source.<\/strong> \u0420\u0435\u0436\u0438\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 MAC-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0438 VLAN \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 MAC. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u2014 <a href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/davem\/net.git\/commit\/?id=79cf79abce71\">\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0430.<\/a><\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u043f\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0443. \u0421\u0430\u043c\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u2014 bridge.<\/p>\n<\/blockquote>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c MACVLAN<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 MACVLAN, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u044f\u043c\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c MACVLAN<\/strong><\/p>\n<pre><code class=\"bash\">ip link add macvlan1 link eth0 type macvlan mode bridgeip netns add net1ip link set macvlan1 netns net1<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e MACVLAN \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 bridge \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0435\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443 \u0438\u043c\u0435\u043d.<\/p>\n<p><a class=\"anchor\" name=\"6\" id=\"6\"><\/a><\/p>\n<h3>IPVLAN<\/h3>\n<p>IPVLAN \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 MACVLAN, \u043d\u043e \u0435\u0433\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u043e\u0431\u0449\u0438\u0439 MAC-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d09\/491\/92d\/d0949192d48c27aa4d993fb73ef45df6.png\" alt=\"MACVLAN \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 MAC-\u0430\u0434\u0440\u0435\u0441, \u0430 \u0432 IPVLAN \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0435\u043b\u044f\u0442 MAC-\u0430\u0434\u0440\u0435\u0441 \u0441 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c\" title=\"MACVLAN \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 MAC-\u0430\u0434\u0440\u0435\u0441, \u0430 \u0432 IPVLAN \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0435\u043b\u044f\u0442 MAC-\u0430\u0434\u0440\u0435\u0441 \u0441 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d09\/491\/92d\/d0949192d48c27aa4d993fb73ef45df6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d09\/491\/92d\/d0949192d48c27aa4d993fb73ef45df6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>MACVLAN \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 MAC-\u0430\u0434\u0440\u0435\u0441, \u0430 \u0432 IPVLAN \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0435\u043b\u044f\u0442 MAC-\u0430\u0434\u0440\u0435\u0441 \u0441 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c<\/em><\/figcaption><\/div>\n<\/figure>\n<p>IPVLAN \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c\u044b L2 \u0438 L3. \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L2 IPVLAN \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a MACVLAN \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 bridge: \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043c\u043e\u0441\u0442 \u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9d4\/3fb\/923\/9d43fb9231c8fbb741efff60eb987aab.png\" alt=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L2 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (eth0) \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u043e\u0441\u0442, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438\" title=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L2 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (eth0) \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u043e\u0441\u0442, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9d4\/3fb\/923\/9d43fb9231c8fbb741efff60eb987aab.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9d4\/3fb\/923\/9d43fb9231c8fbb741efff60eb987aab.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L2 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (eth0) \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u043e\u0441\u0442, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L3 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440: \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0443\u044e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3c7\/a60\/ef0\/3c7a60ef079282e4922a6bfad48afb01.png\" alt=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L3 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (eth0) \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0435\u0442\u044c\u044e\" title=\"\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L3 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (eth0) \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0435\u0442\u044c\u044e\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3c7\/a60\/ef0\/3c7a60ef079282e4922a6bfad48afb01.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3c7\/a60\/ef0\/3c7a60ef079282e4922a6bfad48afb01.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L3 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (eth0) \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0435\u0442\u044c\u044e<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IPVLAN<\/strong><\/p>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u0434\u0440\u0430 \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e MACVLAN \u0438 IPVLAN \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u043f\u043e\u0445\u043e\u0436\u0438, \u0438 \u0432\u044b\u0431\u043e\u0440 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. \u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 IPVLAN, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 \u0438\u043b\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d Linux-\u0445\u043e\u0441\u0442, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d MAC-\u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u043f\u043e\u0440\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0438\u0441\u043b\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u043b\u0438\u043c\u0438\u0442 MAC-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b, \u043e\u043d\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u043d\u0435\u0440\u0430\u0437\u0431\u043e\u0440\u0447\u0438\u0432\u044b\u0439 \u0440\u0435\u0436\u0438\u043c (promiscuous mode), \u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043d\u0435\u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d, \u0433\u0434\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 L2 \u043c\u043e\u0433\u0443\u0442 \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c IPVLAN<\/strong><\/p>\n<pre><code class=\"bash\">ip netns add ns0ip link add name ipvl0 link eth0 type ipvlan mode l2ip link set dev ipvl0 netns ns0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e IPVLAN \u0441 \u0438\u043c\u0435\u043d\u0435\u043c ipvl0 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 L2 \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443 \u0438\u043c\u0435\u043d ns0.<\/p>\n<p><a class=\"anchor\" name=\"7\" id=\"7\"><\/a><\/p>\n<h4>MACVTAP\/IPVTAP<\/h4>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440\u044b MACVTAP \u0438 IPVTAP \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u043e\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u044f\u0434\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \/dev\/tapX, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <a href=\"https:\/\/en.wikipedia.org\/wiki\/TUN\/TAP\">TUN\/TAP <\/a>\u0434\u043b\u044f KVM \u0438\u043b\u0438 QEMU.<\/p>\n<p>MACVTAP \u0438 IPVTAP \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b TUN, TAP \u0438 bridge \u043e\u0434\u043d\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/710\/eeb\/c63\/710eebc63ea5f6a7144331baf4988c21.png\" alt=\"\u041c\u043e\u0434\u0443\u043b\u0438 MACVTAP \u0438 IPVTAP \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0441\u0435\u0442\u044c \u043f\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043e\u0434\u0438\u043d \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\" title=\"\u041c\u043e\u0434\u0443\u043b\u0438 MACVTAP \u0438 IPVTAP \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0441\u0435\u0442\u044c \u043f\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043e\u0434\u0438\u043d \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/710\/eeb\/c63\/710eebc63ea5f6a7144331baf4988c21.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/710\/eeb\/c63\/710eebc63ea5f6a7144331baf4988c21.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u041c\u043e\u0434\u0443\u043b\u0438 MACVTAP \u0438 IPVTAP \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0441\u0435\u0442\u044c \u043f\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043e\u0434\u0438\u043d \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c MACVTAP<\/strong><\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e MACVLAN\/IPVLAN \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442, \u0447\u0442\u043e\u0431\u044b \u0438 \u0433\u043e\u0441\u0442\u044c, \u0438 \u0445\u043e\u0441\u0442 \u0431\u044b\u043b\u0438 \u0432\u0438\u0434\u043d\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0430 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0435, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0445\u043e\u0441\u0442. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 MACVTAP \u0438 IPVTAP \u2014 \u0442\u0430 \u0436\u0435, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 MACVLAN \u0438 IPVLAN.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c MACVTAP<\/strong><\/p>\n<pre><code class=\"bash\">ip link add link eth0 name macvtap0 type macvtap<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"8\" id=\"8\"><\/a><\/p>\n<h3>MACsec<\/h3>\n<p>MACsec (Media Access Control Security) \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 IEEE \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 Ethernet-\u0441\u0435\u0442\u0435\u0439. \u041a\u0430\u043a \u0438 IPsec, MACsec \u2014 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 IP-\u0442\u0440\u0430\u0444\u0438\u043a, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u0430\u0444\u0438\u043a ARP (Address Resolution Protocol), neighbor discovery \u0438 DHCP (Dynamic Host Configuration Protocol). \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 MACsec \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/42a\/93c\/2db\/42a93c2dbd29b22f765b6075676ff1a2.png\" alt=\"MACsec \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 L2, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432 Ethernet-\u043a\u0430\u0434\u0440 \u0442\u0435\u0433 SecTag \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 (ICV) \u0438 \u0448\u0438\u0444\u0440\u0443\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443\" title=\"MACsec \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 L2, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432 Ethernet-\u043a\u0430\u0434\u0440 \u0442\u0435\u0433 SecTag \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 (ICV) \u0438 \u0448\u0438\u0444\u0440\u0443\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/42a\/93c\/2db\/42a93c2dbd29b22f765b6075676ff1a2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/42a\/93c\/2db\/42a93c2dbd29b22f765b6075676ff1a2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>MACsec \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 L2, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432 Ethernet-\u043a\u0430\u0434\u0440 \u0442\u0435\u0433 SecTag \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 (ICV) \u0438 \u0448\u0438\u0444\u0440\u0443\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c MACsec<\/strong><\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 MACsec \u2014 \u0437\u0430\u0449\u0438\u0442\u0430 \u0432\u0441\u0435\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f ARP, NS \u0438 DHCP.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fcd\/55b\/0e5\/fcd55b0e5b27c3ccd66463c033db023d.png\" alt=\"MACsec \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 macsec0 \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e eth0 \u0438 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f L2 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438\" title=\"MACsec \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 macsec0 \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e eth0 \u0438 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f L2 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fcd\/55b\/0e5\/fcd55b0e5b27c3ccd66463c033db023d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fcd\/55b\/0e5\/fcd55b0e5b27c3ccd66463c033db023d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>MACsec \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 macsec0 \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e eth0 \u0438 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f L2 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c MACsec<\/strong><\/p>\n<pre><code class=\"bash\">ip link add macsec0 link eth1 type macsec<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e macsec0 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 eth1. \u0414\u0435\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/developers.redhat.com\/blog\/2016\/10\/14\/macsec-a-different-solution-to-encrypt-network-traffic\/\">Configuration example \u0432\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e MACsec \u0421\u0430\u0431\u0440\u0438\u043d\u044b \u0414\u0443\u0431\u0440\u043e\u043a\u0430 (Sabrina Dubroca)<\/a>.<\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"9\" id=\"9\"><\/a><\/p>\n<h3>VETH<\/h3>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e VETH (virtual Ethernet) \u2014 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 Ethernet-\u0442\u0443\u043d\u043d\u0435\u043b\u044c. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041f\u0430\u043a\u0435\u0442\u044b, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0430\u0440\u044b, \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c. \u041a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0432\u0441\u0435\u0439 \u043f\u0430\u0440\u044b \u2014 down.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/422\/d79\/727\/422d79727a5387954f4508b7c1167ee9.png\" alt=\"\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 VETH \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0438 \u0438 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d \u0438\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0441 \u043c\u043e\u0441\u0442\u043e\u043c\" title=\"\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 VETH \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0438 \u0438 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d \u0438\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0441 \u043c\u043e\u0441\u0442\u043e\u043c\" width=\"2048\" height=\"1245\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/422\/d79\/727\/422d79727a5387954f4508b7c1167ee9.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/422\/d79\/727\/422d79727a5387954f4508b7c1167ee9.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 VETH \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0438 \u0438 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d \u0438\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0441 \u043c\u043e\u0441\u0442\u043e\u043c<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c VETH<\/strong><\/p>\n<p>bash<\/p>\n<pre><code>ip netns add net1ip netns add net2ip link add veth1 netns net1 type veth peer name veth2 netns net2<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0434\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, net1 \u0438 net2, \u0438 \u043f\u0430\u0440\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 VETH: veth1 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443 net1, veth2 \u2014 net2. \u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u044d\u0442\u043e\u0439 \u043f\u0430\u0440\u043e\u0439. \u041d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u0438\u043c IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u2014 \u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 ping.<\/p>\n<p><a class=\"anchor\" name=\"10\" id=\"10\"><\/a><\/p>\n<h3>Netkit<\/h3>\n<p>Netkit \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0447\u0435\u0440\u0435\u0437 BPF. \u041e\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 BPF-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u044e\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u043f\u043e\u0434\u043e\u0432: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 BPF \u0441\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0435 \u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0443, \u0447\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Netkit<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Netkit, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u0430 BPF-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0441\u0435\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c Netkit<\/strong><\/p>\n<p>\u041a\u0430\u043a \u0438 VETH, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e Netkit \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043f\u0430\u0440\u043e\u0439 (primary \u0438 peer). \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (\u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d \u0445\u043e\u0441\u0442\u0430) \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 BPF-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0438 \u0434\u043b\u044f \u043f\u0430\u0440\u043d\u043e\u0433\u043e. \u041f\u0430\u0440\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\/\u043f\u043e\u0434) \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0438 \u043d\u0435 \u043e\u0442\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 BPF-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 BPF-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u0437\u0430\u0434\u0430\u044e\u0442 \u043a\u0430\u043a pass \u0438\u043b\u0438 drop.<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 forwarding:<\/p>\n<pre><code class=\"bash\">ip link add type netkitip -d a<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<pre><code class=\"bash\">[...]7: nk0@nk1:  mtu 1500 qdisc noop state DOWN group default qlen 1000  link\/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 allmulti 0 minmtu 68 maxmtu 65535  netkit mode l3 type peer policy forward numtxqueues 1 numrxqueues 1 [...]8: nk1@nk0:  mtu 1500 qdisc noop state DOWN group default qlen 1000  link\/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 allmulti 0 minmtu 68 maxmtu 65535  netkit mode l3 type primary policy forward numtxqueues 1 numrxqueues 1 [...]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441 netns:<\/p>\n<pre><code class=\"bash\">ip netns add blueip link add nk0 type netkit peer nk1 netns blueip link set up nk0ip addr add 10.0.0.1\/24 dev nk0ip -n blue link set up nk1ip -n blue addr add 10.0.0.2\/24 dev nk1ping -c1 10.0.0.2<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<pre><code class=\"bash\">PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.021 ms<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0440\u0435\u0436\u0438\u043c L2. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"bash\">ip link add foo type netkit mode l2 forward peer blackhole barip -d a<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<pre><code class=\"bash\">[...]13: bar@foo:  mtu 1500 qdisc noop state DOWN group default qlen 1000   link\/ether 5e:5b:81:17:02:27 brd ff:ff:ff:ff:ff:ff promiscuity 0 allmulti 0 minmtu 68 maxmtu 65535   netkit mode l2 type peer policy blackhole numtxqueues 1 numrxqueues 1 [...]14: foo@bar:  mtu 1500 qdisc noop state DOWN group default qlen 1000   link\/ether de:01:a5:88:9e:99 brd ff:ff:ff:ff:ff:ff promiscuity 0 allmulti 0 minmtu 68 maxmtu 65535   netkit mode l2 type primary policy forward numtxqueues 1 numrxqueues 1 [...]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"11\" id=\"11\"><\/a><\/p>\n<h3>VCAN<\/h3>\n<p>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 loopback-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 VCAN (virtual CAN) \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 CAN (Controller Area Network) \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0438 \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0421\u0435\u0433\u043e\u0434\u043d\u044f CAN \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0432 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0442\u0440\u0430\u0441\u043b\u0438.<\/p>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u2014 \u0432 <a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/networking\/can.txt\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u0434\u0440\u0430 \u043f\u043e CAN.<\/a><\/p>\n<\/blockquote>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VCAN<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 VCAN, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 CAN \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0445\u043e\u0441\u0442\u0435.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c VCAN<\/strong><\/p>\n<pre><code class=\"bash\">ip link add dev vcan1 type vcan<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"12\" id=\"12\"><\/a><\/p>\n<h3>VXCAN<\/h3>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0443 VETH, VXCAN (\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e CAN) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c CAN-\u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 VCAN. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 VXCAN \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432: \u043f\u0430\u043a\u0435\u0442, \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0439 \u043e\u0434\u043d\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0430\u0440\u043d\u043e\u043c. VXCAN \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VXCAN<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 VXCAN, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c CAN-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c VXCAN<\/strong><\/p>\n<pre><code class=\"bash\">ip netns add net1ip netns add net2ip link add vxcan1 netns net1 type vxcan peer name vxcan2 netns net2<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> <a href=\"https:\/\/developers.redhat.com\/products\/rhel\/overview\">Red Hat Enterprise Linux <\/a>\u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 VXCAN.<\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"13\" id=\"13\"><\/a><\/p>\n<h3>IPOIB<\/h3>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e IPOIB \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b IP-over-InfiniBand: \u043e\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 IP-\u043f\u0430\u043a\u0435\u0442\u044b \u0447\u0435\u0440\u0435\u0437 InfiniBand (IB), \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f IB-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u043a\u0430\u0440\u0442\u0443.<\/p>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 IPOIB \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0434\u0432\u0443\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445: datagram \u0438 connected. \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 datagram \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 IB (UD). \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 connected \u2014 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f (RC), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c IB-\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 MTU \u0434\u043e 64 \u041a\u0411 \u2014 \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 IP-\u043f\u0430\u043a\u0435\u0442\u0430.<\/p>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u2014 \u0432 <a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/infiniband\/ipoib.txt\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u0434\u0440\u0430 \u043f\u043e IPOIB<\/a>.<\/p>\n<\/blockquote>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IPOIB<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 IPOIB, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c IB-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c \u0445\u043e\u0441\u0442\u043e\u043c \u043f\u043e IP.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c IPOIB<\/strong><\/p>\n<pre><code class=\"bash\">ip link add ib0 name ipoib0 type ipoib pkey IB_PKEY mode connected<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"14\" id=\"14\"><\/a><\/p>\n<h3>NLMON<\/h3>\n<p>NLMON \u2014 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Netlink.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c NLMON<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 NLMON, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c Netlink-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c NLMON<\/strong><\/p>\n<pre><code class=\"bash\">ip link add nlmon0 type nlmonip link set nlmon0 uptcpdump -i nlmon0 -w nlmsg.pcap<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e nlmon0 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0435\u0433\u043e. \u0414\u043b\u044f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 Netlink-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043d\u0438\u0444\u0444\u0435\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 tcpdump. \u0421\u0432\u0435\u0436\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Wireshark \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442 Netlink-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p><a class=\"anchor\" name=\"15\" id=\"15\"><\/a><\/p>\n<h3>Netconsole<\/h3>\n<p>netconsole \u2014 \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u044f\u0434\u0440\u0430 (dmesg) \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0438\u0445 \u043f\u043e \u0441\u0435\u0442\u0438.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c netconsole<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 netconsole \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0438 \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0439 \u044f\u0434\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0430 \u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u2014 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u043d\u0430 \u0434\u0438\u0441\u043a \u0438\u043b\u0438 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c) \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0438\u043b\u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u043e.<\/p>\n<p><strong>\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c netconsole<\/strong><\/p>\n<p>netconsole \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044f \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0438\u0445 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u044f\u0434\u0440\u0430. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"bash\">modprobe netconsole netconsole=@192.168.1.100\/eth0,@192.168.1.200\/6666<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c @192.168.1.100\/eth0 \u2014 IP-\u0430\u0434\u0440\u0435\u0441 \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430, @192.168.1.200\/6666 \u2014 IP-\u0430\u0434\u0440\u0435\u0441 \u0438 UDP-\u043f\u043e\u0440\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 netconsole \u043d\u0430 \u043b\u0435\u0442\u0443<\/strong><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0443\u0442\u044c \/sys\/module\/netconsole\/parameters\/.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<pre><code class=\"bash\">cat \/sys\/module\/netconsole\/parameters\/*<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043c\u0435\u043d\u0438\u0442\u044c IP \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"bash\">echo 192.168.1.200 &gt; \/sys\/module\/netconsole\/parameters\/remote_ip<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442:<\/p>\n<pre><code class=\"bash\">echo 6666 &gt; \/sys\/module\/netconsole\/parameters\/remote_port<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"16\" id=\"16\"><\/a><\/p>\n<h3>Dummy-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/h3>\n<p>Dummy-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0435\u043d, \u043a\u0430\u043a \u0438 loopback. \u041e\u043d \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0431\u0435\u0437 \u0438\u0445 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c dummy-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/strong><\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e dummy-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 SLIP (Serial Line Internet Protocol) \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c dummy-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/strong><\/p>\n<pre><code class=\"bash\">ip link add dummy1 type dummyip addr add 1.1.1.1\/24 dev dummy1ip link set dummy1 up<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"17\" id=\"17\"><\/a><\/p>\n<h3>Blackhole<\/h3>\n<p>Blackhole-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u043b\u0447\u0430 \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b. \u042d\u0442\u043e \/dev\/null \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430: \u043b\u044e\u0431\u043e\u0439 \u043f\u0430\u043a\u0435\u0442, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u043d\u0435\u0433\u043e, \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0431\u0435\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c blackhole-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 blackhole \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041e\u043d \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 DoS-\u0430\u0442\u0430\u043a \u2014 \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 IP \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u2014 \u0438 \u0434\u043b\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c blackhole-\u043c\u0430\u0440\u0448\u0440\u0443\u0442<\/strong><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 blackhole-\u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>ip route<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438:<\/p>\n<pre><code class=\"bash\">ip route add blackhole 192.168.1.0\/24<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>Blackhole \u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a<\/strong><\/p>\n<p>Blackhole \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0438 \u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a (PBR), \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430:<\/p>\n<pre><code class=\"bash\">ip rule add from 10.0.0.0\/8 table 100ip route add blackhole default table 100<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a, \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0438\u0437 10.0.0.0\/8, \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d.<\/p>\n<p><a class=\"anchor\" name=\"18\" id=\"18\"><\/a><\/p>\n<h3>IFB<\/h3>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 IFB (intermediate functional block) \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0448\u0435\u0439\u043f\u0438\u0442\u044c \u0435\u0433\u043e, \u0430 \u043d\u0435 \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IFB<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 IFB, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438 \u0448\u0435\u0439\u043f\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c IFB<\/strong><\/p>\n<pre><code class=\"bash\">ip link add ifb0 type ifbip link set ifb0 uptc qdisc add dev ifb0 root sfqtc qdisc add dev eth0 handle ffff: ingresstc filter add dev eth0 parent ffff: u32 match u32 0 0 action mirred egress redirect dev ifb0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e ifb0 \u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a qdisc \u043d\u0430 SFQ (Stochastic Fairness Queueing) \u2014 \u0431\u0435\u0441\u043a\u043b\u0430\u0441\u0441\u043e\u0432\u044b\u0439 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439. \u0417\u0430\u0442\u0435\u043c \u043d\u0430 eth0 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ingress-\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a, \u0438 \u0432\u0435\u0441\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 ifb0.<\/p>\n<blockquote>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f IFB qdisc \u2014 \u0432 <a href=\"https:\/\/wiki.linuxfoundation.org\/networking\/ifb\">\u0432\u0438\u043a\u0438 Linux Foundation \u043f\u043e IFB<\/a>.<\/p>\n<\/blockquote>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 IFB \u0443\u0436\u0435 \u0440\u0435\u0434\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f. \u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 tc qdisc clsact \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"19\" id=\"19\"><\/a><\/p>\n<h3>netdevsim<\/h3>\n<p>netdevsim \u2014 \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 API.<\/p>\n<p><strong>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c netdevsim<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 netdevsim \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u0435\u0437 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043e\u0444\u043b\u043e\u0430\u0434\u0430, BPF-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c tc \u0438 XDP, \u0430 \u0442\u0430\u043a\u0436\u0435 SR-IOV (Single Root I\/O Virtualization).<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c netdevsim<\/strong><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e netdevsim, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e (\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439) \u0447\u0435\u0440\u0435\u0437 echo \u043d\u0430 \u0448\u0438\u043d\u0443. \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e netdevsim0 \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0438 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044f\u043c\u0438 \u043d\u0430 \u043f\u043e\u0440\u0442:<\/p>\n<pre><code class=\"bash\">modprobe netdevsimecho \"0 2 4\" &gt; \/sys\/bus\/netdevsim\/new_device<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b \u0438 \u0438\u0445 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 <code>ip link<\/code> \u0438 <code>ethtool<\/code>:<\/p>\n<pre><code class=\"bash\">ls \/sys\/bus\/netdevsim\/devices\/netdevsim0\/net\/<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<pre><code class=\"bash\">eni0np1 eni0np2<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043e\u0444\u043b\u043e\u0430\u0434\u0430<\/strong><\/p>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e netdevsim \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043e\u0444\u043b\u043e\u0430\u0434\u0430: TSO (TCP Segmentation Offload), GSO (Generic Segmentation Offload) \u0438 IPsec ESP. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 ethtool:<\/p>\n<pre><code class=\"bash\">ethtool -k eni0np1 | grep esp<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043e\u0444\u043b\u043e\u0430\u0434 tc (Traffic Control) \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 BPF-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b XDP (eXpress Data Path), \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u0444\u043b\u043e\u0430\u0434\u0430:<\/p>\n<pre><code class=\"bash\">ethtool -K eni0np1 hw-tc-offload onip link set dev eni0np1 xdpoffload obj prog.o<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 SR-IOV \u0438 devlink<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f SR-IOV \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (VF) \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u0438\u043c MAC-\u0430\u0434\u0440\u0435\u0441\u0430:<\/p>\n<pre><code class=\"bash\">echo 2 &gt; \/sys\/bus\/netdevsim\/devices\/netdevsim0\/sriov_numvfsip link set eni0np1 vf 0 mac 00:11:22:33:44:55<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423\u0442\u0438\u043b\u0438\u0442\u0430 devlink \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b FIB (Forwarding Information Base):<\/p>\n<pre><code class=\"bash\">devlink dev info netdevsim\/netdevsim0devlink resource show netdevsim\/netdevsim0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e netdevsim \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 <a href=\"https:\/\/developers.redhat.com\/products\/rhel\/overview\">Red Hat Enterprise Linux<\/a>.<\/p>\n<\/blockquote>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1066398\/\">https:\/\/habr.com\/ru\/articles\/1066398\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0442\u0438 \u2014 \u043d\u0430 \u043d\u0438\u0445 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d (\u0412\u041c), \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0441\u0440\u0435\u0434. \u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432: \u0447\u0435\u043c \u043e\u043d\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0438 \u043a\u0430\u043a \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c. \u0421\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043a\u043e\u0434\u0430. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0441\u0435\u0442\u0435\u0439. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0443\u0442\u0430\u044e\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439.\u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ip link \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 iproute2. \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u0442 root.\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443:Bridge (\u043c\u043e\u0441\u0442)Bonded-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439)VLAN (Virtual LAN)VXLAN (Virtual eXtensible Local Area Network)MACVLANIPVLANMACVTAP\/IPVTAPMACsec (Media Access Control Security)VETH (Virtual Ethernet)NetkitVCAN (\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 CAN)VXCAN (\u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e CAN)IPOIB (IP-over-InfiniBand)NLMON (NetLink MONitor)NetconsoleDummy-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441Blackhole-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441IFB (Intermediate Functional Block)netdevsim\u041e \u0442\u0443\u043d\u043d\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u00abAn introduction to Linux virtual interfaces: Tunnels\u00bb.Bridge\u041c\u043e\u0441\u0442 \u0432 Linux \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u041e\u0431\u044b\u0447\u043d\u043e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445 \u0438 \u0448\u043b\u044e\u0437\u0430\u0445 \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0412\u041c \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d (network namespaces) \u043d\u0430 \u0445\u043e\u0441\u0442\u0435. \u041c\u043e\u0441\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b STP (Spanning Tree Protocol), \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e VLAN \u0438 multicast snooping.\u041c\u043e\u0441\u0442 Linux (br0) \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u044c\u044e \u2014 \u0412\u041c \u0447\u0435\u0440\u0435\u0437 tap-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0447\u0435\u0440\u0435\u0437 veth-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0441\u0442\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u043e\u0441\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0412\u041c \u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432) \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0438\u043b\u0438 \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u044c\u044e \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043e\u043d\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0443.\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043e\u0441\u0442 \u0432 Linux\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0441\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ip link:sudo ip link add br0 type bridgesudo ip link set br0 up\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0440\u0442 \u0432 \u043c\u043e\u0441\u0442:sudo ip link set eth0 master br0Spanning Tree Protocol (STP)\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b STP \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e Ethernet-\u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u043f\u0435\u0442\u0435\u043b\u044c, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044f \u0437\u0430\u043a\u043e\u043b\u044c\u0446\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0441\u0442\u043e\u0432 \u0438 \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0442\u043e\u0440\u043c\u044b. \u041c\u043e\u0441\u0442 Linux \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b RSTP (Rapid Spanning Tree Protocol) \u0438 MSTP (Multiple Spanning Tree Protocol). \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c STP \u043d\u0430 \u043c\u043e\u0441\u0442\u0443, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:baship link set br0 type bridge stp_state 1\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 multicast\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043c\u043e\u0441\u0442\u0430 Linux \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443: \u043e\u043d \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 IGMP (Internet Group Management Protocol) \u0438 MLD (Multicast Listener Discovery), \u0447\u0442\u043e\u0431\u044b \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f IGMPv2\/IGMPv3 \u0438 MLDv1\/MLDv2. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c multicast snooping \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 IGMP\/MLD:ip link set br0 mcast_snooping 1ip link set br0 mcast_querier 1\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f VLAN\u041c\u043e\u0441\u0442 Linux \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u0433\u0438 VLAN \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u2014 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e VLAN \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u043f\u043e\u0440\u0442\u0430\u043c VLAN ID 2:ip link set br0 type bridge vlan_filtering 1ip link set eth1 master br0bridge vlan add dev eth1 vid 2 pvid untagged\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 pvid \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u0433\u0438 VLAN 2 \u043d\u0435\u0442\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u0430\u0434\u0440\u0430\u043c \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 (\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a). \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 untagged \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u0433\u0438 VLAN 2 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 (\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a).\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 STP \u0438 multicast \u2014 \u0432 ip link help bridge \u0438 man-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 ip-link. \u041e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 VLAN \u2014 \u0432 bridge help \u0438 man bridge.\u041c\u043e\u0441\u0442 Linux \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 (FDB) \u0438 \u0431\u0430\u0437\u0435 \u043c\u043d\u043e\u0433\u043e\u0430\u0434\u0440\u0435\u0441\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f (MDB). \u0421\u0440\u0435\u0434\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u2014 MAC Authentication Bypass (MAB), IEEE 802.11 Proxy ARP \u0438 switchdev. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u2014 \u0432 man-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 bridge \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u0434\u0440\u0430 \u043f\u043e \u043c\u043e\u0441\u0442\u0430\u043c.Bonded-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0414\u0440\u0430\u0439\u0432\u0435\u0440 bonding \u0432 Linux \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430: \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u044d\u0442\u043e \u0433\u043e\u0440\u044f\u0447\u0438\u0439 \u0440\u0435\u0437\u0435\u0440\u0432 (hot standby) \u0438\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bond0 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b eth0 \u0438 eth1 \u0432 \u043e\u0434\u043d\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0443\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c bonded-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u0430\u043d\u0430\u043b\u0430 \u0438\u043b\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430.\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c bonded-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441ip link add bond1 type bond miimon 100 mode active-backupip link set eth0 master bond1ip link set eth1 master bond1\u042d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 bond1 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 active-backup. \u0414\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044f\u0434\u0440\u0430.\u0414\u0440\u0430\u0439\u0432\u0435\u0440 net_failover \u2014 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041e\u043d \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, pass-through \u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, VF) \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.\u0414\u0440\u0430\u0439\u0432\u0435\u0440 net_failover \u0432\u043d\u0443\u0442\u0440\u0438 \u0412\u041c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c VF-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c (eth1) \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c (eth0)VLAN\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c (VLAN) \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u043c\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0421 VLAN \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044e\u0442 \u0445\u043e\u0441\u0442\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a VLAN.\u0422\u0435\u0433 802.1Q \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 Ethernet-\u043a\u0430\u0434\u0440 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 VLAN \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VLAN\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 VLAN, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0412\u041c, \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u043d \u0438\u043b\u0438 \u0445\u043e\u0441\u0442\u0430\u043c\u0438.\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c VLANip link add link eth0 name eth0.2 type vlan id 2ip link add link eth0 name eth0.3 type vlan id 3\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 VLAN 2 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c eth0.2 \u0438 VLAN 3 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c eth0.3.\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth0 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b eth0.2 \u0438 eth0.3 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 VLAN ID\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 VLAN \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0445\u043e\u0441\u0442, \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0435\u0433\u0430\u043c\u0438 VLAN. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u043e\u0440\u0442 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c trunk.VXLANVXLAN (Virtual eXtensible Local Area Network) \u2014 \u0442\u0443\u043d\u043d\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0441\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432 4 096 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 VLAN \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 IEEE 802.1Q. \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0432 IETF RFC 7348.VXLAN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 24-\u0431\u0438\u0442\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 \u2014 VNI (VXLAN network identifier). \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0434\u043e 16 777 216 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u2014 \u0432 4 096 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e VLAN.VXLAN \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0434\u0440\u044b \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (L2) \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c VXLAN \u0432 \u043f\u0430\u043a\u0435\u0442 UDP-IP, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435.VXLAN \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 Ethernet-\u043a\u0430\u0434\u0440\u044b L2 \u0432 \u043f\u0430\u043a\u0435\u0442 UDP-IP, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f 24-\u0431\u0438\u0442\u043d\u044b\u0439 VNI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VXLAN\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 VXLAN, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b 4 096 VLAN \u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0432\u0435\u0440\u043b\u0435\u0439\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445. VXLAN \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0432 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0430\u0445 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u0430\u0445, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0442\u043e\u0439\u043a\u0430\u043c.\u0412 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0435 VXLAN \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c L2, \u0442\u0443\u043d\u043d\u0435\u043b\u0438\u0440\u0443\u044f \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 (vx0) \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c VXLANip link add vx0 type vxlan id 100 local 1.1.1.1 remote 2.2.2.2 dev eth0 dstport 4789\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u044f\u0434\u0440\u0430 \u043f\u043e VXLAN \u0438\u043b\u0438 \u0432\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043e VXLAN.MACVLAN\u0421 VLAN \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u043e \u0442\u0435\u0433\u0443 VLAN. \u0421 MACVLAN \u2014 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (\u0442\u043e \u0435\u0441\u0442\u044c MAC-\u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 Ethernet) \u043f\u043e\u0432\u0435\u0440\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e.\u0414\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f MACVLAN, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0412\u041c \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 TAP \u0438\u043b\u0438 VETH \u0438 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0438\u0445 \u043a \u043c\u043e\u0441\u0442\u0443 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u2014 \u043c\u043e\u0441\u0442 (br0) \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d \u0441 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c\u0421 MACVLAN \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c \u0438\u043c\u0435\u043d \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0431\u0435\u0437 \u043c\u043e\u0441\u0442\u0430.MACVLAN \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u0435\u043a \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 eth0 \u0431\u0435\u0437 \u043c\u043e\u0441\u0442\u0430\u0423 MACVLAN \u043f\u044f\u0442\u044c \u0440\u0435\u0436\u0438\u043c\u043e\u0432.Private. \u0420\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043e\u0431\u043c\u0435\u043d \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 MACVLAN \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u2014 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c hairpin.\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 private \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e eth0VEPA. \u0414\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 MACVLAN \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0414\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b \u0440\u0435\u0436\u0438\u043c hairpin, \u043b\u0438\u0431\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u043b TCP\/IP-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440.\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 VEPA (Virtual Ethernet Port Aggregator) \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 MACVLAN \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043cBridge. \u0412\u0441\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u043e\u0441\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 bridge \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u044f \u0445\u043e\u0441\u0442Passthru. \u0420\u0435\u0436\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u0412\u041c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443.\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 passthru \u043e\u0434\u0438\u043d \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 eth0, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439Source. \u0420\u0435\u0436\u0438\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 MAC-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0438 VLAN \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 MAC. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u2014 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0430.\u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u043f\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0443. \u0421\u0430\u043c\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u2014 bridge.\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c MACVLAN\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 MACVLAN, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u044f\u043c\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438.\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c MACVLANip link add macvlan1 link eth0 type macvlan mode bridgeip netns add net1ip link set macvlan1 netns net1\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e MACVLAN \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 bridge \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0435\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443 \u0438\u043c\u0435\u043d.IPVLANIPVLAN \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 MACVLAN, \u043d\u043e \u0435\u0433\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u043e\u0431\u0449\u0438\u0439 MAC-\u0430\u0434\u0440\u0435\u0441.MACVLAN \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 MAC-\u0430\u0434\u0440\u0435\u0441, \u0430 \u0432 IPVLAN \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0435\u043b\u044f\u0442 MAC-\u0430\u0434\u0440\u0435\u0441 \u0441 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043cIPVLAN \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c\u044b L2 \u0438 L3. \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L2 IPVLAN \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a MACVLAN \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 bridge: \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043c\u043e\u0441\u0442 \u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440.\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L2 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (eth0) \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u043e\u0441\u0442, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L3 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440: \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0443\u044e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c.\u0412 \u0440\u0435\u0436\u0438\u043c\u0435 L3 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (eth0) \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0435\u0442\u044c\u044e\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IPVLAN\u0412&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-489664","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/489664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=489664"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/489664\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=489664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=489664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=489664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}