{"id":920,"date":"2022-01-30T22:23:23","date_gmt":"2022-01-30T14:23:23","guid":{"rendered":"https:\/\/b.yesiyu.top\/?p=920"},"modified":"2022-01-30T22:23:23","modified_gmt":"2022-01-30T14:23:23","slug":"%e9%94%90%e6%8d%b7%e4%ba%a4%e6%8d%a2%e6%9c%ba%e5%b8%b8%e7%94%a8%e9%85%8d%e7%bd%ae%e5%91%bd%e4%bb%a4%e6%b1%87%e6%80%bb","status":"publish","type":"post","link":"https:\/\/b.yesiyu.top\/?p=920","title":{"rendered":"\u9510\u6377\u4ea4\u6362\u673a\u5e38\u7528\u914d\u7f6e\u547d\u4ee4\u6c47\u603b"},"content":{"rendered":"<p><strong>\u4e00\u3001\u8fde\u63a5\u53ca\u8fdc\u7a0b\u767b\u5f55<\/strong><\/p>\n<p>\u7528\u4e00\u53f0\u8ba1\u7b97\u673a\u4f5c\u4e3a\u63a7\u5236\u53f0\u548c\u7f51\u7edc\u8bbe\u5907\u76f8\u8fde\u63a5\uff0c\u901a\u8fc7\u8ba1\u7b97\u673a\u5bf9\u7f51\u7edc\u8bbe\u5907\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n<p>1\u3001\u786c\u4ef6\u8fde\u63a5<\/p>\n<p>\u628aConsole\u7ebf\u4e00\u7aef\u8fde\u63a5\u5728\u8ba1\u7b97\u673a\u7684\u4e32\u53e3\u4e0a\uff0c\u53e6\u4e00\u7aef\u8fde\u63a5\u5728\u7f51\u7edc\u8bbe\u5907\u7684Console\u53e3\u4e0a\u3002<\/p>\n<p>\u6309\u7167\u4e0a\u9762\u7684\u7ebf\u5e8f\u5236\u4f5c\u4e00\u6839\u53cc\u7ede\u7ebf\uff0c\u4e00\u7aef\u901a\u8fc7\u4e00\u4e2a\u8f6c\u6362\u5934\u8fde\u63a5\u5728\u8ba1\u7b97\u673a\u7684\u4e32\u53e3\u4e0a\uff0c\u53e6\u4e00\u7aef\u8fde\u63a5\u5728\u7f51\u7edc\u8bbe\u5907\u7684Console\u53e3\u4e0a\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-962\" title=\"640-34\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-34.png\" alt=\"640-34\" width=\"506\" height=\"282\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-34.png 506w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-34-300x167.png 300w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/p>\n<p>2\u3001\u8f6f\u4ef6\u5b89\u88c5<\/p>\n<p>\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5\u4e00\u4e2a\u7ec8\u7aef\u4eff\u771f\u8f6f\u4ef6\u6765\u767b\u5f55\u7f51\u7edc\u8bbe\u5907\u3002\u201c\u8d85\u7ea7\u7ec8\u7aef\u201d\u5b89\u88c5\u65b9\u6cd5\uff0c\u901a\u5e38\u662f\u4f7f\u7528secureCRT\u8f83\u591a\u3002<\/p>\n<p>\u6309\u7167\u63d0\u793a\u7684\u6b65\u9aa4\u8fdb\u884c\u5b89\u88c5\uff0c\u5176\u4e2d\u8fde\u63a5\u7684\u63a5\u53e3\u5e94\u9009\u62e9&#8221;COM1&#8243;\uff0c\u7aef\u53e3\u7684\u901f\u7387\u9009\u62e9\u201c9600\u201d\uff0c\u6570\u636e\u6d41\u63a7\u5236\u5e94\u9009\u62e9&#8221;\u65e0&#8221;\uff0c\u5176\u5b83\u90fd\u4f7f\u7528\u9ed8\u8ba4\u5373\u53ef\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-955\" title=\"640-30\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30.png\" alt=\"640-30\" width=\"387\" height=\"315\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30.png 387w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30-300x244.png 300w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u4e8c\u3001\u57fa\u7840\u547d\u4ee4<\/strong><\/p>\n<p>\u8fde\u63a5\u4e0a\u4ea4\u6362\u673a\u540e\uff0c\u9700\u8981\u8fdb\u884c\u547d\u4ee4\u914d\u7f6e\uff0c\u6211\u4eec\u6765\u770b\u770b\u914d\u7f6e\u7684\u547d\u4ee4\u3002<\/p>\n<p>1\u3001\u51c6\u5907\u547d\u4ee4<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-952\" title=\"640-27\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-27.png\" alt=\"640-27\" width=\"664\" height=\"409\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-27.png 664w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-27-300x185.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/p>\n<p>2\u3001\u67e5\u770b\u4fe1\u606f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-956\" title=\"640-30\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30.png\" alt=\"640-30\" width=\"387\" height=\"315\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30.png 387w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30-300x244.png 300w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/p>\n<p>3\u3001\u7aef\u53e3\u57fa\u672c\u914d\u7f6e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-959\" title=\"640-32\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-32.png\" alt=\"640-32\" width=\"652\" height=\"309\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-32.png 652w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-32-300x142.png 300w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/p>\n<p>4\u3001\u805a\u5408\u7aef\u53e3\u521b\u5efa<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-961\" title=\"640-34\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-34.png\" alt=\"640-34\" width=\"506\" height=\"282\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-34.png 506w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-34-300x167.png 300w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/p>\n<p>5\u3001\u751f\u6210\u6811<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-954\" title=\"640-29\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-29.png\" alt=\"640-29\" width=\"653\" height=\"465\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-29.png 653w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-29-300x214.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/p>\n<p>6\u3001VLan\u7684\u57fa\u672c\u914d\u7f6e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-949\" title=\"640-24\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-24.png\" alt=\"640-24\" width=\"663\" height=\"253\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-24.png 663w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-24-300x114.png 300w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/p>\n<p>7\u3001\u7aef\u53e3\u5b89\u5168<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-960\" title=\"640-33\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-33.png\" alt=\"640-33\" width=\"633\" height=\"60\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-33.png 633w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-33-300x28.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/p>\n<p>A\u3001\u914d\u7f6e\u6700\u5927\u8fde\u63a5\u6570\u9650\u5236<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-957\" title=\"640-30\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30.png\" alt=\"640-30\" width=\"387\" height=\"315\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30.png 387w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-30-300x244.png 300w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/p>\n<p>B\u3001IP\u548cMAC\u5730\u5740\u7ed1\u5b9a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-953\" title=\"640-28\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-28.png\" alt=\"640-28\" width=\"645\" height=\"110\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-28.png 645w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-28-300x51.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<p>8\u3001\u4e09\u5c42\u8def\u7531\u529f\u80fd\uff08\u53ea\u9488\u5bf9\u4e09\u5c42\u4ea4\u6362\u673a\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-951\" title=\"640-26\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-26.png\" alt=\"640-26\" width=\"661\" height=\"168\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-26.png 661w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-26-300x76.png 300w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/p>\n<p>9\u3001\u4e09\u5c42\u4ea4\u6362\u673a\u8def\u7531\u534f\u8bae<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-958\" title=\"640-31\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-31.png\" alt=\"640-31\" width=\"690\" height=\"459\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-31.png 690w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-31-300x200.png 300w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/p>\n<p><strong>\u4e09\u3001\u9510\u6377\u4ea4\u6362\u673a\u5b9e\u73b0\u540cVLAN\u4e0d\u540c\u4ea4\u6362\u901a\u4fe1<\/strong><\/p>\n<p>\u6211\u4eec\u90fd\u77e5\u9053\uff0c\u540c\u4e00\u4e2aVLAN\u5728\u540c\u4e00\u4e2a\u4ea4\u6362\u673a\u4e2d\uff0c\u662f\u5b8c\u5168\u53ef\u4ee5\u901a\u4fe1\u7684\u3002\u90a3\u4e48\u5bf9\u4e8e\u540c\u4e00\u4e2aVLAN\u5728\u4e0d\u540c\u7684\u4ea4\u6362\u673a\u4e0a\uff0c\u5982\u679c\u4e0d\u505a\u914d\u7f6e\uff0c\u662f\u65e0\u6cd5\u901a\u4fe1\u7684\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u4e00\u4e0b\u4e0b\u9762\u7684\u793a\u4f8b\u3002<\/p>\n<p>\u793a\u4f8b1\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-951\" title=\"640-26\" src=\"http:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-26.png\" alt=\"640-26\" width=\"661\" height=\"168\" srcset=\"https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-26.png 661w, https:\/\/b.yesiyu.top\/wp-content\/uploads\/2022\/01\/640-26-300x76.png 300w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/p>\n<p>\uff081\uff09\u5206\u6790<\/p>\n<p>\u4e24\u53f0\u4ea4\u6362\u673aS1\u548cS2\u5229\u7528VLAN\u5206\u5272\u6210\u51e0\u4e2a\u865a\u62df\u5c40\u57df\u7f51\uff0cS1\u4e2dVLAN1\u3001VLAN30\u4e0eS2\u4e2d\u7684VLAN1\u3001VLAN30\u867d\u7136\u662f\u540c\u4e00\u4e2aVLAN\uff0c\u4f46\u5374\u4e0d\u80fd\u76f4\u63a5\u901a\u4fe1\u3002\u90a3\u4e48\u5982\u4f55\u4f7fVLAN1\u3001VLAN30\u540cVLAN\u4e4b\u95f4\u53ef\u4ee5\u901a\u4fe1\u5462\uff0c\u4e0d\u540c\u7684VLAN\u4e4b\u95f4\u4e0d\u53ef\u4ee5\u901a\u4fe1\u5462\uff1f<\/p>\n<p>\uff082\uff09\u914d\u7f6e<\/p>\n<section>\u914d\u7f6eS1:<\/p>\n<p>S1&gt;enable \/\/\u8fdb\u5165\u7279\u6743\u914d\u7f6e\u6a21\u5f0f<br \/>\nS1#configure terminal \/\/\u5168\u5c40\u914d\u7f6e\u6a21<\/p>\n<p>! \u521b\u5efaVLAN20<br \/>\nS1(config)#vlan 20 \/\/\u521b\u5efavlan20<br \/>\nS1(config-vlan)#name VLAN20 \/\/\u7ed9\u8fd9\u4e2avlan\u547d\u540dvlan\u4e3avlan<br \/>\n! \u521b\u5efaVLAN30<\/p>\n<p>S1(config-vlan)#vlan 30<br \/>\nS1(config-vlan)#name VLAN30<br \/>\nS1(config-vlan)#exit<\/p>\n<p>! \u628aF0\/4~F0\/7\u6307\u6d3e\u7ed9VLAN20<br \/>\nS1(config)#interface f0\/4 \/\/\u8fdb\u5165\u7aef\u53e3f0\/4<br \/>\nS1(config-if)#switchport access vlan 20 \/\/\u628a\u8fd9\u4e2a\u7aef\u53e3\u5212\u5206\u7ed9vlan20<br \/>\nS1(config-if)#interface f0\/5 \/\/\u8fdb\u5165\u7aef\u53e3f0\/5<br \/>\nS1(config-if)#switchport access vlan 20<br \/>\nS1(config-if)#interface f0\/6<br \/>\nS1(config-if)#switchport access vlan 20<br \/>\nS1(config-if)#interface f0\/7<br \/>\nS1(config-if)#switchport access vlan 20<\/p>\n<p>! \u628aF0\/8~F0\/11\u6307\u6d3e\u7ed9VLAN30<br \/>\nS1(config-if)#interface f0\/8 \/\/\u8fdb\u5165\u7aef\u53e3f0\/8<br \/>\nS1(config-if)#switchport access vlan 30 \/\/\u628a\u8fd9\u4e2a\u7aef\u53e3\u5212\u5206\u7ed9vlan30<br \/>\nS1(config-if)#interface f0\/9<br \/>\nS1(config-if)#switchport access vlan 30<br \/>\nS1(config-if)#interface f0\/10<br \/>\nS1(config-if)#switchport access vlan 30<br \/>\nS1(config-if)#interface f0\/11<br \/>\nS1(config-if)#switchport access vlan 30<\/p>\n<p>! \u628aF0\/12\u914d\u7f6e\u4e3aTrunk\u6a21\u5f0f<br \/>\nS1(config-if)#interface f0\/12 \/\/\u8fdb\u5165\u7aef\u53e3f0\/12<br \/>\nS1(config-if)#switchport mode trunk \/\/ \u5c06\u7aef\u53e3f0\/12\u8bbe\u4e3atrunk\uff0c\u5982\u679c\u4ea4\u6362\u673a\u53ea\u6709\u4e00\u4e2avlan\u3002\u5c31\u4f7f\u7528access\u63a5\u53e3\u3002\u5982\u679c\u4ea4\u6362\u673a\u6709\u591a\u4e2avlan\u5c31\u5fc5\u987b\u4f7f\u7528trunk\u7aef\u53e3\uff0c\u56e0\u4e3atrunk\u7aef\u53e3\u53ef\u5c01\u88c5vlan\u6807\u7b7e\u3002<\/p>\n<p>S1(config-if)#end \/\/\u8fd4\u56de\u7279\u6743\u6a21\u5f0f<\/p>\n<p>! \u67e5\u770b\u914d\u7f6e\u7ed3\u679c<br \/>\nS1#show vlan<\/p>\n<p>! \u4fdd\u5b58\u914d\u7f6e<br \/>\nS1#copy running-config startup-config<\/p>\n<p>\u914d\u7f6eS2\uff1a<\/p>\n<p>S2&gt;enable<br \/>\nS2#configure terminal<\/p>\n<p>! \u521b\u5efaVLAN30<br \/>\nS2(config)#vlan 30<br \/>\nS2(config-vlan)#name VLAN30<br \/>\nS2(config-vlan)#exit<\/p>\n<p>! \u628aF0\/1~F0\/5\u6307\u6d3e\u7ed9VLAN30<br \/>\nS2(config)#interface range f0\/1-5 \/\/\u5c06s2\u4e2d\u76841\u52305\u7aef\u53e3\u5212\u5206\u5230vlan30\uff0c\u8fd9\u4e2a\u4f7f\u7528\u4e86\u7aef\u53e3\u7b80\u5316\u914d\u7f6e\u65b9\u5f0f\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u57281\u4e2d\u4f7f\u7528\u3002<\/p>\n<p>S2(config-if)#switchport access vlan 30<\/p>\n<p>! \u628aF0\/12\u914d\u7f6e\u4e3aTrunk\u6a21\u5f0f<br \/>\nS2(config-if)#interface f0\/12<br \/>\nS2(config-if)#switchport mode trunk \/\/ \u5c06s2\u7aef\u53e3f0\/12\u4e5f\u8bbe\u4e3atrunk\uff0c\u5982\u679c\u4ea4\u6362\u673a\u53ea\u6709\u4e00\u4e2avlan\u3002\u5c31\u4f7f\u7528access\u63a5\u53e3\u3002\u5982\u679c\u4ea4\u6362\u673a\u6709\u591a\u4e2avlan\u5c31\u5fc5\u987b\u4f7f\u7528trunk\u7aef\u53e3\uff0c\u56e0\u4e3atrunk\u7aef\u53e3\u53ef\u5c01\u88c5vlan\u6807\u7b7e\u3002<\/p>\n<p>S2(config-if)#end<\/p>\n<p>! \u67e5\u770b\u914d\u7f6e\u7ed3\u679c<br \/>\nS2#show vlan<\/p>\n<p>! \u4fdd\u5b58\u914d\u7f6e<\/p>\n<p>S2#copy running-config startup-config<\/p>\n<p>\u5982\u6b64\uff0c\u914d\u7f6e\u5c31\u5b8c\u6210\u4e86\u3002S1\u4e2d\u7684VLAN1\u4e0eS2\u4e2d\u7684VLAN1\u4fbf\u53ef\u4ee5\u901a\u4fe1\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>VLAN1\u4e0eVLAN20\u4e0eVLAN30\u65e0\u6cd5\u901a\u4fe1\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u4ed4\u7ec6\u770b\u6211\u4eec\u4e0d\u96be\u53d1\u73b0\uff0c\u4e0a\u9762\u7684\u914d\u7f6e\u5b9e\u4f8b\u770b\u8d77\u6765\u6ca1\u6709\u90a3\u4e48\u591a\u4ee3\u7801\uff0c\u5176\u5b9e\u5c31\u662f4\u884c\u5173\u952e\u4ee3\u7801\u91cd\u590d\u4f7f\u7528\u3002<\/p>\n<p>\u56db\u3001\u529f\u80fd\u914d\u7f6e\u547d\u4ee4\u793a\u4f8b<\/p>\n<p>\u4ea4\u6362\u673a\u5bc6\u7801<br \/>\n(config)#enable secret level 1 0 100<br \/>\n(config)#enable secret level 15 0 100<br \/>\n\u8fdc\u7a0b\u767b\u5165\u5bc6\u7801<br \/>\n(config)#line vty 0 4<br \/>\n(config-line)#password 100<br \/>\n(config-line)#end<br \/>\n\u4ea4\u6362\u673a\u7ba1\u7406IP<br \/>\n(config)#interface vlan 1<br \/>\n(config-if)#ip address 192.168.1.10 255.255.255.0<br \/>\n(config-if)#no shutdown<br \/>\n\u4fee\u6539\u4ea4\u6362\u673a\u8001\u5316\u65f6\u95f4<br \/>\n(config)#mac-address-table aging-time 20<br \/>\n(config)#end<br \/>\n\u6dfb\u5220vlan<br \/>\n(config)#vlan 888<br \/>\n(config-vlan)#name a888<br \/>\n(config)#no vlan 888<br \/>\n\u6dfb\u52a0access\u53e3<br \/>\n(config)#interface gigabitEthernet 0\/10<br \/>\n(config-if)#switchport mode access<br \/>\n(config-if)#switchport access vlan 10<br \/>\n\u5207\u6362assess trunk<br \/>\n(config-if)#switchport mode access<br \/>\n(config-if)#switchport mode trunk<br \/>\n\u6307\u5b9a\u7279\u5b9a\u4e00\u4e2anative vlan<br \/>\n(config-if)#switchport trunk native vlan 10<\/p>\n<p>\u914d\u7f6e\u7f51\u5173\uff1a<br \/>\nswitch(config)#ip default-gateway 192.168.1.254<\/p>\n<p>\u663e\u793a\u63a5\u53e3\u8be6\u7ec6\u4fe1\u606f\u7684\u547d\u4ee4<br \/>\nshow interfaces gigabitEthernet 4\/1 counters<br \/>\n\u63a5\u53e3\u914d\u7f6e<br \/>\nSwitch(config)#interface gigabitethernet 0\/1<br \/>\n\u628a\u63a5\u53e3\u5de5\u4f5c\u6a21\u5f0f\u6539\u4e3a\u5149\u53e3\u3002<br \/>\nSwitch(config-if)#medium-type fiber<br \/>\n\u628a\u63a5\u53e3\u5de5\u4f5c\u6a21\u5f0f\u6539\u4e3a\u7535\u53e3\u3002<br \/>\nSwitch(config-if)#medium-type copper<\/p>\n<p>VLAN\u914d\u7f6e<br \/>\n\u5efa\u7acbVLAN 100<br \/>\nSwitch (config)#vlan 100<br \/>\n\u8be5VLAN\u540d\u79f0\u4e3aruijie<br \/>\nSwitch (config)#name ruijie<br \/>\n\u5c06\u4ea4\u6362\u673a\u63a5\u53e3\u5212\u5165VLAN \u4e2d\uff1a<br \/>\nrange\u8868\u793a\u9009\u53d6\u4e86\u7cfb\u5217\u7aef\u53e31-48\uff0c\u8fd9\u4e2a\u5bf9\u591a\u4e2a\u7aef\u53e3\u8fdb\u884c\u76f8\u540c\u914d\u7f6e\u65f6\u975e\u5e38\u6709\u7528\u3002<br \/>\nSwitch (config)#interface range f 0\/1-48<br \/>\n\u5c06\u63a5\u53e3\u5212\u5230VLAN 100\u4e2d\u3002<br \/>\nSwitch (config-if-range)#switchport access vlan 100<\/p>\n<p>\u5c06\u63a5\u53e3\u5212\u56de\u5230\u9ed8\u8ba4VLAN 1\u4e2d\uff0c\u5373\u7aef\u53e3\u521d\u59cb\u914d\u7f6e\u3002<br \/>\nSwitch (config-if-range)#no switchport access vlan<br \/>\nSwitch(config)#interface fastEthernet 0\/1<\/p>\n<p>\u8be5\u7aef\u53e3\u5de5\u4f5c\u5728access\u6a21\u5f0f\u4e0b<br \/>\nSwitch(config-if)#switchport mode access<\/p>\n<p>\u8be5\u7aef\u53e3\u5de5\u4f5c\u5728trunk\u6a21\u5f0f\u4e0b<br \/>\nSwitch(config-if)#switchport mode trunk<br \/>\nSwitch(config)#interface fastEthernet 0\/2<\/p>\n<p>\u8def\u7531\u914d\u7f6e\uff1a\u6dfb\u52a0\u4e00\u6761\u8def\u7531\u3002<br \/>\nswitch (config)#ip route \u76ee\u7684\u5730\u5740 \u63a9\u7801 \u4e0b\u4e00\u8df3<br \/>\nswitch (config)#ip route 210.10.10.0 255.255.255.0 218.8.8.0<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u8fde\u63a5\u53ca\u8fdc\u7a0b\u767b\u5f55 \u7528\u4e00\u53f0\u8ba1\u7b97\u673a\u4f5c\u4e3a\u63a7\u5236\u53f0\u548c\u7f51\u7edc\u8bbe\u5907\u76f8\u8fde\u63a5\uff0c\u901a\u8fc7\u8ba1\u7b97\u673a\u5bf9\u7f51\u7edc\u8bbe\u5907\u8fdb\u884c\u914d\u7f6e\u3002 1\u3001\u786c\u4ef6\u8fde\u63a5 \u628aC &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/b.yesiyu.top\/?p=920\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u9510\u6377\u4ea4\u6362\u673a\u5e38\u7528\u914d\u7f6e\u547d\u4ee4\u6c47\u603b\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-920","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=920"}],"version-history":[{"count":1,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/920\/revisions"}],"predecessor-version":[{"id":963,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/920\/revisions\/963"}],"wp:attachment":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}