{"id":463419,"date":"2025-06-15T09:00:05","date_gmt":"2025-06-15T09:00:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=463419"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=463419","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 VLAN \u043d\u0430 MikroTik \u0431\u0435\u0437 \u043b\u0438\u0440\u0438\u043a\u0438 [ROS7]<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h3>\n<ul>\n<li>\n<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f R1 (\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440)<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f S1 (\u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440)<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f MikroTik<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0423\u0440\u043e\u0432\u0435\u043d\u044c: CCNA+<\/strong><\/p>\n<p>\u0411\u0435\u0437 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 VLAN, trunk \u0438 \u0437\u0430\u0447\u0435\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e. \u0421\u0440\u0430\u0437\u0443 \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c.<\/p>\n<p><em>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u043c\u0438 VLAN \u0438 trunk-\u043f\u043e\u0440\u0442\u043e\u0432. \u0421\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 MikroTik \u0441 RouterOS 7. <\/em><\/p>\n<div class=\"floating-image\">\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443 <strong>Router-on-a-Stick<\/strong> \u043d\u0430 MikroTik  \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0432\u0443\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<\/div>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">VLAN ID<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u043e\u0434\u0441\u0435\u0442\u044c<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">10<\/p>\n<\/td>\n<td>\n<p align=\"left\">192.168.10.0\/24<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">20<\/p>\n<\/td>\n<td>\n<p align=\"left\">192.168.20.0\/24<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u0442\u044c \u043a\u0430\u0441\u0441 \u0438 \u0441\u043a\u0430\u043d\u0435\u0440\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">30<\/p>\n<\/td>\n<td>\n<p align=\"left\">192.168.30.0\/24<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u0442\u044c \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<ul>\n<li>\n<p><strong>R1<\/strong> \u2014  \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440-VLAN \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0430\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (802.1Q).  <\/p>\n<\/li>\n<li>\n<p><strong>S1<\/strong> \u2014  \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b trunk-\u043f\u043e\u0440\u0442\u044b \u043a \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0443, \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0443, edge-\u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>S2<\/strong> \u2014  \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 D-Link, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e \u0432 VLAN 30. <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/21c\/522\/2c2\/21c5222c2f929c1a9f11e8f0aa658de6.png\" alt=\"\u0422\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u0435\u0442\u0438\" title=\"\u0422\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u0435\u0442\u0438\" width=\"1081\" height=\"444\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/21c\/522\/2c2\/21c5222c2f929c1a9f11e8f0aa658de6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/21c\/522\/2c2\/21c5222c2f929c1a9f11e8f0aa658de6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0422\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u0435\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b:<\/h3>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 VLAN \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u0437 \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043c\u0435\u0436\u0434\u0443 VLAN \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 R1 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0438\u0437 VLAN 10 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043a\u0430\u0441\u0441\u043e\u0432\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u0438\u0437 VLAN 20).<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 VLAN 10.<\/p>\n<\/li>\n<li>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f VLAN, \u043a\u0430\u0436\u0434\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445, \u0447\u0442\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433 R1:<\/h3>\n<blockquote>\n<p><em>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0440\u0438\u0434\u0436, \u0443\u043c\u0435\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 VLAN:<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge add arp=reply-only arp-timeout=30s frame-types=admit-only-vlan-tagged name=bridge1 vlan-filtering=yes<\/code><\/p>\n<p><em>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <\/em><code><em>arp=reply-only<\/em><\/code><em>, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c ARP-\u0441\u043f\u0443\u0444\u0438\u043d\u0433 \u0438 \u044f\u0432\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c ARP \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. <\/em><\/p>\n<blockquote>\n<p><em>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0431\u0440\u0438\u0434\u0436 ether5 \u043a\u0430\u043a downlink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 S1:<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=ether5<\/code><\/p>\n<blockquote>\n<p><em>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443\u0436\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043c VLAN-\u044b \u043d\u0430 \u0441\u0430\u043c \u0431\u0440\u0438\u0434\u0436 \u0438 ether5:<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge vlan<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5 vlan-ids=10<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5 vlan-ids=20<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5 vlan-ids=30<\/code><\/p>\n<blockquote>\n<p><em>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c VLAN \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0433\u0434\u0435 vlan.10 &#8212; VLAN \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043c \u0438\u0445 \u043d\u0430 bridge1<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface vlan<\/code><\/p>\n<p><code>add interface=bridge1 name=vlan.10 vlan-id=10<\/code><\/p>\n<p><code>add interface=bridge1 name=vlan.20 vlan-id=20<\/code><\/p>\n<p><code>add interface=bridge1 name=vlan.30 vlan-id=30<\/code><\/p>\n<blockquote>\n<p><em>\u041d\u0430\u0437\u043d\u0430\u0447\u0438\u043c ip-\u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0430 VLAN \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b:<\/em><\/p>\n<\/blockquote>\n<p><code>\/ip address<\/code><\/p>\n<p><code>add address=192.168.10.1\/24 interface=vlan.10 network=192.168.10.0<\/code><\/p>\n<p><code>add address=192.168.20.1\/24 interface=vlan.20 network=192.168.20.0<\/code><\/p>\n<p><code>add address=192.168.30.1\/24 interface=vlan.30 network=192.168.30.0<\/code><\/p>\n<blockquote>\n<p><em>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 R1 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u0435\u0442\u0438 192.168.10.0\/24<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface list add name=mgmt<\/code><\/p>\n<p><code>\/interface list member add interface=vlan.10 list=mgmt<\/code><\/p>\n<p><code>\/ip firewall filter<\/code><\/p>\n<p><code>add action=accept chain=input comment=\"allow mgmt to router\" connection-state=new dst-port=22,8291 in-interface-list=mgmt protocol=tcp<\/code><\/p>\n<p><code>add action=reject chain=input comment=\"reject mgmt to router\" connection-state=new dst-port=22,8291 in-interface-list=!mgmt log=yes log-prefix=\"unauthorized access blocked\" protocol=tcp \\ reject-with=tcp-reset<\/code><\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433 S1:<\/h3>\n<blockquote>\n<p><em>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0440\u0438\u0434\u0436:<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge add arp=enabled arp-timeout=30s frame-types=admit-only-vlan-tagged name=bridge1 vlan-filtering=yes<\/code><\/p>\n<blockquote>\n<p><em>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0431\u0440\u0438\u0434\u0436 \u043f\u043e\u0440\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/em><\/p>\n<\/blockquote>\n<p>uplink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 R1: <code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=ether5<\/code><\/p>\n<p>downlink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 S2: <code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=ether4<\/code><\/p>\n<p>edge \u043f\u043e\u0440\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043a\u0430\u0441\u0441: <code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether2 pvid=20<\/code><\/p>\n<p>edge \u043f\u043e\u0440\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 admin-\u043f\u043a: <code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether1 pvid=10<\/code><\/p>\n<blockquote>\n<p><em>\u041d\u0430\u0437\u043d\u0430\u0447\u0438\u043c VLAN-\u044b \u043d\u0430 \u0431\u0440\u0438\u0434\u0436 \u0438 \u043f\u043e\u0440\u0442\u044b, \u0433\u0434\u0435 ether5 &#8212; uplink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 R1, ether4 &#8212; downlink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 S2, \u0430 ether1,2 &#8212; \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge vlan<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5,ether4 untagged=ether1 vlan-ids=10<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5 untagged=ether2 vlan-ids=20<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5,ether4 vlan-ids=30<\/code><\/p>\n<blockquote>\n<p><em>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c VLAN \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface vlan<\/code><\/p>\n<p><code>add interface=bridge1 name=vlan.10 vlan-id=10<\/code><\/p>\n<blockquote>\n<p><em>\u041d\u0430\u0437\u043d\u0430\u0447\u0438\u043c ip \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0438\u0437 \u0441\u0435\u0442\u0438 192.168.10.0\/24<\/em><\/p>\n<\/blockquote>\n<p><code>\/ip address add address=192.168.10.254\/24 interface=vlan.10 network=192.168.10.0<\/code><\/p>\n<blockquote>\n<p><em>\u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0434\u043e R1<\/em><\/p>\n<\/blockquote>\n<p><code>\/ip route add disabled=no distance=1 dst-address=0.0.0.0\/0 gateway=192.168.10.1 pref-src=\"\" routing-table=main scope=30 suppress-hw-offload=no target-scope=1<\/code><\/p>\n<blockquote>\n<p><em>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u043d\u0433\u043e\u0432\u0430\u0442\u044c R1:<\/em><\/p>\n<\/blockquote>\n<p><code>ping 192.168.10.1 interface=vlan.10<\/code><\/p>\n<p><code>SEQ HOST SIZE TTL TIME STATUS<\/code><\/p>\n<p><code>0 192.168.10.1 56 64 702us<\/code><\/p>\n<p><code>1 192.168.10.1 56 64 715us<\/code><\/p>\n<p><code>2 192.168.10.1 56 64 630us<\/code><\/p>\n<p><code>3 192.168.10.1 56 64 638us<\/code><\/p>\n<p><code>sent=4 received=4 packet-loss=0% min-rtt=630us avg-rtt=671us max-rtt=715us<\/code><\/p>\n<blockquote>\n<p><em>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u0435\u0442\u0438 192.168.10.0\/24<\/em><\/p>\n<\/blockquote>\n<p><code>\/ip service<\/code><\/p>\n<p><code>set ssh address=192.168.10.0\/24<\/code><\/p>\n<p><code>set winbox address=192.168.10.0\/24<\/code><\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/h3>\n<p><em>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f <\/em><strong><em>S2<\/em><\/strong><em> \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0414\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u0435\u0433\u0438 VLAN 10 (\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435) \u0438 VLAN 30 (\u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f).<\/em><\/p>\n<h3>P.S. \u0438\u043b\u0438 \u0432\u0430\u0436\u043d\u043e\u0435 \u041d\u041e\u2026<\/h3>\n<p>\u041d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 MikroTik (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, RB2011, RB951) bridge \u0441 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c vlan-filtering\u00a0<strong>\u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 switch-\u0447\u0438\u043f<\/strong>, \u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 CPU. \u042d\u0442\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u0414\u043b\u044f \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 VLAN \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>\/interface ethernet switch<\/code>\u00a0(\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 switch).<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0433\u0438\u0431\u043a\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u044c,<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0437\u043e\u043d\u0430\u043c\u0438,<\/p>\n<\/li>\n<li>\n<p>\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 VLAN.<\/p>\n<\/li>\n<\/ul>\n<h3>FAQ<\/h3>\n<p><a href=\"https:\/\/help.mikrotik.com\/docs\/spaces\/ROS\/pages\/88014957\/VLAN\" rel=\"noopener noreferrer nofollow\"> \u041e\u0431\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 VLAN \u0432 RouterOS: \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438<\/a><\/p>\n<p> <a href=\"https:\/\/help.mikrotik.com\/docs\/spaces\/ROS\/pages\/103841826\/Basic+VLAN+switching\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 VLAN-\u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u0441 bridge \u0438 switch-chip \u0432 RouterOS<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/918456\/\"> https:\/\/habr.com\/ru\/articles\/918456\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h3>\n<ul>\n<li>\n<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f R1 (\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440)<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f S1 (\u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440)<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f MikroTik<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0423\u0440\u043e\u0432\u0435\u043d\u044c: CCNA+<\/strong><\/p>\n<p>\u0411\u0435\u0437 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 VLAN, trunk \u0438 \u0437\u0430\u0447\u0435\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e. \u0421\u0440\u0430\u0437\u0443 \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c.<\/p>\n<p><em>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u043c\u0438 VLAN \u0438 trunk-\u043f\u043e\u0440\u0442\u043e\u0432. \u0421\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 MikroTik \u0441 RouterOS 7. <\/em><\/p>\n<div class=\"floating-image\">\n<p><strong>\u0426\u0435\u043b\u044c:<\/strong> \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443 <strong>Router-on-a-Stick<\/strong> \u043d\u0430 MikroTik  \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0432\u0443\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<\/div>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">VLAN ID<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u043e\u0434\u0441\u0435\u0442\u044c<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">10<\/p>\n<\/td>\n<td>\n<p align=\"left\">192.168.10.0\/24<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">20<\/p>\n<\/td>\n<td>\n<p align=\"left\">192.168.20.0\/24<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u0442\u044c \u043a\u0430\u0441\u0441 \u0438 \u0441\u043a\u0430\u043d\u0435\u0440\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">30<\/p>\n<\/td>\n<td>\n<p align=\"left\">192.168.30.0\/24<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u0442\u044c \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<ul>\n<li>\n<p><strong>R1<\/strong> \u2014  \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440-VLAN \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0430\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (802.1Q).  <\/p>\n<\/li>\n<li>\n<p><strong>S1<\/strong> \u2014  \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b trunk-\u043f\u043e\u0440\u0442\u044b \u043a \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0443, \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0443, edge-\u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>S2<\/strong> \u2014  \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440 D-Link, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e \u0432 VLAN 30. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0422\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u0435\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b:<\/h3>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 VLAN \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u0437 \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043c\u0435\u0436\u0434\u0443 VLAN \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 R1 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0438\u0437 VLAN 10 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043a\u0430\u0441\u0441\u043e\u0432\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u0438\u0437 VLAN 20).<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 VLAN 10.<\/p>\n<\/li>\n<li>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f VLAN, \u043a\u0430\u0436\u0434\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445, \u0447\u0442\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433 R1:<\/h3>\n<blockquote>\n<p><em>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0440\u0438\u0434\u0436, \u0443\u043c\u0435\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 VLAN:<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge add arp=reply-only arp-timeout=30s frame-types=admit-only-vlan-tagged name=bridge1 vlan-filtering=yes<\/code><\/p>\n<p><em>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <\/em><code><em>arp=reply-only<\/em><\/code><em>, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c ARP-\u0441\u043f\u0443\u0444\u0438\u043d\u0433 \u0438 \u044f\u0432\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c ARP \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. <\/em><\/p>\n<blockquote>\n<p><em>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0431\u0440\u0438\u0434\u0436 ether5 \u043a\u0430\u043a downlink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 S1:<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=ether5<\/code><\/p>\n<blockquote>\n<p><em>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443\u0436\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043c VLAN-\u044b \u043d\u0430 \u0441\u0430\u043c \u0431\u0440\u0438\u0434\u0436 \u0438 ether5:<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge vlan<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5 vlan-ids=10<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5 vlan-ids=20<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5 vlan-ids=30<\/code><\/p>\n<blockquote>\n<p><em>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c VLAN \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0433\u0434\u0435 vlan.10 &#8212; VLAN \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043c \u0438\u0445 \u043d\u0430 bridge1<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface vlan<\/code><\/p>\n<p><code>add interface=bridge1 name=vlan.10 vlan-id=10<\/code><\/p>\n<p><code>add interface=bridge1 name=vlan.20 vlan-id=20<\/code><\/p>\n<p><code>add interface=bridge1 name=vlan.30 vlan-id=30<\/code><\/p>\n<blockquote>\n<p><em>\u041d\u0430\u0437\u043d\u0430\u0447\u0438\u043c ip-\u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0430 VLAN \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b:<\/em><\/p>\n<\/blockquote>\n<p><code>\/ip address<\/code><\/p>\n<p><code>add address=192.168.10.1\/24 interface=vlan.10 network=192.168.10.0<\/code><\/p>\n<p><code>add address=192.168.20.1\/24 interface=vlan.20 network=192.168.20.0<\/code><\/p>\n<p><code>add address=192.168.30.1\/24 interface=vlan.30 network=192.168.30.0<\/code><\/p>\n<blockquote>\n<p><em>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 R1 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u0435\u0442\u0438 192.168.10.0\/24<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface list add name=mgmt<\/code><\/p>\n<p><code>\/interface list member add interface=vlan.10 list=mgmt<\/code><\/p>\n<p><code>\/ip firewall filter<\/code><\/p>\n<p><code>add action=accept chain=input comment=\"allow mgmt to router\" connection-state=new dst-port=22,8291 in-interface-list=mgmt protocol=tcp<\/code><\/p>\n<p><code>add action=reject chain=input comment=\"reject mgmt to router\" connection-state=new dst-port=22,8291 in-interface-list=!mgmt log=yes log-prefix=\"unauthorized access blocked\" protocol=tcp \\ reject-with=tcp-reset<\/code><\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433 S1:<\/h3>\n<blockquote>\n<p><em>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0440\u0438\u0434\u0436:<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge add arp=enabled arp-timeout=30s frame-types=admit-only-vlan-tagged name=bridge1 vlan-filtering=yes<\/code><\/p>\n<blockquote>\n<p><em>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0431\u0440\u0438\u0434\u0436 \u043f\u043e\u0440\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/em><\/p>\n<\/blockquote>\n<p>uplink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 R1: <code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=ether5<\/code><\/p>\n<p>downlink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 S2: <code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=ether4<\/code><\/p>\n<p>edge \u043f\u043e\u0440\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043a\u0430\u0441\u0441: <code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether2 pvid=20<\/code><\/p>\n<p>edge \u043f\u043e\u0440\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 admin-\u043f\u043a: <code>\/interface bridge port add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=ether1 pvid=10<\/code><\/p>\n<blockquote>\n<p><em>\u041d\u0430\u0437\u043d\u0430\u0447\u0438\u043c VLAN-\u044b \u043d\u0430 \u0431\u0440\u0438\u0434\u0436 \u0438 \u043f\u043e\u0440\u0442\u044b, \u0433\u0434\u0435 ether5 &#8212; uplink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 R1, ether4 &#8212; downlink \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 S2, \u0430 ether1,2 &#8212; \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface bridge vlan<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5,ether4 untagged=ether1 vlan-ids=10<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5 untagged=ether2 vlan-ids=20<\/code><\/p>\n<p><code>add bridge=bridge1 tagged=bridge1,ether5,ether4 vlan-ids=30<\/code><\/p>\n<blockquote>\n<p><em>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c VLAN \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c<\/em><\/p>\n<\/blockquote>\n<p><code>\/interface vlan<\/code><\/p>\n<p><code>add interface=bridge1 name=vlan.10 vlan-id=10<\/code><\/p>\n<blockquote>\n<p><em>\u041d\u0430\u0437\u043d\u0430\u0447\u0438\u043c ip \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0438\u0437 \u0441\u0435\u0442\u0438 192.168.10.0\/24<\/em><\/p>\n<\/blockquote>\n<p><code>\/ip address add address=192.168.10.254\/24 interface=vlan.10 network=192.168.10.0<\/code><\/p>\n<blockquote>\n<p><em>\u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0434\u043e R1<\/em><\/p>\n<\/blockquote>\n<p><code>\/ip route add disabled=no distance=1 dst-address=0.0.0.0\/0 gateway=192.168.10.1 pref-src=\"\" routing-table=main scope=30 suppress-hw-offload=no target-scope=1<\/code><\/p>\n<blockquote>\n<p><em>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u043d\u0433\u043e\u0432\u0430\u0442\u044c R1:<\/em><\/p>\n<\/blockquote>\n<p><code>ping 192.168.10.1 interface=vlan.10<\/code><\/p>\n<p><code>SEQ HOST SIZE TTL TIME STATUS<\/code><\/p>\n<p><code>0 192.168.10.1 56 64 702us<\/code><\/p>\n<p><code>1 192.168.10.1 56 64 715us<\/code><\/p>\n<p><code>2 192.168.10.1 56 64 630us<\/code><\/p>\n<p><code>3 192.168.10.1 56 64 638us<\/code><\/p>\n<p><code>sent=4 received=4 packet-loss=0% min-rtt=630us avg-rtt=671us max-rtt=715us<\/code><\/p>\n<blockquote>\n<p><em>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u0435\u0442\u0438 192.168.10.0\/24<\/em><\/p>\n<\/blockquote>\n<p><code>\/ip service<\/code><\/p>\n<p><code>set ssh address=192.168.10.0\/24<\/code><\/p>\n<p><code>set winbox address=192.168.10.0\/24<\/code><\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/h3>\n<p><em>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f <\/em><strong><em>S2<\/em><\/strong><em> \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0414\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u0435\u0433\u0438 VLAN 10 (\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435) \u0438 VLAN 30 (\u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f).<\/em><\/p>\n<h3>P.S. \u0438\u043b\u0438 \u0432\u0430\u0436\u043d\u043e\u0435 \u041d\u041e\u2026<\/h3>\n<p>\u041d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 MikroTik (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, RB2011, RB951) bridge \u0441 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c vlan-filtering\u00a0<strong>\u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 switch-\u0447\u0438\u043f<\/strong>, \u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 CPU. \u042d\u0442\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u0414\u043b\u044f \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 VLAN \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>\/interface ethernet switch<\/code>\u00a0(\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 switch).<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0433\u0438\u0431\u043a\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u044c,<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0437\u043e\u043d\u0430\u043c\u0438,<\/p>\n<\/li>\n<li>\n<p>\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 VLAN.<\/p>\n<\/li>\n<\/ul>\n<h3>FAQ<\/h3>\n<p><a href=\"https:\/\/help.mikrotik.com\/docs\/spaces\/ROS\/pages\/88014957\/VLAN\" rel=\"noopener noreferrer nofollow\"> \u041e\u0431\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 VLAN \u0432 RouterOS: \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438<\/a><\/p>\n<p> <a href=\"https:\/\/help.mikrotik.com\/docs\/spaces\/ROS\/pages\/103841826\/Basic+VLAN+switching\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 VLAN-\u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u0441 bridge \u0438 switch-chip \u0432 RouterOS<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/918456\/\"> https:\/\/habr.com\/ru\/articles\/918456\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-463419","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/463419","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=463419"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/463419\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=463419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=463419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=463419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}