{"id":1845,"date":"2021-07-03T17:49:10","date_gmt":"2021-07-03T09:49:10","guid":{"rendered":"https:\/\/www.wjxy.net.cn\/?p=1845"},"modified":"2023-10-04T06:32:32","modified_gmt":"2023-10-03T22:32:32","slug":"%e4%b8%a4%e4%b8%aa%e4%b8%89%e5%b1%82%e4%ba%a4%e6%8d%a2%e6%9c%ba%e4%b8%8d%e5%90%8cvlan%e9%97%b4%e7%9a%84%e4%ba%92%e9%80%9a","status":"publish","type":"post","link":"https:\/\/www.wjxy.net.cn\/?p=1845","title":{"rendered":"\u4e24\u4e2a\u4e09\u5c42\u4ea4\u6362\u673a\u4e0d\u540cVLAN\u95f4\u7684\u4e92\u901a"},"content":{"rendered":"<h2>\u4e09\u5c42\u4ea4\u6362\u673aSW1:<\/h2>\n<p>VLANIF100:192.168.100.1<\/p>\n<p>VLANIF110:192.168.110.1<\/p>\n<p>VLANIF120:192.168.120.1<\/p>\n<h2>\u4e09\u5c42\u4ea4\u6362\u673aSW2:<\/h2>\n<p>VLANIF100:192.168.100.2<\/p>\n<p>VLANIF130:192.168.110.1<\/p>\n<p>VLANIF140:192.168.120.1<\/p>\n<h2>\u62d3\u6251\uff1a<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1180\" height=\"486\" class=\"alignnone wp-image-1847 size-full\" src=\"https:\/\/www.wjxy.net.cn\/wp-content\/uploads\/2021\/07\/Pasted-into-\u4e24\u4e2a\u4e09\u5c42\u4ea4\u6362\u673a\u4e0d\u540cVLAN\u95f4\u7684\u4e92\u901a.png\" srcset=\"https:\/\/www.wjxy.net.cn\/wp-content\/uploads\/2021\/07\/Pasted-into-\u4e24\u4e2a\u4e09\u5c42\u4ea4\u6362\u673a\u4e0d\u540cVLAN\u95f4\u7684\u4e92\u901a.png 1180w, https:\/\/www.wjxy.net.cn\/wp-content\/uploads\/2021\/07\/Pasted-into-\u4e24\u4e2a\u4e09\u5c42\u4ea4\u6362\u673a\u4e0d\u540cVLAN\u95f4\u7684\u4e92\u901a-300x124.png 300w, https:\/\/www.wjxy.net.cn\/wp-content\/uploads\/2021\/07\/Pasted-into-\u4e24\u4e2a\u4e09\u5c42\u4ea4\u6362\u673a\u4e0d\u540cVLAN\u95f4\u7684\u4e92\u901a-768x316.png 768w, https:\/\/www.wjxy.net.cn\/wp-content\/uploads\/2021\/07\/Pasted-into-\u4e24\u4e2a\u4e09\u5c42\u4ea4\u6362\u673a\u4e0d\u540cVLAN\u95f4\u7684\u4e92\u901a-1024x422.png 1024w\" sizes=\"(max-width: 1180px) 100vw, 1180px\" \/><\/p>\n<h2>SW1\u914d\u7f6e:<\/h2>\n<p>[<code>sw1]vlan batch 100 110 120<br \/>\n[sw1]interface vlanif 100<br \/>\n[sw1]ip address 192.168.100.1 255.255.255.0<br \/>\n[sw1]q<br \/>\n[sw1]interface vlanif 110<br \/>\n[sw1]ip address 192.168.110.1 255.255.255.0<br \/>\n[sw1]dhcp select global<br \/>\n[sw1]q<br \/>\n[sw1]interface vlanif 120<br \/>\n[sw1]ip address 192.168.120.1 255.255.255.0<br \/>\n[sw1]dhcp select global<br \/>\n[sw1]q<br \/>\n\u8fd9\u91cc\u5ffd\u7565\u8bbe\u7f6eIP pool\u548cdhcp<br \/>\n[sw1]interface GigabiteEthernet 0\/0\/1<br \/>\n[sw1]port link-type access<br \/>\n[sw1]port default vlan 110<br \/>\n[sw1]q<br \/>\n[sw1]interface GigabiteEthernet 0\/0\/2<br \/>\n[sw1]port link-type access<br \/>\n[sw1]port default vlan 120<br \/>\n[sw1]q<br \/>\n[sw1]interface GigabiteEthernet 0\/0\/48<br \/>\n[sw1]port link-type trunk<br \/>\n[sw1]port trun allow-pass 100 110 120 130 140<br \/>\n[sw1]q<br \/>\n[sw1]ip route-static 192.168.130.0 255.255.255.0 192.168.100.2   \/\/\/\u8fd9\u91cc\u7f51\u5173\u6307\u5b9a\u4e3asw2\u5730\u5740<br \/>\n[sw1]ip route-static 192.168.140.0 255.255.255.0 192.168.100.2   \/\/\/\u8fd9\u91cc\u7f51\u5173\u6307\u5b9a\u4e3asw2\u5730\u5740<br \/>\n[sw1]<\/code><\/p>\n<h2>SW2\u914d\u7f6e:<br \/>\n[<code>sw1]vlan batch 100 130 140<br \/>\n[sw1]interface vlanif 100<br \/>\n[sw1]ip address 192.168.100.2 255.255.255.0<br \/>\n[sw1]q<br \/>\n[sw1]interface vlanif 130<br \/>\n[sw1]ip address 192.168.130.1 255.255.255.0<br \/>\n[sw1]dhcp select global<br \/>\n[sw1]q<br \/>\n[sw1]interface vlanif 140<br \/>\n[sw1]ip address 192.168.140.1 255.255.255.0<br \/>\n[sw1]dhcp select global<br \/>\n[sw1]q<br \/>\n\u8fd9\u91cc\u5ffd\u7565\u8bbe\u7f6eIP pool\u548cdhcp<br \/>\n[sw1]interface GigabiteEthernet 0\/0\/1<br \/>\n[sw1]port link-type access<br \/>\n[sw1]port default vlan 130<br \/>\n[sw1]q<br \/>\n[sw1]interface GigabiteEthernet 0\/0\/2<br \/>\n[sw1]port link-type access<br \/>\n[sw1]port default vlan 140<br \/>\n[sw1]q<br \/>\n[sw1]interface GigabiteEthernet 0\/0\/48<br \/>\n[sw1]port link-type trunk<br \/>\n[sw1]port trun allow-pass 100 110 120 130 140<br \/>\n[sw1]q<br \/>\n[sw1]ip route-static 192.168.110.0 255.255.255.0 192.168.100.1   \/\/\/\u8fd9\u91cc\u7f51\u5173\u6307\u5b9a\u4e3asw2\u5730\u5740<br \/>\n[sw1]ip route-static 192.168.120.0 255.255.255.0 192.168.100.1   \/\/\/\u8fd9\u91cc\u7f51\u5173\u6307\u5b9a\u4e3asw2\u5730\u5740<br \/>\n[sw1]<\/code><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>\u4e09\u5c42\u4ea4\u6362\u673aSW1: VLANIF100:192.168.100.1 VLANIF110:192.168.110 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"_links":{"self":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/1845"}],"collection":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1845"}],"version-history":[{"count":2,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/1845\/revisions"}],"predecessor-version":[{"id":1849,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/1845\/revisions\/1849"}],"wp:attachment":[{"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wjxy.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}