{"id":1573,"date":"2025-05-12T10:53:27","date_gmt":"2025-05-12T02:53:27","guid":{"rendered":"http:\/\/113.45.254.23\/?p=1573"},"modified":"2025-05-12T10:55:23","modified_gmt":"2025-05-12T02:55:23","slug":"%e6%96%b0%e5%8d%8e3%e4%b8%8bvlan%e9%97%b4%e7%9a%84trunk","status":"publish","type":"post","link":"http:\/\/113.45.254.23\/?p=1573","title":{"rendered":"\u65b0\u534e3\u4e0bvlan\u95f4\u7684trunk"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u5b9e\u9a8c\u62d3\u6251\u56fe\uff1a<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-5.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"515\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-5.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1574\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u8bbe\u7f6ePC IP<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-6.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"683\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-6.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1575\"  sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-7.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"679\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-7.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1576\"  sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-8.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"639\" height=\"679\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-8.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1577\"  sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-9.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"675\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-9.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1578\"  sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u8bbe\u7f6e\u8def\u7531\u5668SW1<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;SW1]vlan 10\t\t\u3010\u521b\u5efavlan10\u3011\n&#91;SW1-vlan10]vlan 20\t\u3010\u521b\u5efavlan20\u3011\n&#91;SW1-vlan20]exit\n&#91;SW1]interface g 1\/0\/2\n&#91;SW1-GigabitEthernet1\/0\/2]port access vlan 10\t\u3010\u7aef\u53e3\u63a5\u5165vlan10\u3011\uff08\u662f\u4e24\u6761\u540d\u7684\u7f29\u5199\uff09\uff08\u63a5\u53e3\u9ed8\u8ba4\u5c31\u662f\u63a5\u5165\uff09\n&#91;SW1-GigabitEthernet1\/0\/2]quit\n&#91;SW1]interface g 1\/0\/1\n&#91;SW1-GigabitEthernet1\/0\/1]port access vlan 20\t\u3010\u7aef\u53e3\u63a5\u5165vlan20\u3011\n&#91;SW1-GigabitEthernet1\/0\/1]quit\n&#91;SW1]%May  9 15:17:51:687 2025 SW1 LLDP\/5\/LLDP_PVID_INCONSISTENT: PVID mismatch discovered on GigabitEthernet1\/0\/3 (PVID 1), with SW2 GigabitEthernet1\/0\/1 (PVID 20).\n\n%May  9 15:18:22:709 2025 SW1 LLDP\/5\/LLDP_PVID_INCONSISTENT: PVID mismatch discovered on GigabitEthernet1\/0\/3 (PVID 1), with SW2 GigabitEthernet1\/0\/1 (PVID 20).\n\n%May  9 15:18:53:388 2025 SW1 LLDP\/5\/LLDP_PVID_INCONSISTENT: PVID mismatch discovered on GigabitEthernet1\/0\/3 (PVID 1), with SW2 GigabitEthernet1\/0\/1 (PVID 20).\n\n\n&#91;SW1]interface g 1\/0\/3\n&#91;SW1-GigabitEthernet1\/0\/3]port link-type trunk\n&#91;SW1-GigabitEthernet1\/0\/3]port trunk permit vlan 10 20\n&#91;SW1-GigabitEthernet1\/0\/3]quit\n&#91;SW1]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u8bbe\u7f6e\u8def\u7531\u56682 SW2<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;H3C]sysname SW2\n&#91;SW2]vlan 10\n&#91;SW2-vlan10]vlan 20\n&#91;SW2-vlan20]quit\n&#91;SW2]interface g 1\/0\/2\n&#91;SW2-GigabitEthernet1\/0\/2]port access vlan 10\n&#91;SW2-GigabitEthernet1\/0\/2]quit\n&#91;SW2]interface g 1\/0\/1\n&#91;SW2-GigabitEthernet1\/0\/1]port access vlan 20\n&#91;SW2-GigabitEthernet1\/0\/1]quit\n&#91;SW2]%May  9 15:17:24:817 2025 SW2 LLDP\/5\/LLDP_PVID_INCONSISTENT: PVID mismatch discovered on GigabitEthernet1\/0\/1 (PVID 20), with SW1 GigabitEthernet1\/0\/3 (PVID 1).\n\n\n&#91;SW2]undo%May  9 15:17:53:821 2025 SW2 LLDP\/5\/LLDP_PVID_INCONSISTENT: PVID mismatch discovered on GigabitEthernet1\/0\/1 (PVID 20), with SW1 GigabitEthernet1\/0\/3 (PVID 1).\n&#91;SW2]undo info-center enable\nInformation center is disabled.\n&#91;SW2]interface g 1\/0\/1\n&#91;SW2-GigabitEthernet1\/0\/1]undo port access vlan\n&#91;SW2-GigabitEthernet1\/0\/1]quit\n&#91;SW2]interface g 1\/0\/3\n&#91;SW2-GigabitEthernet1\/0\/3]port access vlan 20\n&#91;SW2-GigabitEthernet1\/0\/3]quit\n&#91;SW2]interface g 1\/0\/1\n&#91;SW2-GigabitEthernet1\/0\/1]port link-type trunk\n&#91;SW2-GigabitEthernet1\/0\/1]port trunk permit vlan 10 20\n&#91;SW2-GigabitEthernet1\/0\/1]quit\n\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001PC1\u4e0bping PC2\\PC3\\PC4<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-10.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"501\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-10.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1579\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-11.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"691\" height=\"517\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/05\/image-11.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1580\"  sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5b9e\u9a8c\u62d3\u6251\u56fe\uff1a \u4e8c\u3001\u8bbe\u7f6ePC IP \u4e09\u3001\u8bbe\u7f6e\u8def\u7531\u5668SW1 \u56db\u3001\u8bbe\u7f6e\u8def\u7531\u56682 SW2 \u4e94\u3001PC1\u4e0bping P [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[],"class_list":["post-1573","post","type-post","status-publish","format-standard","hentry","category-96"],"_links":{"self":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/1573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1573"}],"version-history":[{"count":3,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/1573\/revisions"}],"predecessor-version":[{"id":1583,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/1573\/revisions\/1583"}],"wp:attachment":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1573"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}