{"id":180876,"date":"2024-11-09T13:55:17","date_gmt":"2024-11-09T05:55:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/180876\/"},"modified":"2024-11-09T13:55:18","modified_gmt":"2024-11-09T05:55:18","slug":"%e6%b7%b1%e5%85%a5%e4%ba%86%e8%a7%a3%e4%ba%a4%e6%8f%9b%e6%a9%9f%e7%9a%84vlan%e6%95%b8%e6%93%9a%e5%ba%ab%e5%8f%8a%e5%85%b6%e4%bd%9c%e7%94%a8-%e4%ba%a4%e6%8f%9b%e6%a9%9f%e7%9a%84vlan%e6%95%b8%e6%93%9a","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/180876\/","title":{"rendered":"\u6df1\u5165\u4e86\u89e3\u4ea4\u63db\u6a5f\u7684vlan\u6578\u64da\u5eab\u53ca\u5176\u4f5c\u7528 (\u4ea4\u63db\u6a5f\u7684vlan\u6578\u64da\u5eab)"},"content":{"rendered":"<h1 id=\"%e6%b7%b1%e5%85%a5%e4%ba%86%e8%a7%a3%e4%ba%a4%e6%8f%9b%e6%a9%9f%e7%9a%84vlan%e6%95%b8%e6%93%9a%e5%ba%ab%e5%8f%8a%e5%85%b6%e4%bd%9c%e7%94%a8-jhhmwbCAsx\">\u6df1\u5165\u4e86\u89e3\u4ea4\u63db\u6a5f\u7684VLAN\u6578\u64da\u5eab\u53ca\u5176\u4f5c\u7528<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0c\u4ea4\u63db\u6a5f\u7684\u89d2\u8272\u8b8a\u5f97\u8d8a\u4f86\u8d8a\u91cd\u8981\u3002\u96a8\u8457\u4f01\u696d\u5c0d\u7db2\u7d61\u6027\u80fd\u548c\u5b89\u5168\u6027\u7684\u9700\u6c42\u4e0d\u65b7\u589e\u52a0\uff0c\u865b\u64ec\u5c40\u57df\u7db2\uff08VLAN\uff09\u6280\u8853\u61c9\u904b\u800c\u751f\u3002VLAN\u4e0d\u50c5\u80fd\u5920\u63d0\u9ad8\u7db2\u7d61\u7684\u9748\u6d3b\u6027\uff0c\u9084\u80fd\u589e\u5f37\u5b89\u5168\u6027\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u4ea4\u63db\u6a5f\u7684VLAN\u6578\u64da\u5eab\u53ca\u5176\u4f5c\u7528\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%afvlan%ef%bc%9f-jhhmwbCAsx\">\u4ec0\u9ebc\u662fVLAN\uff1f<\/h2>\n<p>\u865b\u64ec\u5c40\u57df\u7db2\uff08VLAN\uff09\u662f\u4e00\u7a2e\u5c07\u7269\u7406\u7db2\u7d61\u5283\u5206\u70ba\u591a\u500b\u908f\u8f2f\u7db2\u7d61\u7684\u6280\u8853\u3002\u9019\u610f\u5473\u8457\u5373\u4f7f\u8a2d\u5099\u4f4d\u65bc\u4e0d\u540c\u7684\u7269\u7406\u4f4d\u7f6e\uff0c\u5b83\u5011\u4e5f\u53ef\u4ee5\u5728\u540c\u4e00\u500bVLAN\u4e2d\u9032\u884c\u901a\u4fe1\u3002VLAN\u7684\u4e3b\u8981\u76ee\u7684\u662f\u63d0\u9ad8\u7db2\u7d61\u7684\u7ba1\u7406\u6548\u7387\u548c\u5b89\u5168\u6027\u3002<\/p>\n<h2 id=\"%e4%ba%a4%e6%8f%9b%e6%a9%9f%e7%9a%84vlan%e6%95%b8%e6%93%9a%e5%ba%ab-jhhmwbCAsx\">\u4ea4\u63db\u6a5f\u7684VLAN\u6578\u64da\u5eab<\/h2>\n<p>\u4ea4\u63db\u6a5f\u7684VLAN\u6578\u64da\u5eab\u662f\u4e00\u500b\u5b58\u5132VLAN\u4fe1\u606f\u7684\u7d50\u69cb\uff0c\u901a\u5e38\u5305\u62ecVLAN\u7684ID\u3001\u540d\u7a31\u3001\u72c0\u614b\u4ee5\u53ca\u8207\u4e4b\u76f8\u95dc\u7684\u7aef\u53e3\u4fe1\u606f\u3002\u9019\u4e9b\u6578\u64da\u5c0d\u65bc\u4ea4\u63db\u6a5f\u7684\u904b\u884c\u81f3\u95dc\u91cd\u8981\uff0c\u56e0\u70ba\u5b83\u5011\u6c7a\u5b9a\u4e86\u6578\u64da\u5305\u7684\u8f49\u767c\u8def\u5f91\u548c\u7db2\u7d61\u7684\u6574\u9ad4\u6027\u80fd\u3002<\/p>\n<h3 id=\"vlan%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e7%b5%84%e6%88%90-jhhmwbCAsx\">VLAN\u6578\u64da\u5eab\u7684\u7d44\u6210<\/h3>\n<ul>\n<li><strong>VLAN ID\uff1a<\/strong>\u6bcf\u500bVLAN\u90fd\u6709\u4e00\u500b\u552f\u4e00\u7684\u8b58\u5225\u78bc\uff0c\u901a\u5e38\u7bc4\u570d\u57281\u52304095\u4e4b\u9593\u3002<\/li>\n<li><strong>VLAN\u540d\u7a31\uff1a<\/strong>\u7528\u65bc\u63cf\u8ff0VLAN\u7684\u540d\u7a31\uff0c\u4fbf\u65bc\u7ba1\u7406\u548c\u8b58\u5225\u3002<\/li>\n<li><strong>\u72c0\u614b\uff1a<\/strong>\u986f\u793aVLAN\u662f\u5426\u555f\u7528\u6216\u7981\u7528\u3002<\/li>\n<li><strong>\u7aef\u53e3\u4fe1\u606f\uff1a<\/strong>\u5217\u51fa\u8207\u8a72VLAN\u76f8\u95dc\u7684\u6240\u6709\u7aef\u53e3\uff0c\u9019\u4e9b\u7aef\u53e3\u53ef\u4ee5\u662f\u63a5\u5165\u7aef\u53e3\u6216\u5e79\u9053\u7aef\u53e3\u3002<\/li>\n<\/ul>\n<h3 id=\"vlan%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e4%bd%9c%e7%94%a8-jhhmwbCAsx\">VLAN\u6578\u64da\u5eab\u7684\u4f5c\u7528<\/h3>\n<p>VLAN\u6578\u64da\u5eab\u5728\u4ea4\u63db\u6a5f\u4e2d\u626e\u6f14\u8457\u591a\u91cd\u89d2\u8272\uff0c\u4e3b\u8981\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u6d41\u91cf\u9694\u96e2\uff1a<\/strong>\u901a\u904e\u5c07\u4e0d\u540c\u7684\u7528\u6236\u6216\u8a2d\u5099\u5283\u5206\u5230\u4e0d\u540c\u7684VLAN\u4e2d\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u9694\u96e2\u6d41\u91cf\uff0c\u6e1b\u5c11\u5ee3\u64ad\u98a8\u66b4\u7684\u5f71\u97ff\u3002<\/li>\n<li><strong>\u5b89\u5168\u6027\u589e\u5f37\uff1a<\/strong>VLAN\u53ef\u4ee5\u9650\u5236\u7528\u6236\u4e4b\u9593\u7684\u76f4\u63a5\u901a\u4fe1\uff0c\u5f9e\u800c\u63d0\u9ad8\u7db2\u7d61\u7684\u5b89\u5168\u6027\u3002\u4f8b\u5982\uff0c\u5c07\u8ca1\u52d9\u90e8\u9580\u548c\u4eba\u529b\u8cc7\u6e90\u90e8\u9580\u5283\u5206\u5230\u4e0d\u540c\u7684VLAN\u4e2d\uff0c\u53ef\u4ee5\u9632\u6b62\u672a\u7d93\u6388\u6b0a\u7684\u8a2a\u554f\u3002<\/li>\n<li><strong>\u7c21\u5316\u7ba1\u7406\uff1a<\/strong>VLAN\u4f7f\u5f97\u7db2\u7d61\u7ba1\u7406\u8b8a\u5f97\u66f4\u52a0\u9748\u6d3b\u548c\u9ad8\u6548\u3002\u7ba1\u7406\u54e1\u53ef\u4ee5\u6839\u64da\u90e8\u9580\u6216\u529f\u80fd\u5283\u5206VLAN\uff0c\u4fbf\u65bc\u9032\u884c\u76e3\u63a7\u548c\u6545\u969c\u6392\u9664\u3002<\/li>\n<li><strong>\u63d0\u9ad8\u6027\u80fd\uff1a<\/strong>\u901a\u904e\u6e1b\u5c11\u4e0d\u5fc5\u8981\u7684\u5ee3\u64ad\u6d41\u91cf\uff0cVLAN\u53ef\u4ee5\u63d0\u9ad8\u7db2\u7d61\u7684\u6574\u9ad4\u6027\u80fd\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aevlan%e6%95%b8%e6%93%9a%e5%ba%ab-jhhmwbCAsx\">\u5982\u4f55\u914d\u7f6eVLAN\u6578\u64da\u5eab<\/h2>\n<p>\u914d\u7f6eVLAN\u6578\u64da\u5eab\u901a\u5e38\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9a5f\uff1a<\/p>\n<pre><code>\n# \u9032\u5165\u4ea4\u63db\u6a5f\u7684\u914d\u7f6e\u6a21\u5f0f\nSwitch# configure terminal\n\n# \u5275\u5efa\u4e00\u500b\u65b0\u7684VLAN\nSwitch(config)# vlan 10\nSwitch(config-vlan)# name Finance\n\n# \u5c07\u7aef\u53e3\u5206\u914d\u5230VLAN\nSwitch(config)# interface fastEthernet 0\/1\nSwitch(config-if)# switchport mode access\nSwitch(config-if)# switchport access vlan 10\n<\/code><\/pre>\n<p>\u4ee5\u4e0a\u4ee3\u78bc\u793a\u7bc4\u4e86\u5982\u4f55\u5728Cisco\u4ea4\u63db\u6a5f\u4e0a\u5275\u5efa\u4e00\u500b\u540d\u70ba\u201cFinance\u201d\u7684VLAN\uff0c\u4e26\u5c07\u7aef\u53e3FastEthernet 0\/1\u5206\u914d\u5230\u8a72VLAN\u4e2d\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-jhhmwbCAsx\">\u7e3d\u7d50<\/h2>\n<p>\u4ea4\u63db\u6a5f\u7684VLAN\u6578\u64da\u5eab\u662f\u7db2\u7d61\u7ba1\u7406\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u4e00\u90e8\u5206\uff0c\u5b83\u4e0d\u50c5\u63d0\u9ad8\u4e86\u7db2\u7d61\u7684\u9748\u6d3b\u6027\u548c\u5b89\u5168\u6027\uff0c\u9084\u7c21\u5316\u4e86\u7ba1\u7406\u6d41\u7a0b\u3002\u96a8\u8457\u4f01\u696d\u5c0d\u7db2\u7d61\u6027\u80fd\u7684\u8981\u6c42\u4e0d\u65b7\u63d0\u9ad8\uff0c\u6df1\u5165\u4e86\u89e3VLAN\u53ca\u5176\u6578\u64da\u5eab\u7684\u4f5c\u7528\u5c07\u5c0d\u7db2\u7d61\u7ba1\u7406\u4eba\u54e1\u81f3\u95dc\u91cd\u8981\u3002\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\u4ee5\u6eff\u8db3\u60a8\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6df1\u5165\u4e86\u89e3\u4ea4\u63db\u6a5f\u7684VLAN\u6578\u64da\u5eab\u53ca\u5176\u4f5c\u7528\uff0c\u63a2\u7d22\u5982\u4f55\u6709\u6548\u7ba1\u7406\u7db2\u7d61\u6d41\u91cf\u548c\u63d0\u5347\u5b89\u5168\u6027\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-180876","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/180876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=180876"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/180876\/revisions"}],"predecessor-version":[{"id":180877,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/180876\/revisions\/180877"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=180876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=180876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=180876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}