{"id":1119,"date":"2022-03-22T13:38:46","date_gmt":"2022-03-22T05:38:46","guid":{"rendered":"https:\/\/b.yesiyu.top\/?p=1119"},"modified":"2022-03-22T13:56:03","modified_gmt":"2022-03-22T05:56:03","slug":"%e5%8d%8e%e4%b8%ba%e3%80%81h3c%e3%80%81%e9%94%90%e6%8d%b7%e4%b8%89%e5%ae%b6%e4%ba%a4%e6%8d%a2%e6%9c%ba%e9%85%8d%e7%bd%ae%e5%91%bd%e4%bb%a4%e8%af%a6%e8%a7%a3-2","status":"publish","type":"post","link":"https:\/\/b.yesiyu.top\/?p=1119","title":{"rendered":"\u534e\u4e3a\u3001H3C\u3001\u9510\u6377\u4e09\u5bb6\u4ea4\u6362\u673a\u914d\u7f6e\u547d\u4ee4\u8be6\u89e3"},"content":{"rendered":"<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section><strong>\u4e00\u3001\u534e\u4e3a\u4ea4\u6362\u673a\u57fa\u7840\u914d\u7f6e\u547d\u4ee4<\/strong><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p><strong>1\u3001\u521b\u5efavlan\uff1a<\/strong><\/p>\n<p>&lt;Quidway&gt;\u00a0 \u00a0 \u00a0\/\/\u7528\u6237\u89c6\u56fe\uff0c\u4e5f\u5c31\u662f\u5728Quidway\u6a21\u5f0f\u4e0b\u8fd0\u884c\u547d\u4ee4\u3002<br \/>\n&lt;Quidway&gt;system-view\u00a0 \u00a0 \u00a0 \/\/\u8fdb\u5165\u914d\u7f6e\u89c6\u56fe<br \/>\n[Quidway] vlan 10\u00a0 \u00a0 \u00a0 \u00a0\/\/\u521b\u5efavlan 10\uff0c\u5e76\u8fdb\u5165vlan10\u914d\u7f6e\u89c6\u56fe\uff0c\u5982\u679cvlan10\u5b58\u5728\u5c31\u76f4\u63a5\u8fdb\u5165vlan10\u914d\u7f6e\u89c6\u56fe<br \/>\n[Quidway-vlan10] quit\u00a0 \u00a0 \u00a0\/\/\u56de\u5230\u914d\u7f6e\u89c6\u56fe<br \/>\n[Quidway] vlan 100\u00a0 \u00a0 \u00a0\/\/\u521b\u5efavlan 100\uff0c\u5e76\u8fdb\u5165vlan100\u914d\u7f6e\u89c6\u56fe\uff0c\u5982\u679cvlan10\u5b58\u5728\u5c31\u76f4\u63a5\u8fdb\u5165vlan100\u914d\u7f6e\u89c6\u56fe<\/p>\n<p>[Quidway-vlan100] quit\u00a0 \u00a0 \u00a0\/\/\u56de\u5230\u914d\u7f6e\u89c6\u56fe<\/p>\n<p><strong>2\u3001\u5c06\u7aef\u53e3\u52a0\u5165\u5230vlan\u4e2d\uff1a<\/strong><\/p>\n<p>[Quidway] interface GigabitEthernet2\/0\/1\u00a0 \u00a0 (10G\u5149\u53e3)<br \/>\n[Quidway- GigabitEthernet2\/0\/1] port link-type access\u00a0 \u00a0 \/\/\u5b9a\u4e49\u7aef\u53e3\u4f20\u8f93\u6a21\u5f0f<br \/>\n[Quidway- GigabitEthernet2\/0\/1] port default vlan 100\u00a0 \u00a0\/\/\u5c06\u7aef\u53e3\u52a0\u5165vlan100<br \/>\n[Quidway- GigabitEthernet2\/0\/1] quit\u00a0 \u00a0 \u00a0 \u00a0\/\/\u56de\u5230\u914d\u7f6e\u89c6\u56fe<\/p>\n<p>[Quidway] interface GigabitEthernet1\/0\/0\u00a0 \u00a0 \u00a0 \u00a0\/\/\u8fdb\u51651\u53f7\u63d2\u69fd\u4e0a\u7684\u7b2c\u4e00\u4e2a\u5343\u5146\u7f51\u53e3\u914d\u7f6e\u89c6\u56fe\u4e2d\u30020\u4ee3\u88681\u53f7\u53e3<br \/>\n[Quidway- GigabitEthernet1\/0\/0] port link-type access\u00a0 \u00a0\/\/\u5b9a\u4e49\u7aef\u53e3\u4f20\u8f93\u6a21\u5f0f<br \/>\n[Quidway- GigabitEthernet2\/0\/1] port default vlan 10\u00a0 \u00a0\/\/\u5c06\u8fd9\u4e2a\u7aef\u53e3\u52a0\u5165\u5230vlan10\u4e2d<br \/>\n[Quidway- GigabitEthernet2\/0\/1] quit<\/p>\n<p>3\u3001\u5c06\u591a\u4e2a\u7aef\u53e3\u52a0\u5165\u5230VLAN\u4e2d<\/p>\n<p>&lt;Quidway&gt;system-view<br \/>\n[Quidway]vlan 10<br \/>\n[Quidway-vlan10]port GigabitEthernet 1\/0\/0 to 1\/0\/29\u00a0 \u00a0\/\/\u5c060\u523029\u53f7\u53e3\u52a0\u5165\u5230vlan10\u4e2d<br \/>\n[Quidway-vlan10]quit<\/p>\n<p>4\u3001\u4ea4\u6362\u673a\u914d\u7f6eIP\u5730\u5740<\/p>\n<p>[Quidway] interface Vlanif100\u00a0 \u00a0 \u00a0\/\/ \u8fdb\u5165vlan100\u63a5\u53e3\u89c6\u56fe\u4e0evlan 100\u547d\u4ee4\u8fdb\u5165\u7684\u5730\u65b9\u4e0d\u540c<br \/>\n[Quidway-Vlanif100] ip address 119.167.200.90 255.255.255.252\u00a0 \u00a0 \u00a0 \/\/ \u5b9a\u4e49vlan100\u7ba1\u7406IP\u4e09\u5c42\u00a0\u4ea4\u6362\u7f51\u5173\u8def\u7531<br \/>\n[Quidway-Vlanif100] quit\u00a0 \u00a0 \u00a0 \u00a0\/\/\u8fd4\u56de\u89c6\u56fe<br \/>\n[Quidway] interface Vlanif10\u00a0 \u00a0 \/\/ \u8fdb\u5165vlan10\u63a5\u53e3\u89c6\u56fe\u4e0evlan 10\u547d\u4ee4\u8fdb\u5165\u7684\u5730\u65b9\u4e0d\u540c<br \/>\n[Quidway-Vlanif10] ip address 119.167.206.129 255.255.255.128\u00a0 \u00a0 \/\/ \u5b9a\u4e49vlan10\u7ba1\u7406IP\u4e09\u5c42\u4ea4\u6362\u7f51\u5173\u8def\u7531<\/p>\n<p>[Quidway-Vlanif10] quit<\/p>\n<p>5\u3001\u914d\u7f6e\u9ed8\u8ba4\u7f51\u5173\uff1a<\/p>\n<p>[Quidway]ip route-static 0.0.0.0 0.0.0.0 119.167.200.89\u00a0\/\/\u914d\u7f6e\u9ed8\u8ba4\u7f51\u5173\u3002<\/p>\n<p>6\u3001 \u4ea4\u6362\u673a\u4fdd\u5b58\u8bbe\u7f6e\u548c\u91cd\u7f6e\u547d\u4ee4<\/p>\n<p>&lt;Quidway&gt;save\u00a0 \u00a0 \u00a0 \u00a0 \/\/\u4fdd\u5b58\u914d\u7f6e\u4fe1\u606f<br \/>\n&lt;Quidway&gt;reset saved-configuration\u00a0 \u00a0 \u00a0\/\/\u91cd\u7f6e\u4ea4\u6362\u673a\u7684\u914d\u7f6e<br \/>\n&lt;Quidway&gt;reboot\u00a0 \u00a0 \u00a0 \/\/\u91cd\u65b0\u542f\u52a8\u4ea4\u6362\u673a<\/p>\n<p>7\u3001\u4ea4\u6362\u673a\u5e38\u7528\u7684\u663e\u793a\u547d\u4ee4<\/p>\n<p>\u7528\u6237\u89c6\u56fe\u6a21\u5f0f\u4e0b\uff1a<br \/>\n&lt;Quidway&gt;display current-configuration\u00a0 \u00a0\u00a0 \/\/\u663e\u793a\u73b0\u5728\u4ea4\u6362\u673a\u6b63\u5728\u8fd0\u884c\u7684\u914d\u7f6e\u660e\u7ec6<br \/>\n&lt;Quidway&gt;display device\u00a0 \u00a0 \u00a0\u00a0 \/\/\u663e\u793a\u5404\u8bbe\u5907\u72b6\u6001<br \/>\n&lt;Quidway&gt;display interface \uff1f\u00a0 \u00a0\u00a0\/\/\u663e\u793a\u4e2a\u7aef\u53e3\u72b6\u6001\uff0c\u7528\uff1f\u53ef\u4ee5\u67e5\u770b\u540e\u8fb9\u8ddf\u7684\u9009\u9879<br \/>\n&lt;Quidway&gt;display version\u00a0 \u00a0 \u00a0 \/\/\u67e5\u770b\u4ea4\u6362\u673a\u56fa\u4ef6\u7248\u672c\u4fe1\u606f<br \/>\n&lt;Quidway&gt;display vlan \uff1f\u00a0 \u00a0 \u00a0\u00a0\/\/ \u67e5\u770bvlan\u7684\u914d\u7f6e\u4fe1\u606f<\/p>\n<p>8\u3001\u6062\u590d\u4ea4\u6362\u673a\u51fa\u5382\u8bbe\u7f6e<\/p>\n<p>&lt;Quidway&gt;reset saved-configuration\u00a0 \u00a0 \/\/\u91cd\u7f6e\u4ea4\u6362\u673a\u7684\u914d\u7f6e<\/p>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section><strong>\u4e8c\u3001H3C\u4ea4\u6362\u673a\u7684\u57fa\u672c\u914d\u7f6e<\/strong><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>\u6211\u4eec\u5148\u6765\u4e86\u89e3\u4e0bh3c\u7684\u914d\u7f6e\u547d\u4ee4\u4e0e\u529f\u80fd\uff0c\u90fd\u662f\u5e38\u7528\u7684\uff0c\u57fa\u672c\u4e0a\u5927\u90e8\u5206\u7f51\u7edc\u914d\u7f6e\u90fd\u5c11\u4e0d\u4e86\u8fd9\u4e9b\u547d\u4ee4\u3002<\/p>\n<section>1\u3001\u57fa\u672c\u914d\u7f6e<\/section>\n<section>&lt;H3C&gt;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \/\/\u7528\u6237\u76f4\u884c\u6a21\u5f0f\u63d0\u793a\u7b26,\u7528\u6237\u89c6\u56fe\u00a0<\/section>\n<section>&lt;H3C&gt;system-view\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/<strong>\u8fdb\u5165\u914d\u7f6e\u89c6\u56fe\u00a0<\/strong><br \/>\n[H3C] sysname xxx\u00a0 \u00a0 \u00a0\/\/\u8bbe\u7f6e\u4e3b\u673a\u540d\u6210\u4e3axxx\u8fd9\u91cc\u4f7f\u7528\u4fee\u6539\u7279\u6743\u7528\u6237\u5bc6\u7801<\/section>\n<p>2\u3001\u7528\u6237\u914d\u7f6e<\/p>\n<p>&lt;H3C&gt;system-view<\/p>\n<p>[H3C]super password H3C\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u8bbe\u7f6e\u7528\u6237\u5206\u7ea7\u5bc6\u7801<\/p>\n<p>[H3C]undo superpassword\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u5220\u9664\u7528\u6237\u5206\u7ea7\u5bc6\u7801<\/p>\n<p>[H3C]localuser bigheap 1234561\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/Web\u7f51\u7ba1\u7528\u6237\u8bbe\u7f6e,1\u4e3a\u7ba1\u7406\u7ea7\u7528\u6237<\/p>\n<p>[H3C]undo localuser bigheap\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \/\/\u5220\u9664Web\u7f51\u7ba1\u7528\u6237<\/p>\n<p>[H3C]user-interface aux 0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u53ea\u652f\u63010<\/p>\n<p>[H3C-Aux]idle-timeout 250\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u8bbe\u7f6e\u8d85\u65f6\u4e3a2\u520650\u79d2,\u82e5\u4e3a0\u5219\u8868\u793a\u4e0d\u8d85\u65f6,\u9ed8\u8ba4\u4e3a5\u5206\u949f<\/p>\n<p>[H3C-Aux]undoidle-timeout\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u6062\u590d\u9ed8\u8ba4\u503c<\/p>\n<p>[H3C]user-interface vty 0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u53ea\u652f\u63010\u548c1<\/p>\n<p>[H3C-vty]idle-timeout 250\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u8bbe\u7f6e\u8d85\u65f6\u4e3a2\u520650\u79d2,\u82e5\u4e3a0\u5219\u8868\u793a\u4e0d\u8d85\u65f6,\u9ed8\u8ba4\u4e3a5\u5206\u949f<\/p>\n<p>[H3C-vty]undoidle-timeout\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u6062\u590d\u9ed8\u8ba4\u503c<\/p>\n<p>[H3C-vty]set authentication password123456\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u8bbe\u7f6etelnet\u5bc6\u7801,\u5fc5\u987b\u8bbe\u7f6e<\/p>\n<p>[H3C-vty]undo set authenticationpassword\u00a0 \u00a0 \u00a0\u00a0\/\/\u53d6\u6d88\u5bc6\u7801<\/p>\n<p>[H3C]displayusers\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u663e\u793a\u7528\u6237<\/p>\n<p>[H3C]displayuser-interface\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \/\/\u7528\u6237\u754c\u9762\u72b6\u6001<\/p>\n<section>\n<section>\n<section>\n<section>\n<section><\/section>\n<section>3\u3001vlan\u914d\u7f6e<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>[H3C]vlan 2\u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0<strong>\u00a0\u00a0 \u00a0 \u00a0\/\/\u521b\u5efaVLAN2<\/strong><\/p>\n<p>[H3C]undo vlanall\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \/\/\u5220\u9664\u9664\u7f3a\u7701VLAN\u5916\u7684\u6240\u6709VLAN,\u7f3a\u7701VLAN\u4e0d\u80fd\u88ab\u5220\u9664<\/p>\n<p>[H3C-vlan2]port Ethernet 0\/4 to Ethernet0\/7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \/\/\u5c064\u52307\u53f7\u7aef\u53e3\u52a0\u5165\u5230VLAN2\u4e2d,\u6b64\u547d\u4ee4\u53ea\u80fd\u7528\u6765\u52a0access\u7aef\u53e3,\u4e0d\u80fd\u7528\u6765\u589e\u52a0trunk\u6216\u8005hybrid\u7aef\u53e3<\/p>\n<p>[H3C-vlan2]port-isolate enable\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u6253\u5f00VLAN\u5185\u7aef\u53e3\u9694\u79bb\u7279\u6027\uff0c\u4e0d\u80fd\u4e8c\u5c42\u8f6c\u53d1,<strong>\u9ed8\u8ba4\u4e0d\u542f\u7528\u8be5\u529f\u80fd<\/strong><\/p>\n<p>[H3C-Ethernet0\/4]port-isolate uplink-portvlan 2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u8bbe\u7f6e4\u4e3aVLAN2\u7684<strong>\u9694\u79bb\u4e0a\u884c\u7aef\u53e3<\/strong>\uff0c\u7528\u4e8e\u8f6c\u53d1\u4e8c\u5c42\u6570\u636e,\u53ea\u80fd\u914d\u7f6e\u4e00\u4e2a\u4e0a\u884c\u7aef\u53e3,\u82e5\u4e3atrunk,\u5219\u5efa\u8bae\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7,\u9694\u79bb\u4e0d\u80fd\u4e0e\u6c47\u805a\u540c\u65f6\u914d\u7f6e<\/p>\n<p>[H3C]display vlan all\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/<strong>\u663e\u793a\u6240\u6709VLAN\u7684\u8be6\u7ec6\u4fe1\u606f<\/strong><\/p>\n<p>[H3C]user-group 20\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/\u521b\u5efauser-group 20\uff0c\u9ed8\u8ba4\u53ea\u5b58\u5728user-group 1<\/p>\n<p>[H3C-UserGroup20]port Ethernet 0\/4 toEthernet 0\/7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/<strong>\u5c064\u52307\u53f7\u7aef\u53e3\u52a0\u5165\u5230VLAN20\u4e2d\uff0c<\/strong>\u521d\u59cb\u65f6\u90fd\u5c5e\u4e8euser-group 1\u4e2d<\/p>\n<p>[H3C]display user-group 20\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/\u663e\u793auser-group 20\u7684\u76f8\u5173\u4fe1\u606f<\/p>\n<section>\n<section>\n<section>\n<section>\n<section>\u56db\u3001\u4ea4\u6362\u673aip\u914d\u7f6e<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>[H3C]vlan 20\u00a0 \u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/<strong>\u521b\u5efavlan<\/strong><\/p>\n<p>[H3C]management-vlan 20\u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0\u00a0\/\/\u7ba1\u7406vlan<\/p>\n<p>[H3C]interface vlan-interface 20\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/<strong>\u8fdb\u5165\u5e76\u7ba1\u7406vlan20<\/strong><\/p>\n<p>[H3C]undo interface vlan-interface 20\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5220\u9664\u7ba1\u7406VLAN\u7aef\u53e3<\/p>\n<p>[H3C-Vlan-interface20]ip address192.168.1.2 255.255.255.0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/<strong>\u914d\u7f6e\u7ba1\u7406VLAN\u63a5\u53e3\u9759\u6001IP\u5730\u5740<\/strong><\/p>\n<p>[H3C-Vlan-interface20]undo ipaddress\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5220\u9664IP\u5730\u5740<\/p>\n<p>[H3C-Vlan-interface20]ip gateway 192.168.1.1\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u6307\u5b9a\u7f3a\u7701\u7f51\u5173(\u9ed8\u8ba4\u65e0\u7f51\u5173\u5730\u5740)<\/p>\n<p>[H3C-Vlan-interface20]undo ip gateway<\/p>\n<p>[H3C-Vlan-interface20]shutdown\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/<strong>\u5173\u95ed\u63a5\u53e3<\/strong><\/p>\n<p>[H3C-Vlan-interface20]undo shutdown\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5f00\u542f<\/p>\n<p>[H3C]display ip\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u663e\u793a\u7ba1\u7406VLAN\u63a5\u53e3IP\u7684\u76f8\u5173\u4fe1\u606f<\/p>\n<p>[H3C]display interface vlan-interface20\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u67e5\u770b\u7ba1\u7406VLAN\u7684\u63a5\u53e3\u4fe1\u606f<\/p>\n<p>&lt;H3C&gt;debugging ip\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5f00\u542fIP\u8c03\u8bd5\u529f\u80fd<\/p>\n<p>&lt;H3C&gt;undo debugging ip<\/p>\n<section>\n<section>\n<section>\n<section>\n<section>5\u3001DHCP\u5ba2\u6237\u7aef\u914d\u7f6e<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>[H3C-Vlan-interface20]ip address dhcp-alloc\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/ \u7ba1\u7406VLAN\u63a5\u53e3<strong>\u901a\u8fc7DHCP\u65b9\u5f0f\u83b7\u53d6IP\u5730\u5740<\/strong><\/p>\n<p>[H3C-Vlan-interface20]undo ip address dhcp-alloc\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/ \u53d6\u6d88<\/p>\n<p>[H3C]display dhcp\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/\u663e\u793aDHCP\u5ba2\u6237\u4fe1\u606f<\/p>\n<p>&lt;H3C&gt;debugging dhcp-alloc\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5f00\u542fDHCP\u8c03\u8bd5\u529f\u80fd<\/p>\n<p>&lt;H3C&gt;undo debugging dhcp-alloc<\/p>\n<section>\n<section>\n<section>\n<section>\n<section>6\u3001\u7aef\u53e3\u914d\u7f6e<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>[H3C]interface Ethernet0\/3\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/\u8fdb\u5165\u7aef\u53e3<\/p>\n<p>[H3C-Ethernet0\/3]shutdown\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/\u5173\u95ed\u7aef\u53e3<\/p>\n<p>[H3C-Ethernet0\/3]speed 100\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u901f\u7387\u53ef\u4e3a10,100,1000\u548cauto(\u7f3a\u7701)<\/p>\n<p>[H3C-Ethernet0\/3]duplexfull\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/<strong>\u53cc\u5de5,\u53ef<\/strong>\u4e3ahalf,full\u548cauto\uff0c\u5149\u53e3\u548c\u6c47\u805a\u540e\u4e0d\u80fd\u914d\u7f6e<\/p>\n<p>[H3C-Ethernet0\/3]flow-control\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/<strong>\u5f00\u542f\u6d41\u63a7\uff0c\u9ed8\u8ba4\u4e3a\u5173\u95ed<\/strong><\/p>\n<p>[H3C-Ethernet0\/3]broadcast-suppression 20\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u8bbe\u7f6e\u6291\u5236\u5e7f\u64ad\u767e\u5206\u6bd4\u4e3a20%,\u53ef\u53d65,10,20,100,\u7f3a\u7701\u4e3a100,\u540c\u65f6\u7ec4\u64ad\u548c\u672a\u77e5\u5355\u64ad\u4e5f\u53d7\u6b64\u5f71\u54cd<\/p>\n<p>[H3C-Ethernet0\/3]loopback internal\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5185\u73af\u6d4b\u8bd5<\/p>\n<p>[H3C-Ethernet0\/3]port link-type trunk\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u8bbe\u7f6e\u94fe\u8def\u7684<strong>\u7c7b\u578b\u4e3atrunk<\/strong><\/p>\n<p>[H3C-Ethernet0\/3]port trunk pvid vlan 20\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u8bbe\u7f6e20\u4e3a\u8be5trunk\u7684\u7f3a\u7701VLAN\uff0c\u9ed8\u8ba4\u4e3a1(trunk\u7ebf\u8def\u4e24\u7aef\u7684PVID\u5fc5\u987b\u4e00\u81f4)<\/p>\n<p>[H3C-Ethernet0\/3]port access vlan 20\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5c06\u5f53\u524d<strong>access\u7aef\u53e3\u52a0\u5165\u6307\u5b9a\u7684VLAN<\/strong><\/p>\n<p>[H3C-Ethernet0\/3]port trunk permit vlanall\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5141\u8bb8<strong>\u6240\u6709\u7684VLAN\u901a\u8fc7\u5f53\u524d\u7684trunk\u7aef\u53e3,<\/strong>\u53ef\u591a\u6b21\u4f7f\u7528\u8be5\u547d\u4ee4<\/p>\n<p>[H3C-Ethernet0\/3]mdiauto\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u8bbe\u7f6e\u4ee5\u592a\u7aef\u53e3\u4e3a\u81ea\u52a8\u76d1\u6d4b,normal\u4e3a\u76f4\u901a\u7ebf,across\u4e3a\u4ea4\u53c9\u7ebf<\/p>\n<p>[H3C]link-aggregation Ethernet 0\/1 toEthernet 0\/4\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/<strong>\u5c061-4\u53e3\u52a0\u5165\u6c47\u805a\u7ec4,<\/strong>1\u4e3a\u4e3b\u7aef\u53e3,\u4e24\u7aef\u9700\u8981\u540c\u65f6\u914d\u7f6e,\u8bbe\u7f6e\u4e86\u7aef\u53e3\u955c\u50cf\u4ee5\u53ca\u7aef\u53e3\u9694\u79bb\u7684\u7aef\u53e3\u65e0\u6cd5\u6c47\u805a<\/p>\n<p>[H3C]undo link-aggregation Ethernet 0\/1\u00a0\u00a0\u00a0 \u00a0\/\/\u5220\u9664\u8be5\u6c47\u805a\u7ec4<\/p>\n<p>[H3C]link-aggregation mode egress\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u914d\u7f6e\u7aef\u53e3\u6c47\u805a\u6a21\u5f0f\u4e3a\u6839\u636e\u76ee\u7684MAC\u5730\u5740\u8fdb\u884c\u8d1f\u8377\u5206\u62c5,\u53ef\u9009\u4e3a\u00a0 ingress,egress\u548cboth,\u7f3a\u7701\u4e3aboth<\/p>\n<p>[H3C]monitor-port Ethernet 0\/2\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/<strong>\u5c06\u8be5\u7aef\u53e3\u8bbe\u7f6e\u4e3a\u955c\u50cf\u7aef\u53e3<\/strong>,\u5fc5\u987b\u5148\u8bbe\u7f6e\u955c\u50cf\u7aef\u53e3,\u5220\u9664\u65f6\u5fc5\u987b\u5148\u5220\u9664\u88ab\u955c\u50cf\u7aef\u53e3,\u800c\u4e14\u5b83\u4eec\u4e0d\u80fd\u540c\u5728\u4e00\u4e2a\u7aef\u53e3,\u8be5\u7aef\u53e3\u4e0d\u80fd\u5728\u6c47\u805a\u7ec4\u4e2d,\u8bbe\u7f6e\u65b0\u955c\u50cf\u7aef\u53e3\u65f6,\u65b0\u53d6\u4ee3\u65e7,\u88ab\u955c\u50cf\u4e0d\u53d8<\/p>\n<p>[H3C]mirroring-port Ethernet 0\/3 toEthernet 0\/4 both\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u5c06<strong>\u7aef\u53e33\u548c4\u8bbe\u7f6e\u4e3a\u88ab\u955c\u50cf\u7aef\u53e3<\/strong>,both\u4e3a\u540c\u65f6\u76d1\u63a7\u63a5\u6536\u548c\u53d1\u9001\u7684\u62a5\u6587,inbound\u8868\u793a\u4ec5\u76d1\u63a7\u63a5\u6536\u7684\u62a5\u6587,outbound\u8868\u793a\u4ec5\u76d1\u63a7\u53d1\u9001\u7684\u62a5\u6587<\/p>\n<p>[H3C]display mirror<\/p>\n<p>[H3C]display interface Ethernet 0\/3<\/p>\n<p>&lt;H3C&gt;resetcounters\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/<strong>\u6e05\u9664\u6240\u6709\u7aef\u53e3\u7684\u7edf\u8ba1\u4fe1\u606f<\/strong><\/p>\n<p>[H3C]display link-aggregation Ethernet0\/3\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/<strong>\u663e\u793a\u7aef\u53e3<\/strong>\u6c47\u805a\u4fe1\u606f<\/p>\n<p>[H3C-Ethernet0\/3]virtual-cable-test\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/\u8bca\u65ad\u8be5\u7aef\u53e3\u7684\u7535\u8def\u72b6\u51b5<\/p>\n<section>\n<section>\n<section>\n<section>\n<section>7\u3001qos\u4f18\u5148\u7ea7\u914d\u7f6e<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>\u00a0 QoS\u914d\u7f6e\u6b65\u9aa4\uff1a\u8bbe\u7f6e\u7aef\u53e3\u7684\u4f18\u5148\u7ea7,\u8bbe\u7f6e\u4ea4\u6362\u673a\u4fe1\u4efb\u62a5\u6587\u7684\u4f18\u5148\u7ea7\u65b9\u5f0f,\u961f\u5217\u8c03\u5ea6,\u7aef\u53e3\u9650\u901f<\/p>\n<p>[H3C-Ethernet0\/3]priority 7\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u8bbe\u7f6e\u7aef\u53e3<strong>\u4f18\u5148\u7ea7\u4e3a7<\/strong>\uff0c\u9ed8\u8ba4\u4e3a0<\/p>\n<p>[H3C]priority-trustcos\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u8bbe\u7f6e\u4ea4\u6362\u673a\u4fe1\u4efb\u62a5\u6587\u7684\u4f18\u5148\u7ea7\u65b9\u5f0f\u4e3acos(802.1p\u4f18\u5148\u7ea7,\u7f3a\u7701\u503c),\u8fd8\u53ef\u4ee5\u8bbe\u4e3adscp\u65b9\u5f0f<\/p>\n<p>[H3C]queue-scheduler hq-wrr 2 4 6 8\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u8bbe\u7f6e\u961f\u5217\u8c03\u5ea6\u7b97\u6cd5\u4e3aHQ-WRR(\u9ed8\u8ba4\u4e3aWRR),\u6743\u91cd\u4e3a2,4,6,8<\/p>\n<p>[H3C-Ethernet0\/3]line-rate inbound 29 \u00a0\u00a0\u00a0 \u00a0\/\/\u5c06<strong>\u7aef\u53e3\u8fdb\u53e3\u901f\u7387\u9650\u5236<\/strong>\u4e3a2Mbps,\u53d61-28\u65f6,\u901f\u7387\u4e3arate*8*1024\/125,\u537364,128,192&#8230;1.792M\uff1b<\/p>\n<p>29-127\u65f6,\u901f\u7387\u4e3a(rate-27)*1024,\u53732M,3M,4M&#8230;100M\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>[H3C]displayqueue-scheduler\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/\u663e\u793a\u961f\u5217\u8c03\u5ea6\u6a21\u5f0f\u53ca\u53c2\u6570<\/p>\n<p>[H3C]displaypriority-trust\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0\/\/<strong>\u663e\u793a\u4f18\u5148\u7ea7\u4fe1\u4efb\u6a21\u5f0f<\/strong><\/p>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section><strong>\u4e09\u3001\u9510\u6377\u4ea4\u6362\u673a\u57fa\u7840\u547d\u4ee4\u914d\u7f6e<\/strong><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>\u8fde\u63a5\u4e0a\u4ea4\u6362\u673a\u540e\uff0c\u80af\u5b9a\u662f\u9700\u8981\u8fdb\u884c\u547d\u4ee4\u914d\u7f6e\uff0c\u6211\u4eec\u6765\u770b\u4e0b\u57fa\u7840\u547d\u4ee4\u914d\u7f6e\u3002<\/p>\n<p>1\u3001\u51c6\u5907\u547d\u4ee4<\/p>\n<p>&gt;Enable\u00a0 \u00a0 \u00a0\u00a0\u00a0\/\/\u8fdb\u5165\u7279\u6743\u6a21\u5f0f<br \/>\n#Exit\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0\/\/\u8fd4\u56de\u4e0a\u4e00\u7ea7\u64cd\u4f5c\u6a21\u5f0f<br \/>\n#End\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\/\/\u8fd4\u56de\u5230\u7279\u6743\u6a21\u5f0f<br \/>\n#copy running-config startup-config\u00a0\u00a0\u00a0\u00a0\/\/\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6<br \/>\n#del flash:config.text\u00a0\u00a0\u00a0\u00a0\/\/\u5220\u9664\u914d\u7f6e\u6587\u4ef6(\u4ea4\u6362\u673a\u53ca1700\u7cfb\u5217\u8def\u7531\u5668)<br \/>\n#erase startup-config\u00a0\u00a0\u00a0\u00a0\/\/\u5220\u9664\u914d\u7f6e\u6587\u4ef6(2500\u7cfb\u5217\u8def\u7531\u5668)<br \/>\n#del flash:vlan.dat\u00a0 \u00a0\u00a0\/\/\u5220\u9664Vlan\u914d\u7f6e\u4fe1\u606f\uff08\u4ea4\u6362\u673a\uff09<br \/>\n#Configure terminal\u00a0 \u00a0\u00a0\/\/\u8fdb\u5165\u5168\u5c40\u914d\u7f6e\u6a21\u5f0f<br \/>\n(config)# hostname switchA\u00a0\u00a0\u00a0\u00a0\/\/\u914d\u7f6e\u8bbe\u5907\u540d\u79f0\u4e3aswitchA<br \/>\n(config)#banner motd &amp;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u914d\u7f6e\u6bcf\u65e5\u63d0\u793a\u4fe1\u606f &amp;\u4e3a\u7ec8\u6b62\u7b26<br \/>\n(config)#enable secret level 1 0 star\u00a0\u00a0\u00a0\u00a0\/\/\u914d\u7f6e\u8fdc\u7a0b\u767b\u9646\u5bc6\u7801\u4e3astar<br \/>\n(config)#enable secret level 15 0 star\u00a0\u00a0\u00a0\/\/\u914d\u7f6e\u7279\u6743\u5bc6\u7801\u4e3astar<br \/>\nLevel 1\u4e3a\u666e\u901a\u7528\u6237\u7ea7\u522b\uff0c\u53ef\u9009\u4e3a1~15\uff0c15\u4e3a\u6700\u9ad8\u6743\u9650\u7ea7\u522b\uff1b0\u8868\u793a\u5bc6\u7801\u4e0d\u52a0\u5bc6<br \/>\n(config)#enable services web-server\u00a0\u00a0\/\/\u5f00\u542f\u4ea4\u6362\u673aWEB\u7ba1\u7406\u529f\u80fd<br \/>\nServices \u53ef\u9009\u4ee5\u4e0b\uff1aweb-server(WEB\u7ba1\u7406)\u3001telnet-server(\u8fdc\u7a0b\u767b\u9646)\u7b49<\/p>\n<p>2\u3001\u67e5\u770b\u4fe1\u606f<\/p>\n<p>#show running-config\u00a0 \u00a0 \u00a0 \u00a0\/\/\u67e5\u770b\u5f53\u524d\u751f\u6548\u7684\u914d\u7f6e\u4fe1\u606f<br \/>\n#show interface fastethernet 0\/3\u00a0\u00a0 \/\/\u67e5\u770bF0\/3\u7aef\u53e3\u4fe1\u606f<br \/>\n#show interface serial 1\/2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u67e5\u770bS1\/2\u7aef\u53e3\u4fe1\u606f<br \/>\n#show interface\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u67e5\u770b\u6240\u6709\u7aef\u53e3\u4fe1\u606f<br \/>\n#show ip interface brief\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u4ee5\u7b80\u6d01\u65b9\u5f0f\u6c47\u603b\u67e5\u770b\u6240\u6709\u7aef\u53e3\u4fe1\u606f<br \/>\n#show ip interface\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u67e5\u770b\u6240\u6709\u7aef\u53e3\u4fe1\u606f<br \/>\n#show version\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u67e5\u770b\u7248\u672c\u4fe1\u606f<br \/>\n#show mac-address-table\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u67e5\u770b\u4ea4\u6362\u673a\u5f53\u524dMAC\u5730\u5740\u8868\u4fe1\u606f<br \/>\n#show running-config\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u67e5\u770b\u5f53\u524d\u751f\u6548\u7684\u914d\u7f6e\u4fe1\u606f<br \/>\n#show vlan\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u67e5\u770b\u6240\u6709VLAN\u4fe1\u606f<br \/>\n#show vlan id 10\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u67e5\u770b\u67d0\u4e00VLAN (\u5982VLAN10)\u7684\u4fe1\u606f<br \/>\n#show interface fastethernet 0\/1\u00a0 \u00a0\/\/\u67e5\u770b\u67d0\u4e00\u7aef\u53e3\u6a21\u5f0f(\u5982F 0\/1)<br \/>\n#show aggregateport 1 summary\u00a0\u00a0\u00a0\u00a0\/\/\u67e5\u770b\u805a\u5408\u7aef\u53e3AG1\u7684\u4fe1\u606f<br \/>\n#show spanning-tree\u00a0 \u00a0 \u00a0\u00a0\/\/\u67e5\u770b\u751f\u6210\u6811\u914d\u7f6e\u4fe1\u606f<br \/>\n#show spanning-tree interface fastethernet 0\/1\u00a0 \u00a0\/\/\u67e5\u770b\u8be5\u7aef\u53e3\u7684\u751f\u6210\u6811\u72b6\u6001<br \/>\n#show port-security\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u67e5\u770b\u4ea4\u6362\u673a\u7684\u7aef\u53e3\u5b89\u5168\u914d\u7f6e\u4fe1\u606f<br \/>\n#show port-security address\u00a0\u00a0 \u00a0\/\/\u67e5\u770b\u5730\u5740\u5b89\u5168\u7ed1\u5b9a\u914d\u7f6e\u4fe1\u606f<br \/>\n#show ip access-lists listname\u00a0 \u00a0\/\/\u67e5\u770b\u540d\u4e3alistname\u7684\u5217\u8868\u7684\u914d\u7f6e\u4fe1\u606f<\/p>\n<p>3\u3001\u7aef\u53e3\u7684\u57fa\u672c\u914d\u7f6e<br \/>\n(config)#Interface fastethernet 0\/3\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/\u8fdb\u5165F0\/3\u7684\u7aef\u53e3\u914d\u7f6e\u6a21\u5f0f<br \/>\n(config)#interface range fa 0\/1-2,0\/5,0\/7-9\u00a0 \u00a0 \u00a0\/\/\u8fdb\u5165F0\/1\u3001F0\/2\u3001F0\/5\u3001F0\/7\u3001F0\/8\u3001F0\/9\u7684\u7aef\u53e3\u914d\u7f6e\u6a21\u5f0f<br \/>\n(config-if)#speed 10\u00a0 \u00a0 \u00a0 \/\/\u914d\u7f6e\u7aef\u53e3\u901f\u7387\u4e3a10M,\u53ef\u900910,100,auto<br \/>\n(config-if)#duplex full\u00a0 \u00a0 \u00a0\/\/\u914d\u7f6e\u7aef\u53e3\u4e3a\u5168\u53cc\u5de5\u6a21\u5f0f,\u53ef\u9009full(\u5168\u53cc\u5de5),half(\u534a\u53cc\u5f0f),auto(\u81ea\u9002\u5e94)<br \/>\n(config-if)#no shutdown\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\/\/\u5f00\u542f\u8be5\u7aef\u53e3<br \/>\n(config-if)#switchport access vlan 10\u00a0 \u00a0 \u00a0\/\/\u5c06\u8be5\u7aef\u53e3\u5212\u5165VLAN10\u4e2d,\u7528\u4e8eVLAN<br \/>\n(config-if)#switchport mode trunk\u00a0 \u00a0 \u00a0 \/\/\u5c06\u8be5\u7aef\u53e3\u8bbe\u4e3atrunk\u6a21\u5f0f,\u53ef\u9009\u6a21\u5f0f\u4e3aaccess , trunk<br \/>\n(config-if)#port-group 1\u00a0\u00a0\u00a0 \u00a0\/\/\u5c06\u8be5\u7aef\u53e3\u5212\u5165\u805a\u5408\u7aef\u53e3AG1\u4e2d,\u7528\u4e8e\u805a\u5408\u7aef\u53e3<\/p>\n<p>4\u3001\u805a\u5408\u7aef\u53e3\u7684\u521b\u5efa<\/p>\n<p>(config)# interface aggregateport 1\u00a0\u00a0 \u00a0\/\/\u521b\u5efa\u805a\u5408\u63a5\u53e3AG1<br \/>\n(config-if)# switchport mode trunk\u00a0\u00a0 \u00a0\/\/\u914d\u7f6e\u5e76\u4fdd\u8bc1AG1\u4e3a trunk \u6a21\u5f0f<br \/>\n(config)#int f0\/23-24<br \/>\n(config-if-range)#port-group 1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/\u5c06\u7aef\u53e3\uff08\u7aef\u53e3\u7ec4\uff09\u5212\u5165\u805a\u5408\u7aef\u53e3AG1\u4e2d<\/p>\n<p>5\u3001\u751f\u6210\u6811<\/p>\n<p><strong>\u914d\u7f6e\u591a\u751f\u6210\u6811\u534f\u8bae:<\/strong><\/p>\n<p>switch(config)#spanning-tree\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\/\/\u5f00\u542f\u751f\u6210\u6811\u534f\u8bae<\/p>\n<p>switch(config)#spanning-tree mst configuration\u00a0\u00a0\u00a0\u00a0 \/\/\u5efa\u7acb\u591a\u751f\u6210\u6811\u534f\u8bae<br \/>\nswitch(config-mst)#name ruijie\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/\u547d\u540d\u4e3aruijie<br \/>\nswitch(config-mst)#revision 1\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/\u8bbe\u5b9a\u6821\u8ba2\u672c\u4e3a1<br \/>\nswitch(config-mst)#instance 0 vlan 10,20\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u5efa\u7acb\u5b9e\u4f8b0<br \/>\nswitch(config-mst)#instance 1 vlan 30,40\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u5efa\u7acb\u5b9e\u4f8b1<br \/>\nswitch(config)#spanning-tree mst 0 priority 4096\u00a0\u00a0 \/\/\u8bbe\u7f6e\u4f18\u5148\u7ea7\u4e3a4096<br \/>\nswitch(config)#spanning-tree mst 1 priority 8192\u00a0\u00a0 \/\/\u8bbe\u7f6e\u4f18\u5148\u7ea7\u4e3a8192<br \/>\nswitch(config)#interface vlan 10<br \/>\nswitch(config-if)#vrrp 1 ip 192.168.10.1 \/\/\u6b64\u4e3avlan 10\u7684IP\u5730\u5740<br \/>\nswitch(config)#interface vlan 20<br \/>\nswitch(config-if)#vrrp 1 ip 192.168.20.1 \/\/\u6b64\u4e3avlan 20\u7684IP\u5730\u5740<br \/>\nswitch(config)#interface vlan 30<br \/>\nswitch(config-if)#vrrp 2 ip 192.168.30.1 \/\/\u6b64\u4e3avlan 30\u7684IP\u5730\u5740(\u53e6\u4e00\u4e09\u5c42\u4ea4\u6362\u673a)<br \/>\nswitch(config)#interface vlan 40<br \/>\nswitch(config-if)#vrrp 2 ip 192.168.40.1 \/\/\u6b64\u4e3avlan 40\u7684IP\u5730\u5740(\u53e6\u4e00\u4e09\u5c42\u4ea4\u6362\u673a)<\/p>\n<p>6\u3001VLAN\u7684\u57fa\u672c\u914d\u7f6e<\/p>\n<p>(config)#vlan 10\u00a0 \u00a0 \u00a0 \u00a0\/\/\u521b\u5efaVLAN10<br \/>\n(config-vlan)#name vlanname\u00a0 \u00a0 \u00a0 \/\/ \u547d\u540dVLAN\u4e3avlanname<br \/>\n(config-if)#switchport access vlan 10\u00a0 \u00a0 \u00a0\/\/\u5c06\u8be5\u7aef\u53e3\u5212\u5165VLAN10\u4e2d<br \/>\n\u67d0\u7aef\u53e3\u7684\u63a5\u53e3\u914d\u7f6e\u6a21\u5f0f\u4e0b\u8fdb\u884c<br \/>\n(config)#interface vlan 10\u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0\/\/\u8fdb\u5165VLAN 10\u7684\u865a\u62df\u7aef\u53e3\u914d\u7f6e\u6a21\u5f0f<br \/>\n(config-if)# ip address 192.168.1.1 255.255.255.0\u00a0 \u00a0 \u00a0\/\/\u4e3aVLAN10\u7684\u865a\u62df\u7aef\u53e3\u914d\u7f6eIP\u53ca\u63a9\u7801\uff0c\u4e8c\u5c42\u4ea4\u6362\u673a\u53ea\u80fd\u914d\u7f6e\u4e00\u4e2aIP\uff0c\u6b64IP\u662f\u4f5c\u4e3a\u7ba1\u7406IP\u4f7f\u7528\uff0c\u4f8b\u5982\uff0c\u4f7f\u7528Telnet\u7684\u65b9\u5f0f\u767b\u5f55\u7684IP\u5730\u5740<br \/>\n(config-if)# no shutdown\u00a0 \u00a0 \u00a0 \u00a0\u00a0\/\/\u542f\u7528\u8be5\u7aef\u53e3<\/p>\n<p>7\u3001\u7aef\u53e3\u5b89\u5168<\/p>\n<p>(config)# interface fastethernet 0\/1\u00a0\u00a0\u00a0\u00a0 \u00a0\/\/\u8fdb\u5165\u4e00\u4e2a\u7aef\u53e3<br \/>\n(config-if)# switchport port-security\u00a0\u00a0\u00a0 \u00a0\/\/\u5f00\u542f\u8be5\u7aef\u53e3\u7684\u5b89\u5168\u529f\u80fd<\/p>\n<p>a\u3001\u914d\u7f6e\u6700\u5927\u8fde\u63a5\u6570\u9650\u5236<\/p>\n<p>(config-if)# switchport port-secruity maxmum 1\u00a0 \u00a0 \u00a0\/\/\u914d\u7f6e\u7aef\u53e3\u7684\u6700\u5927\u8fde\u63a5\u6570\u4e3a1\uff0c\u6700\u5927\u8fde\u63a5\u6570\u4e3a128<br \/>\n(config-if)# switchport port-secruity violation shutdown<br \/>\n\/\/\u914d\u7f6e\u5b89\u5168\u8fdd\u4f8b\u7684\u5904\u7406\u65b9\u5f0f\u4e3ashutdown\uff0c\u53ef\u9009\u4e3aprotect (\u5f53\u5b89\u5168\u5730\u5740\u6570\u6ee1\u540e\uff0c\u5c06\u672a\u77e5\u540d\u5730\u5740\u4e22\u5f03)\u3001restrict(\u5f53\u8fdd\u4f8b\u65f6\uff0c\u53d1\u9001\u4e00\u4e2aTrap\u901a\u77e5)\u3001shutdown(\u5f53\u8fdd\u4f8b\u65f6\u5c06\u7aef\u53e3\u5173\u95ed\uff0c\u5e76\u53d1\u9001Trap\u901a\u77e5\uff0c\u53ef\u5728\u5168\u5c40\u6a21\u5f0f\u4e0b\u7528errdisable recovery\u6765\u6062\u590d)<\/p>\n<p><strong>b\u3001IP\u548cMAC\u5730\u5740\u7ed1\u5b9a<\/strong><\/p>\n<p>(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx ip-address 172.16.1.1<br \/>\n\/\/\u63a5\u53e3\u914d\u7f6e\u6a21\u5f0f\u4e0b\u914d\u7f6eMAC\u5730\u5740xxxx.xxxx.xxxx\u548cIP172.16.1.1\u8fdb\u884c\u7ed1\u5b9a(MAC\u5730\u5740\u6ce8\u610f\u7528\u5c0f\u5199)<\/p>\n<p>8\u3001\u4e09\u5c42\u8def\u7531\u529f\u80fd(\u9488\u5bf9\u4e09\u5c42\u4ea4\u6362\u673a)<\/p>\n<p>(config)# ip routing\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0\/\/\u5f00\u542f\u4e09\u5c42\u4ea4\u6362\u673a\u7684\u8def\u7531\u529f\u80fd<br \/>\n(config)# interface fastethernet 0\/1<br \/>\n(config-if)# no switchport\u00a0\u00a0\u00a0\u00a0\/\/\u5f00\u542f\u7aef\u53e3\u7684\u4e09\u5c42\u8def\u7531\u529f\u80fd(\u8fd9\u6837\u5c31\u53ef\u4ee5\u4e3a\u67d0\u4e00\u7aef\u53e3\u914d\u7f6eIP)<br \/>\n(config-if)# ip address 192.168.1.1 255.255.255.0<br \/>\n(config-if)# no shutdown<br \/>\n9\u3001\u4e09\u5c42\u4ea4\u6362\u673a\u8def\u7531\u534f\u8bae<\/p>\n<p>(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1\u00a0\u00a0\u00a0\/\/\u914d\u7f6e\u9759\u6001\u8def\u7531<\/p>\n<p>\u6ce8:172.16.1.0 255.255.255.0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0\/\/\u4e3a\u76ee\u6807\u7f51\u7edc\u7684\u7f51\u7edc\u53f7\u53ca\u5b50\u7f51\u63a9\u7801<br \/>\n172.16.2.1 \u4e3a\u4e0b\u4e00\u8df3\u7684\u5730\u5740\uff0c\u4e5f\u53ef\u7528\u63a5\u53e3\u8868\u793a,\u5982ip route 172.16.1.0 255.255.255.0 serial 1\/2(172.16.2.0\u6240\u63a5\u7684\u7aef\u53e3)<\/p>\n<p>(config)# router rip\u00a0\u00a0\u00a0 \u00a0\/\/\u5f00\u542fRIP\u534f\u8bae\u8fdb\u7a0b<br \/>\n(config-router)# network 172.16.1.0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u7533\u660e\u672c\u8bbe\u5907\u7684\u76f4\u8fde\u7f51\u6bb5\u4fe1\u606f<br \/>\n(config-router)# version 2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u5f00\u542fRIP V2\uff0c\u53ef\u9009\u4e3aversion 1(RIPV1)\u3001version 2(RIPV2)<br \/>\n(config-router)# no auto-summary\u00a0\u00a0\u00a0\/\/\u5173\u95ed\u8def\u7531\u4fe1\u606f\u7684\u81ea\u52a8\u6c47\u603b\u529f\u80fd(\u53ea\u6709\u5728RIPV2\u652f\u6301)<\/p>\n<p>(config)# router ospf\u00a0\u00a0\u00a0\/\/\u5f00\u542fOSPF\u8def\u7531\u534f\u8bae\u8fdb\u7a0b\uff08\u9488\u5bf91762\uff0c\u65e0\u9700\u4f7f\u7528\u8fdb\u7a0bID\uff09<br \/>\n(config)# router ospf 1\u00a0\u00a0\u00a0\u00a0\/\/\u5f00\u542fOSPF\u8def\u7531\u534f\u8bae\u8fdb\u7a0b\uff08\u9488\u5bf92501\uff0c\u9700\u8981\u52a0OSPF\u8fdb\u7a0bID\uff09<br \/>\n(config-router)# network 192.168.1.0 0.0.0.255 area 0<br \/>\n\/\/\u7533\u660e\u76f4\u8fde\u7f51\u6bb5\u4fe1\u606f\uff0c\u5e76\u5206\u914d\u533a\u57df\u53f7(area0\u4e3a\u9aa8\u5e72\u533a\u57df)<\/p>\n<p>\u53ef\u4ee5\u660e\u663e\u770b\u51fa\uff0c\u4e09\u5bb6\u547d\u4ee4\u5927\u540c\u5c0f\u5f02\uff0c\u5176\u5b9e\u534e\u4e3a\u4e0eH3C\u66f4\u52a0\u7c7b\u4f3c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u534e\u4e3a\u4ea4\u6362\u673a\u57fa\u7840\u914d\u7f6e\u547d\u4ee4 1\u3001\u521b\u5efavlan\uff1a &lt;Quidway&gt;\u00a0 \u00a0 \u00a0\/\/\u7528\u6237\u89c6\u56fe\uff0c\u4e5f\u5c31\u662f\u5728 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/b.yesiyu.top\/?p=1119\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u534e\u4e3a\u3001H3C\u3001\u9510\u6377\u4e09\u5bb6\u4ea4\u6362\u673a\u914d\u7f6e\u547d\u4ee4\u8be6\u89e3\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-1119","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/1119","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=1119"}],"version-history":[{"count":2,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/1119\/revisions"}],"predecessor-version":[{"id":1121,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/1119\/revisions\/1121"}],"wp:attachment":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}