{"id":8390,"date":"2024-04-25T08:01:01","date_gmt":"2024-04-25T00:01:01","guid":{"rendered":""},"modified":"2024-04-25T08:01:01","modified_gmt":"2024-04-25T00:01:01","slug":"\u534e\u4e3aeNSP\u5b9e\u73b0\u4f01\u4e1a\u5185\u7f51\u53cc\u51fa\u63a5\u53e3\u8bbf\u95ee\u5916\u7f51\uff08VRRP\u3001MSTP\u3001DHCP\u3001NAT-easy IP\u3001nat server\u3001ACL\uff09","status":"publish","type":"post","link":"https:\/\/mushiming.com\/8390.html","title":{"rendered":"\u534e\u4e3aeNSP\u5b9e\u73b0\u4f01\u4e1a\u5185\u7f51\u53cc\u51fa\u63a5\u53e3\u8bbf\u95ee\u5916\u7f51\uff08VRRP\u3001MSTP\u3001DHCP\u3001NAT-easy IP\u3001nat server\u3001ACL\uff09"},"content":{"rendered":"
Xan20\u516c\u53f8\u65b0\u5efa\u4e86\u4e00\u680b\u529e\u516c\u5927\u697c\u4f5c\u4e3a\u5206\u516c\u53f8\uff0c\u4e3a\u4e86\u6ee1\u8db3\u65e5\u5e38\u7684\u529e\u516c\u9700\u6c42\uff0c\u516c\u53f8\u51b3\u5b9a\u4e3a\u8d22\u52a1\u90e8\u3001\u9879\u76ee\u7ba1\u7406\u90e8\u3001\u6280\u672f\u90e8\u3001\u884c\u653f\u90e8\u548c\u670d\u52a1\u5668\u7fa4\u5efa\u7acb\u4e92\u8054\u4e92\u901a\u7684\u6709\u7ebf\u7f51\u7edc\u3002\u5176\u4e2d\uff0c\u4e3a\u65b9\u4fbf\u5404\u90e8\u95e8\u5f00\u5c55\u4e1a\u52a1\uff0c\u9700\u8981\u81ea\u52a8\u83b7\u53d6\u516c\u53f8DHCP\u670d\u52a1\u5668\u7684IP\u5730\u5740\uff1b\u516c\u53f8\u5185\u90e8\u9700\u8981\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u6ee1\u8db3\u5404\u90e8\u95e8\u4e0a\u4f20\u4e0b\u8f7d\u6587\u4ef6\uff1b\u603b\u90e8\u53ef\u4ee5\u901a\u8fc7\u5916\u7f51\u8bbf\u95ee\u516c\u53f8\u5206\u90e8\u7684WEB\u670d\u52a1\u5668\uff0c\u5e76\u4e14\u603b\u90e8\u7684\u7f51\u7edc\u7ba1\u7406\u5458\u53ef\u4ee5\u8fdc\u7a0b\u767b\u5f55\u7ba1\u7406\u5206\u516c\u53f8\u7f51\u7edc\u8bbe\u5907\uff1b\u516c\u53f8\u5df2\u7ecf\u7533\u8bf7\u4e86\u4e24\u6761\u4e0d\u540c\u8fd0\u8425\u5546\u4e92\u8054\u7f51\u4e13\u7ebf\u5e76\u914d\u6709\u516c\u7f51IP\u5730\u5740\uff0c\u5e0c\u671b\u9664\u8d22\u52a1\u90e8\u4e0d\u80fd\u8bbf\u95eeInternet\u5916\uff0c\u5176\u4ed6\u90e8\u95e8\u90fd\u80fd\u8bbf\u95eeInternet\uff1b\u540e\u671f\u89c4\u5212\u6240\u6709\u8bbe\u5907\u7531\u7f51\u7edc\u7ba1\u7406\u5458\u8fdb\u884c\u8fdc\u7a0b\u7ba1\u7406\u3002<\/p>\n
DHCP\u670d\u52a1\u5668\u901a\u8fc7\u63a5\u5165\u4ea4\u6362\u673a\u8fde\u63a5\u5230\u6838\u5fc3\u4ea4\u6362\u673a\u4e0a\u91c7\u7528\u4e00\u6761\u94fe\u8def\u4e92\u8fde\u3002\u670d\u52a1\u5668\u7fa4\u8fde\u63a5\u5230\u6838\u5fc3\u4ea4\u6362\u673a\uff0c\u4e24\u53f0\u6838\u5fc3\u4ea4\u6362\u673a\u914d\u7f6e\u7aef\u53e3\u805a\u5408\uff0c\u4ee5\u9632\u6b62\u5355\u94fe\u8def\u51fa\u73b0\u6545\u969c\u3002\u8d22\u52a1\u90e8\u3001\u9879\u76ee\u7ba1\u7406\u90e8\u3001\u6280\u672f\u90e8\u3001\u884c\u653f\u90e8\u548c\u670d\u52a1\u5668\u7fa4\u5904\u4e8e\u4e0d\u540c\u533a\u57df\uff0c\u5404\u90e8\u95e8\u7684\u63a5\u5165\u4ea4\u6362\u673a\u8fde\u63a5\u5230\u4e24\u53f0\u6838\u5fc3\u4ea4\u6362\u673a\uff0c\u5f53\u4e0a\u884c\u94fe\u8def\u51fa\u73b0\u6545\u969c\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u53e6\u4e00\u6761\u94fe\u8def\u5230\u8fbe\u6838\u5fc3\u4ea4\u6362\u673a\u533a\u57df\u3002\u6838\u5fc3\u4ea4\u6362\u673a\u533a\u57df\u4e0a\u505a\u4e24\u53f0\u6838\u5fc3\u5197\u4f59\u5907\u4efd\uff0c\u4ee5\u9632\u6b62\u5176\u4e2d\u4e00\u53f0\u6838\u5fc3\u4ea4\u6362\u673a\u51fa\u73b0\u6545\u969c\uff0c\u53ef\u4ee5\u901a\u8fc7\u53e6\u4e00\u53f0\u6838\u5fc3\u4ea4\u6362\u673a\u8f6c\u53d1\u6570\u636e\u8fde\u63a5\u5916\u7f51\u3002\u91c7\u7528\u4ee5\u4e0a\u8fde\u63a5\u65b9\u5f0f\u65f6\uff0c\u591a\u53f0\u4ea4\u6362\u673a\u4f1a\u5f62\u6210\u73af\u8def\uff0c\u53ef\u4ee5\u91c7\u7528\u751f\u6210\u6811\u6280\u672f\u89e3\u51b3\u8be5\u95ee\u9898\u3002
\u4e3a\u65b9\u4fbf\u5458\u5de5\u83b7\u53d6DHCP\u670d\u52a1\u5668\u7684IP\u5730\u5740\uff0c\u8d22\u52a1\u90e8\u3001\u9879\u76ee\u7ba1\u7406\u90e8\u3001\u6280\u672f\u90e8\u548c\u884c\u653f\u90e8\u53ef\u4ee5\u91c7\u7528DHCP\u65b9\u5f0f\u914d\u7f6eIP\u5730\u5740\u6c60\u81ea\u52a8\u5206\u914dIP\u5730\u5740\u53caDNS\u5730\u5740\u3002
\u670d\u52a1\u5668\u7fa4\u4ea4\u6362\u673a\u3001\u6838\u5fc3\u4ea4\u6362\u673a\u548c\u51fa\u53e3\u8def\u7531\u5668\u5747\u91c7\u7528\u4e09\u5c42\u4e92\u8fde\uff0c\u53ef\u4ee5\u914d\u7f6e\u52a8\u6001\u8def\u7531\u534f\u8bae\u81ea\u52a8\u5b66\u4e60\u8def\u7531\uff0c\u5b9e\u73b0\u5168\u7f51\u4e92\u8fde\u4e92\u901a\u3002
Xan20\u7684\u5206\u516c\u53f8\u914d\u6709\u4e24\u4e2a\u4e0d\u540c\u8fd0\u8425\u5546\u7684\u516c\u7f51IP\u5730\u5740\uff0c\u9664\u8d22\u52a1\u90e8\u4ee5\u4e3a\uff0c\u5176\u4ed6\u90e8\u95e8\u7684\u6240\u6709\u5458\u5de5\u90fd\u6709\u8bbf\u95eeInternet\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u5728\u51fa\u53e3\u8def\u7531\u5668\u4e0a\u914d\u7f6eNAT\u3002
\u4e3a\u65b9\u4fbf\u7f51\u7edc\u7ba1\u7406\u5458\u5bf9\u8bbe\u5907\u8fdb\u884c\u8fdc\u7a0b\u7ba1\u7406\uff0c\u9700\u8981\u542f\u7528\u6240\u6709\u8bbe\u5907\u7684Telnet\u670d\u52a1\u3002<\/p>\n
\u7efc\u4e0a\u6240\u8ff0\uff0c\u672c\u9879\u76ee\u7684\u5b9e\u65bd\u5177\u4f53\u5206\u4e3a\u4ee5\u4e0b\u5de5\u4f5c\u4efb\u52a1\u3002
1.\u6839\u636e\u7f51\u7edc\u62d3\u6251\u53ca\u9879\u76ee\u9700\u6c42\u5206\u6790\uff0c\u5bf9\u672c\u9879\u76ee\u8fdb\u884c\u8be6\u7ec6\u89c4\u5212\u8bbe\u8ba1\u3002
\uff081\uff09\u5b9e\u73b0PC\u901a\u8fc7DHCP\u52a8\u6001\u83b7\u53d6\u5730\u5740\u53c2\u6570
\uff082\uff09\u5b9e\u73b0PC\u8bbf\u95ee\u670d\u52a1\u5668<\/p>\n
\uff083\uff09\u6838\u5fc3\u5c42\u4ea4\u6362\u673a\u505a\u94fe\u8def\u805a\u5408
\uff084\uff09\u7f51\u5173\u5197\u4f59\u65b9\u6848\u5b9e\u65bd
\uff085\uff09\u5b9e\u73b0\u4e8c\u5c42\u7ebf\u8def\u5197\u4f59\u5907\u4efd
\uff086\uff09\u5b9e\u73b0\u5185\u7f51\u8bbf\u95ee\u5916\u7f51
\uff087\uff09\u5916\u7f51\u8bbf\u95ee\u5185\u7f51WEB\u670d\u52a1\u5668
\uff088\uff09\u5b9e\u73b0\u5916\u7f51\u8fdc\u7a0b\u767b\u5f55\u7ba1\u7406
2.\u6839\u636e\u89c4\u5212\u5b8c\u6210\u8bbe\u5907\u7684\u8c03\u8bd5\u3002
3.\u6d4b\u8bd5\u9879\u76ee\u80fd\u5426\u8fbe\u5230\u9884\u671f\u6548\u679c<\/p>\n
1. \u516c\u53f8\u4e0d\u540c\u90e8\u95e8\u7684PC\u5c5e\u4e8e\u4e0d\u540c\u7684\u7f51\u6bb5<\/p>\n
2. \u5b9e\u73b0\u5404\u90e8\u95e8PC\u901a\u8fc7DHCP\u5730\u5740\u83b7\u53d6\u53c2\u6570<\/p>\n
3. \u5b9e\u73b0\u5404\u90e8\u95e8PC\u80fd\u591f\u8bbf\u95eeWEB\u670d\u52a1\u5668<\/p>\n
4. \u5197\u4f59\u7f51\u5173\u5907\u4efd\uff08VRRP\uff09<\/p>\n
5. \u5b9e\u73b0\u4e8c\u5c42\u7f51\u7edc\u94fe\u8def\u5197\u4f59\u5907\u4efd<\/p>\n
6. \u6838\u5fc3\u5c42\u4ea4\u6362\u673a\u505a\u94fe\u8def\u805a\u5408<\/p>\n
7. \u5b9e\u73b0\u516c\u53f8\u5185\u7f51\u8bbf\u95ee\u5916\u7f51<\/p>\n
8. \u5b9e\u73b0\u5916\u7f51\u8bbe\u5907\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668<\/p>\n
9.\u5b9e\u73b0\u8fdc\u7a0b\u8bbf\u95eetelnet\u6280\u672f<\/p>\n
<\/p>\n
<\/p>\n
\u6b65\u9aa4\u4e00\uff1a<\/strong><\/p>\n \uff08\u4e00\uff09\u5b9e\u73b0PC\u901a\u8fc7DHCP\u52a8\u6001\u83b7\u53d6\u5730\u5740\u53c2\u6570\uff1b\u5b9e\u73b0PC\u8bbf\u95eeWEB\u670d\u52a1\u5668<\/strong><\/p>\n \u4e3a\u65b9\u4fbf\u5404\u90e8\u95e8\u5f00\u5c55\u4e1a\u52a1\uff0c\u9700\u8981\u81ea\u52a8\u83b7\u53d6\u516c\u53f8DHCP\u670d\u52a1\u5668\u7684IP\u5730\u5740\uff0c\u7531\u4e8eDHCP\u670d\u52a1\u5668\u548cDHCP\u5ba2\u6237\u7aef\u4e0d\u5728\u540c\u4e00\u7f51\u6bb5\uff0c\u9700\u8981\u5728\u6838\u5fc3\u4ea4\u6362\u673a\u4e0a\u5f00\u542fDHCP\u4e2d\u7ee7\u529f\u80fd\uff1b\u4e3a\u63d0\u9ad8\u94fe\u8def\u53ef\u9760\u6027\uff0c\u5728\u6838\u5fc3\u4ea4\u6362\u673a\u914d\u7f6e\u94fe\u8def\u805a\u5408\u3002<\/p>\n <\/p>\n <\/p>\n \uff081\uff09\u6240\u6709\u4ea4\u6362\u673a\u521b\u5efaVLAN10\u300120\u300130\u300140\u300166\u300188<\/p>\n [SW1]vlan batch 10 20 30 40 66\u300188<\/p>\n [SW2]vlan batch 10 20 30 40 66\u300188<\/p>\n [SW3]vlan batch 10 20 30 40 66\u300188<\/p>\n [SW4]vlan batch 10 20 30 40 66\u300188<\/p>\n [SW5]vlan batch 10 20 30 40 66\u300188<\/p>\n [SW6]vlan batch 10 20 30 40 66\u300188<\/p>\n [SW10]vlan batch 10 20 30 40 66\u300188<\/p>\n \uff082\uff09\u914d\u7f6eaccess\u548ctrunk\u7aef\u53e3<\/p>\n 1\uff09\u5728SW1\u7684GE0\/0\/1\u548cGE0\/0\/2\u63a5\u53e3\u914d\u7f6eAccess\u7aef\u53e3\uff0c\u5141\u8bb8VLAN10\u901a\u8fc7\uff1bGE0\/0\/5\u548cGE0\/0\/6\u63a5\u53e3\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7\u3002<\/p>\n [SW1]int g0\/0\/1<\/p>\n [SW1-GigabitEthernet0\/0\/1]port link-type access<\/p>\n [SW1-GigabitEthernet0\/0\/1]port default vlan 10<\/p>\n [SW1-GigabitEthernet0\/0\/1]int g0\/0\/2<\/p>\n [SW1-GigabitEthernet0\/0\/2]port link-type access<\/p>\n [SW1-GigabitEthernet0\/0\/2]port default vlan 10<\/p>\n [SW1-GigabitEthernet0\/0\/2]int g0\/0\/5<\/p>\n [SW1-GigabitEthernet0\/0\/5]port link-type trunk<\/p>\n [SW1-GigabitEthernet0\/0\/5]port trunk allow-pass vlan all<\/p>\n [SW1-GigabitEthernet0\/0\/5]int g0\/0\/6<\/p>\n [SW1-GigabitEthernet0\/0\/6]port link-type trunk<\/p>\n [SW1-GigabitEthernet0\/0\/6]port trunk allow-pass vlan all<\/p>\n 2\uff09\u5728SW2\u7684GE0\/0\/1\u548cGE0\/0\/2\u63a5\u53e3\u914d\u7f6eAccess\u7aef\u53e3\uff0c\u5141\u8bb8VLAN20\u901a\u8fc7\uff1bGE0\/0\/5\u548cGE0\/0\/6\u63a5\u53e3\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7\u3002<\/p>\n [SW2]int g0\/0\/1<\/p>\n [SW2-GigabitEthernet0\/0\/1]port link-type access<\/p>\n [SW2-GigabitEthernet0\/0\/1]port default vlan 20<\/p>\n [SW2-GigabitEthernet0\/0\/1]int g0\/0\/2<\/p>\n [SW2-GigabitEthernet0\/0\/2]port link-type access<\/p>\n [SW2-GigabitEthernet0\/0\/2]port default vlan 20<\/p>\n [SW2-GigabitEthernet0\/0\/2]int g0\/0\/5<\/p>\n [SW2-GigabitEthernet0\/0\/5]port link-type trunk<\/p>\n [SW2-GigabitEthernet0\/0\/5]port trunk allow-pass vlan all<\/p>\n [SW2-GigabitEthernet0\/0\/5]int g0\/0\/6<\/p>\n [SW2-GigabitEthernet0\/0\/6]port link-type trunk<\/p>\n [SW2-GigabitEthernet0\/0\/6]port trunk allow-pass vlan all<\/p>\n 3\uff09\u5728SW3\u7684GE0\/0\/1\u548cGE0\/0\/2\u63a5\u53e3\u914d\u7f6eAccess\u7aef\u53e3\uff0c\u5141\u8bb8VLAN30\u901a\u8fc7\uff1bGE0\/0\/5\u548cGE0\/0\/6\u63a5\u53e3\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7\u3002<\/p>\n [SW3]int g0\/0\/1<\/p>\n [SW3-GigabitEthernet0\/0\/1]port link-type access<\/p>\n [SW3-GigabitEthernet0\/0\/1]port default vlan 30<\/p>\n [SW3-GigabitEthernet0\/0\/1]int g0\/0\/2<\/p>\n [SW3-GigabitEthernet0\/0\/2]port link-type access<\/p>\n [SW3-GigabitEthernet0\/0\/2]port default vlan 30<\/p>\n [SW3-GigabitEthernet0\/0\/2]int g0\/0\/5<\/p>\n [SW3-GigabitEthernet0\/0\/5]port link-type trunk<\/p>\n [SW3-GigabitEthernet0\/0\/5]port trunk allow-pass vlan all<\/p>\n [SW3-GigabitEthernet0\/0\/5]int g0\/0\/6<\/p>\n [SW3-GigabitEthernet0\/0\/6]port link-type trunk<\/p>\n [SW3-GigabitEthernet0\/0\/6]port trunk allow-pass vlan all<\/p>\n 4\uff09\u5728SW4\u7684GE0\/0\/1\u548cGE0\/0\/2\u63a5\u53e3\u914d\u7f6eAccess\u7aef\u53e3\uff0c\u5141\u8bb8VLAN40\u901a\u8fc7\uff1bGE0\/0\/3\u3001GE0\/0\/5\u548cGE0\/0\/6\u63a5\u53e3\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7\u3002<\/p>\n [SW4]int g0\/0\/1<\/p>\n [SW4-GigabitEthernet0\/0\/1]port link-type access<\/p>\n [SW4-GigabitEthernet0\/0\/1]port default vlan 40<\/p>\n [SW4-GigabitEthernet0\/0\/1]int g0\/0\/2<\/p>\n [SW4-GigabitEthernet0\/0\/2]port link-type access<\/p>\n [SW4-GigabitEthernet0\/0\/2]port default vlan 40<\/p>\n [SW4-GigabitEthernet0\/0\/2]int g0\/0\/3<\/p>\n [SW4-GigabitEthernet0\/0\/3]port link-type trunk<\/p>\n [SW4-GigabitEthernet0\/0\/3]port trunk allow-pass vlan all<\/p>\n [SW4-GigabitEthernet0\/0\/3]int g0\/0\/5<\/p>\n [SW4-GigabitEthernet0\/0\/5]port link-type trunk<\/p>\n [SW4-GigabitEthernet0\/0\/5]port trunk allow-pass vlan all<\/p>\n [SW4-GigabitEthernet0\/0\/5]int g0\/0\/6<\/p>\n [SW4-GigabitEthernet0\/0\/6]port link-type trunk<\/p>\n [SW4-GigabitEthernet0\/0\/6]port trunk allow-pass vlan all<\/p>\n 5\uff09\u5728SW5\u7684GE0\/0\/8\u63a5\u53e3\u914d\u7f6eAccess\u7aef\u53e3\uff0c\u5141\u8bb8VLAN88\u901a\u8fc7\uff1bGE0\/0\/1 to GE0\/0\/4\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7\u3002<\/p>\n [SW5]int g0\/0\/8<\/p>\n [SW5-GigabitEthernet0\/0\/8]port link-type access<\/p>\n [SW5-GigabitEthernet0\/0\/8]port default vlan 88<\/p>\n [SW5-GigabitEthernet0\/0\/8]port-group 1<\/p>\n [SW5-port-group-1]group-member g0\/0\/1 to g0\/0\/4<\/p>\n [SW5-port-group-1]port link-type trunk<\/p>\n [SW5-GigabitEthernet0\/0\/1]port link-type trunk<\/p>\n [SW5-GigabitEthernet0\/0\/2]port link-type trunk<\/p>\n [SW5-GigabitEthernet0\/0\/3]port link-type trunk<\/p>\n [SW5-GigabitEthernet0\/0\/4]port link-type trunk<\/p>\n [SW5-port-group-1]port trunk allow-pass vlan all<\/p>\n [SW5-GigabitEthernet0\/0\/1]port trunk allow-pass vlan all<\/p>\n [SW5-GigabitEthernet0\/0\/2]port trunk allow-pass vlan all<\/p>\n [SW5-GigabitEthernet0\/0\/3]port trunk allow-pass vlan all<\/p>\n [SW5-GigabitEthernet0\/0\/4]port trunk allow-pass vlan all<\/p>\n 6\uff09\u5728SW6\u7684GE0\/0\/1 to GE0\/0\/5\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7\u3002<\/p>\n [SW6]port-group 1<\/p>\n [SW6-port-group-1]group-member g0\/0\/1 to g0\/0\/5<\/p>\n [SW6-port-group-1]port link-type trunk<\/p>\n [SW6-port-group-1]port trunk allow-pass vlan all<\/p>\n 7)\u5728SW10\u7684GE0\/0\/1\u63a5\u53e3\u914d\u7f6eAccess\u7aef\u53e3\uff0c\u5141\u8bb8VLAN66\u901a\u8fc7\uff1bGE0\/0\/6\u548cGE0\/0\/10\u63a5\u53e3\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7\u3002<\/p>\n [SW10]int g0\/0\/1<\/p>\n [SW10-GigabitEthernet0\/0\/1]port link-type access<\/p>\n [SW10-GigabitEthernet0\/0\/1]port default vlan 66<\/p>\n [SW10-GigabitEthernet0\/0\/1]int g0\/0\/6<\/p>\n [SW10-GigabitEthernet0\/0\/6]port link-type trunk<\/p>\n [SW10-GigabitEthernet0\/0\/6]port trunk allow-pass vlan all<\/p>\n [SW10-GigabitEthernet0\/0\/6]int g0\/0\/10<\/p>\n [SW10-GigabitEthernet0\/0\/10]port link-type trunk<\/p>\n [SW10-GigabitEthernet0\/0\/10]port trunk allow-pass vlan all<\/p>\n (3)LACP\u914d\u7f6e\u94fe\u8def\u805a\u5408<\/p>\n 1\uff09\u5728\u6838\u5fc3\u4ea4\u6362\u673aSW5\u548cSW6\u7684GE0\/0\/22~0\/0\/24\u63a5\u53e3\u4e0a\u914d\u7f6eEth-Trunk,\u5141\u8bb8\u6240\u6709VLAN\u901a\u8fc7\u3002<\/p>\n [SW5]interface eth-trunk 1<\/p>\n [SW5-Eth-Trunk1]mode lacp-static<\/p>\n [SW5-Eth-Trunk1]trunkport GigabitEthernet 0\/0\/22 to 0\/0\/24<\/p>\n [SW5-Eth-Trunk1]port link-type trunk<\/p>\n [SW5-Eth-Trunk1]port trunk allow-pass vlan all<\/p>\n [SW6]interface eth-trunk 1<\/p>\n [SW6-Eth-Trunk1]mode lacp-static<\/p>\n [SW6-Eth-Trunk1]trunkport GigabitEthernet 0\/0\/22 to 0\/0\/24<\/p>\n [SW6-Eth-Trunk1]port link-type trunk<\/p>\n [SW6-Eth-Trunk1]port trunk allow-pass vlan all<\/p>\n 2\uff09\u5728\u6838\u5fc3\u4ea4\u6362\u673aSW5\u4e0a\u8bbe\u7f6eLACP\u7cfb\u7edf\u4f18\u5148\u7ea7\uff0c\u4f18\u5148\u7ea7\u503c\u8bbe\u7f6e\u4e3a3000\u3002<\/p>\n [SW5]lacp priority 3000<\/p>\n 3)\u5728\u6838\u5fc3\u4ea4\u6362\u673aSW5\u4e0a\u8bbe\u7f6eLACP\u7aef\u53e3\u4f18\u5148\u7ea7\uff0cGE0\/0\/22~0\/0\/24\u4f18\u5148\u7ea7\u503c\u5206\u522b\u8bbe\u7f6e\u4e3a1000\u30012000\u30013000\u3002<\/p>\n [SW5]int g0\/0\/22<\/p>\n [SW5-GigabitEthernet0\/0\/22]lacp priority 1000<\/p>\n [SW5-GigabitEthernet0\/0\/22]int g0\/0\/23<\/p>\n [SW5-GigabitEthernet0\/0\/23]lacp priority 2000<\/p>\n [SW5-GigabitEthernet0\/0\/23]int g0\/0\/24<\/p>\n [SW5-GigabitEthernet0\/0\/24]lacp priority 3000<\/p>\n 4)\u5728\u6838\u5fc3\u4ea4\u6362\u673aSW5\u4e0a\u914d\u7f6eLACP\u62a2\u5360\u529f\u80fd<\/p>\n [SW5]interface eth-trunk 1<\/p>\n [SW5-Eth-Trunk1]lacp preempt enable<\/p>\n [SW5-Eth-Trunk1]lacp preempt delay 10<\/p>\n 3.\u914d\u7f6e\u8def\u7531<\/p>\n \uff081\uff09\u914d\u7f6eDHCP\u8bbe\u5907GE0\/0\/0\u63a5\u53e3IP\u5730\u5740\u3002<\/p>\n <Huawei>sys<\/p>\n [Huawei]un in en<\/p>\n [Huawei]sysname DHCP<\/p>\n [DHCP]int g0\/0\/0<\/p>\n [DHCP-GigabitEthernet0\/0\/0] ip address 192.168.66.1 24<\/p>\n \uff082\uff09\u6838\u5fc3\u4ea4\u6362\u673aSW5\u3001SW6\u914d\u7f6e\u4e09\u5c42\u63a5\u53e3IP\u5730\u5740\u3002<\/p>\n [SW5]int vlanif10<\/p>\n [SW5-Vlanif10]ip address 192.168.10.251 24<\/p>\n [SW5-Vlanif10]int vlanif20<\/p>\n [SW5-Vlanif20]ip address 192.168.20.251 24<\/p>\n [SW5-Vlanif20]int vlanif30<\/p>\n [SW5-Vlanif30]ip address 192.168.30.251 24<\/p>\n [SW5-Vlanif30]int vlanif40<\/p>\n [SW5-Vlanif40]ip address 192.168.40.251 24<\/p>\n [SW5-Vlanif40]int vlanif66<\/p>\n [SW5-Vlanif66]ip address 192.168.66.251 24<\/p>\n [SW5-Vlanif66]int vlanif88<\/p>\n [SW5-Vlanif88]ip address 192.168.88.254 24<\/p>\n [SW6]int vlanif10<\/p>\n [SW6-Vlanif10]ip address 192.168.10.252 24<\/p>\n [SW6-Vlanif10]int vlanif20<\/p>\n [SW6-Vlanif20]ip address 192.168.20.252 24<\/p>\n [SW6-Vlanif20]int vlanif30<\/p>\n [SW6-Vlanif30]ip address 192.168.30.252 24<\/p>\n [SW6-Vlanif30]int vlanif40<\/p>\n [SW6-Vlanif40]ip address 192.168.40.252 24<\/p>\n [SW6-Vlanif40]int vlanif66<\/p>\n [SW6-Vlanif66]ip address 192.168.66.254 24<\/p>\n [SW6-Vlanif66]int vlanif88<\/p>\n [SW6-Vlanif88]ip address 192.168.88.251 24<\/p>\n \uff083\uff09\u5728DHCP\u8bbe\u5907\u4e0a\u914d\u7f6e\u9ed8\u8ba4\u8def\u7531<\/p>\n [DHCP]ip route-static 0.0.0.0 0.0.0.0 192.168.66.254<\/p>\n 4.\u914d\u7f6eDHCP\u670d\u52a1\u5668<\/p>\n \uff081\uff09\u5728DHCP\u8bbe\u5907\u4e0a\u542f\u52a8DHCP\u670d\u52a1\uff0c\u5e76\u914d\u7f6eDHCP\u5730\u5740\u6c60\uff08\u7f51\u6bb5\u3001\u7f51\u5173\u3001DNS\u3001\u79df\u671f\uff09\u3002<\/p>\n [DHCP]dhcp enable<\/p>\n [DHCP]ip pool vlan10<\/p>\n [DHCP-ip-pool-vlan10]network 192.168.10.0 mask 255.255.255.0<\/p>\n [DHCP-ip-pool-vlan10]gateway-list 192.168.10.254<\/p>\n [DHCP-ip-pool-vlan10]dns-list 114.114.114.114 8.8.8.8<\/p>\n [DHCP-ip-pool-vlan10]lease day 1<\/p>\n [DHCP-ip-pool-vlan10]quit<\/p>\n [DHCP-ip-pool-vlan20] ip pool vlan20<\/p>\n [DHCP-ip-pool-vlan20]network 192.168.20.0 mask 255.255.255.0<\/p>\n [DHCP-ip-pool-vlan20]gateway-list 192.168.20.254<\/p>\n [DHCP-ip-pool-vlan20]dns-list 114.114.114.114 8.8.8.8<\/p>\n [DHCP-ip-pool-vlan20]lease day 2<\/p>\n [DHCP-ip-pool-vlan20]quit<\/p>\n [DHCP-ip-pool-vlan30]ip pool vlan30<\/p>\n [DHCP-ip-pool-vlan30]network 192.168.30.0 mask 255.255.255.0<\/p>\n [DHCP-ip-pool-vlan30]gateway-list 192.168.30.254<\/p>\n [DHCP-ip-pool-vlan30]dns-list 114.114.114.114 8.8.8.8<\/p>\n [DHCP-ip-pool-vlan30]lease day 3<\/p>\n [DHCP-ip-pool-vlan30]quit<\/p>\n [DHCP-ip-pool-vlan40]ip pool vlan40<\/p>\n [DHCP-ip-pool-vlan40]network 192.168.40.0 mask 255.255.255.0<\/p>\n [DHCP-ip-pool-vlan40]gateway-list 192.168.40.254<\/p>\n [DHCP-ip-pool-vlan40]dns-list 114.114.114.114 8.8.8.8<\/p>\n [DHCP-ip-pool-vlan40]lease day 4<\/p>\n [DHCP-ip-pool-vlan40]quit<\/p>\n \uff082\uff09DHCP\u8bbe\u5907\u7684GE0\/0\/0\u63a5\u53e3\u4e0b\u5f00\u542fDHCP\u529f\u80fd<\/p>\n [DHCP]interface GigabitEthernet 0\/0\/0<\/p>\n [DHCP-GigabitEthernet0\/0\/0]dhcp select global<\/p>\n 5. \u5728SW6\u914d\u7f6eDHCP\u4e2d\u7ee7<\/p>\n \u542f\u52a8DHCP\u529f\u80fd\uff0c\u4e0e\u7ec8\u7aef\u76f8\u8fde\u63a5\u53e3\u5f00\u542f\u4e2d\u7ee7\u529f\u80fd\u5e76\u6307\u5b9a\u670d\u52a1\u5668\u5730\u5740\u3002<\/p>\n [SW6]dhcp enable<\/p>\n [SW6]int vlanif10<\/p>\n [SW6-Vlanif10]dhcp select relay<\/p>\n [SW6-Vlanif10]dhcp relay server-ip 192.168.66.1<\/p>\n [SW6-Vlanif10]int vlanif20<\/p>\n [SW6-Vlanif20]dhcp select relay<\/p>\n [SW6-Vlanif20]dhcp relay server-ip 192.168.66.1<\/p>\n [SW6-Vlanif20]int vlanif30<\/p>\n [SW6-Vlanif30]dhcp select relay<\/p>\n [SW6-Vlanif30]dhcp relay server-ip 192.168.66.1<\/p>\n [SW6-Vlanif30]int vlanif40<\/p>\n [SW6-Vlanif40]dhcp select relay<\/p>\n [SW6-Vlanif40]dhcp relay server-ip 192.168.66.1<\/p>\n \u6b65\u9aa4\u4e8c\uff1a<\/strong><\/p>\n \uff08\u4e8c\uff09\u7f51\u5173\u5197\u4f59\u65b9\u6848\u5b9e\u65bd<\/strong><\/p>\n \u4e3a\u4e86\u63d0\u9ad8\u7f51\u7edc\u53ef\u9760\u6027\uff0c\u5728\u4e0d\u6539\u53d8\u7ec4\u7f51\u7684\u60c5\u51b5\u4e0b\uff0c\u5728\u6838\u5fc3\u4ea4\u6362\u673aSW5\u548cSW6\u4e0a\u4f7f\u7528VRRP\u6280\u672f\uff0c\u5b9e\u73b0\u7f51\u5173\u5197\u4f59\u3002<\/p>\n 1. \u642d\u5efa\u62d3\u6251\u56fe<\/p>\n <\/p>\n <\/p>\n 2.\u4ea4\u6362\u673a\u914d\u7f6e<\/p>\n \uff081\uff09\u628a\u9700\u6c421\u914d\u7f6eSW6\u7684vlan10\u300120\u300130\u300140\u7f51\u5173\u5730\u5740192.168.XX.254\u66ff\u6362\u4e3a192.168.XX.252\uff0c\u4fdd\u7559192.168.XX.254\u4f5c\u4e3a\u865a\u62df\u7f51\u5173\u3002<\/p>\n [SW6]interface Vlanif10<\/p>\n [SW6-Vlanif10]ip address 192.168.10.252 24<\/p>\n [SW6-Vlanif10]interface Vlanif20<\/p>\n [SW6-Vlanif20]ip address 192.168.20.252 24<\/p>\n [SW6-Vlanif20]interface Vlanif30<\/p>\n [SW6-Vlanif30]ip address 192.168.30.252 24<\/p>\n [SW6-Vlanif30]interface Vlanif40<\/p>\n [SW6-Vlanif40]ip address 192.168.40.252 24<\/p>\n \uff082\uff09\u914d\u7f6e\u865a\u62dfIP\u5730\u5740<\/p>\n 1\uff09\u5b9e\u73b0VLAN10\u300120\u8f6c\u53d1\u6570\u636e\u7684\u4e3b\u8bbe\u5907\u4e3aSW5\uff0c\u865a\u62df\u7684vrid\u7ec4\u5206\u522b\u4e3a10 \u300120\uff0c\u865a\u62df\u7684IP\u5730\u5740\u5206\u522b\u4e3a192.168.10.254\uff1b192.168.20.254\uff0c\u5e76\u4e14\u8bbe\u7f6e\u4f18\u5148\u7ea7\u4e3a200\uff0c\u5728SW5\u7684\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n [SW5]interface Vlanif10<\/p>\n [SW5-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254<\/p>\n [SW5-Vlanif10]vrrp vrid 10 priority 200<\/p>\n [SW5-Vlanif10]interface Vlanif20<\/p>\n [SW5-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254<\/p>\n [SW5-Vlanif20]vrrp vrid 20 priority 200<\/p>\n 2\uff09\u5b9e\u73b0VLAN10\u300120\u8f6c\u53d1\u6570\u636e\u7684SW6\u5907\u4efd\u8bbe\u5907\uff0c\u865a\u62df\u7684vrid\u7ec4\u5206\u522b\u4e3a10 \u300120\uff0c\u865a\u62df\u7684IP\u5730\u5740\u5206\u522b\u4e3a192.168.10.254\uff1b192.168.20.254\uff0c\u5e76\u4e14\u8bbe\u7f6e\u4f18\u5148\u7ea7\u4e3a100\uff08\u9ed8\u8ba4\uff09\uff0c\u5728SW6\u7684\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n [SW6]interface Vlanif10<\/p>\n [SW6-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254<\/p>\n [SW6-Vlanif10]vrrp vrid 10 priority 100<\/p>\n [SW6-Vlanif10]interface Vlanif20<\/p>\n [SW6-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254<\/p>\n [SW6-Vlanif20]vrrp vrid 20 priority 100<\/p>\n 3\uff09\u5b9e\u73b0VLAN30\u300140\u8f6c\u53d1\u6570\u636e\u7684\u4e3b\u8bbe\u5907\u4e3aSW6\uff0c\u865a\u62df\u7684vrid\u7ec4\u5206\u522b\u4e3a30 \u300140\uff0c\u865a\u62df\u7684IP\u5730\u5740\u5206\u522b\u4e3a192.168.30.254\uff1b192.168.40.254\uff0c\u5e76\u4e14\u8bbe\u7f6e\u4f18\u5148\u7ea7\u4e3a200\uff0c\u5728SW6\u7684\u914d\u7f6e\u5982\u4e0b\uff1aSW6\u7684\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n [SW6]interface Vlanif30<\/p>\n [SW6-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254<\/p>\n [SW6-Vlanif30]vrrp vrid 30 priority 200<\/p>\n [SW6-Vlanif30]interface Vlanif40<\/p>\n [SW6-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.254<\/p>\n [SW6-Vlanif40]vrrp vrid 40 priority 200<\/p>\n 4\uff09\u5b9e\u73b0VLAN30\u300140\u8f6c\u53d1\u6570\u636e\u7684SW5\u5907\u4efd\u8bbe\u5907\uff0c\u865a\u62df\u7684vrid\u7ec4\u5206\u522b\u4e3a30 \u300140\uff0c\u865a\u62df\u7684IP\u5730\u5740\u5206\u522b\u4e3a192.168.30.254\uff1b192.168.40.254\uff0c\u5e76\u4e14\u8bbe\u7f6e\u4f18\u5148\u7ea7\u4e3a100\uff08\u9ed8\u8ba4\uff09\uff0c\u5728SW5\u7684\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n [SW5]interface Vlanif30<\/p>\n [SW5-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254<\/p>\n [SW5-Vlanif30]vrrp vrid 30 priority 100<\/p>\n [SW5-Vlanif30]interface Vlanif40<\/p>\n [SW5-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.254<\/p>\n [SW5-Vlanif40]vrrp vrid 40 priority 100<\/p>\n 2.\u5728DHCP\u8bbe\u5907\u4e0a\u7684\u5730\u5740\u6c60\u6392\u9664\u6389\u5df2\u5b58\u5728\u7684IP\u5730\u5740\u3002<\/p>\n \u7531\u4e8e\u5148\u5efa\u7acb\u7684DHCP\u5730\u5740\u6c60\uff0cDHCP\u4e0b\u53d1\u7684\u5730\u5740\u4f7f\u5f97SW5\u4e0eSW6\u7684251\/252\u5730\u5740\u4ea7\u751f\u51b2\u7a81\uff0c\u5148\u6536\u56de\u5730\u5740\u6c60\u7684\u5730\u5740\uff0c\u518d\u6392\u9664\u5df2\u914d\u7f6e\u7684IP\u5730\u5740\u3002<\/p>\n \uff081\uff09\u91cd\u542f\u5730\u5740\u6c60\uff0c\u5728\u7528\u6237\u89c6\u56fe\u4e0b\u91cd\u542f\u3002<\/p>\n <DHCP>reset ip pool name vlan10 all<\/p>\n Warning: If the IP addresses that are being used are reclaimed, may influence normal user in the network. Are you sure to continue?[Y\/N]:y<\/p>\n \u91cd\u590d\u64cd\u4f5c\uff0c\u5bf9ip pool vlan20\u300130\u548c40\u8fdb\u884c\u5730\u5740\u6c60\u91cd\u542f\u3002<\/p>\n (2\uff09\u5728\u7cfb\u7edf\u89c6\u56fe\u4e0b\uff0c\u8fdb\u5165\u5bf9\u5e94\u5730\u5740\u6c60\uff0c\u8fdb\u884c\u5df2\u914d\u7f6eIP\u5730\u5740\u8fdb\u884c\u6392\u9664\u3002<\/p>\n [DHCP]ip pool vlan10<\/p>\n [DHCP-ip-pool-vlan10]excluded-ip-address 192.168.10.251 192.168.10.252<\/p>\n [DHCP-ip-pool-vlan10]quit<\/p>\n [DHCP]ip pool vlan20<\/p>\n [DHCP-ip-pool-vlan20]excluded-ip-address 192.168.20.251 192.168.20.252<\/p>\n [DHCP-ip-pool-vlan20]quit<\/p>\n [DHCP]ip pool vlan30<\/p>\n [DHCP-ip-pool-vlan30]excluded-ip-address 192.168.30.251 192.168.30.252<\/p>\n [DHCP-ip-pool-vlan30]quit<\/p>\n [DHCP]ip pool vlan40<\/p>\n [DHCP-ip-pool-vlan40]excluded-ip-address 192.168.40.251 192.168.40.252<\/p>\n [DHCP-ip-pool-vlan40]quit<\/p>\n 3. \u5728\u6838\u5fc3\u4ea4\u6362\u673aSW5\u4e0a\u5f00\u542fDHCP\u670d\u52a1\u5e76\u914d\u7f6eDHCP\u4e2d\u7ee7\u3002<\/p>\n [SW5]dhcp enable<\/p>\n [SW5]interface Vlanif10<\/p>\n [SW5-Vlanif10]dhcp select relay<\/p>\n [SW5-Vlanif10]dhcp relay server-ip 192.168.66.1<\/p>\n [SW5-Vlanif10]interface Vlanif20<\/p>\n [SW5-Vlanif20]dhcp select relay<\/p>\n [SW5-Vlanif20]dhcp relay server-ip 192.168.66.1<\/p>\n [SW5-Vlanif20]interface Vlanif30<\/p>\n [SW5-Vlanif30]dhcp select relay<\/p>\n [SW5-Vlanif30]dhcp relay server-ip 192.168.66.1<\/p>\n [SW5-Vlanif30]interface Vlanif40<\/p>\n [SW5-Vlanif40]dhcp select relay<\/p>\n [SW5-Vlanif40]dhcp relay server-ip 192.168.66.1<\/p>\n \u6b65\u9aa4\u4e09\uff1a<\/strong><\/p>\n \uff08\u4e09\uff09\u5b9e\u73b0\u4e8c\u5c42\u7ebf\u8def\u5197\u4f59\u5907\u4efd<\/strong><\/p>\n \u4e3a\u5b9e\u73b0\u4e8c\u5c42\u7ebf\u8def\u5197\u4f59\u5907\u4efd\uff0c\u9700\u8981\u4e3a\u6240\u6709\u4ea4\u6362\u673a\u914d\u7f6e\u751f\u6210\u6811\u534f\u8bae\uff0c\u5b9e\u73b0\u4e8c\u5c42\u7ebf\u8def\u4f18\u5148\u7ea7\u7684\u8bbe\u7f6e\u4ee5\u53ca\u4ea4\u6362\u673a\u6839\u6865\u7684\u9009\u62e9\u3002<\/p>\n 1. \u642d\u5efa\u62d3\u6251\u56fe<\/p>\n <\/p>\n <\/p>\n 2.\u4ea4\u6362\u673a\u914d\u7f6e<\/p>\n \uff081\uff09\u5728\u6240\u6709\u4ea4\u6362\u673a\u4e0a\u914d\u7f6eSTP\u534f\u8bae\uff0c\u5e76\u4e14\u5c06vlan10\u6620\u5c04\u5230instance1\u5185\uff0c\u5c06vlan20\u6620\u5c04\u5230instance2\u5185\uff0cvlan30\u6620\u5c04\u5230instance3\u5185\uff0cvlan40\u6620\u5c04\u5230instance4\u5185\u3002<\/p>\n [Huawei]stp enable<\/p>\n [Huawei]stp region-configuration<\/p>\n [Huawei-region-configuration]region-name zhaoqing<\/p>\n [Huawei-region-configuration] instance 1 vlan 10<\/p>\n [Huawei-region-configuration] instance 2 vlan 20<\/p>\n [Huawei-region-configuration] instance 3 vlan 30<\/p>\n [Huawei-region-configuration] instance 4 vlan 40<\/p>\n [Huawei-region-configuration] active region-configuration<\/p>\n \uff082\uff09\u5c06\u6838\u5fc3\u4ea4\u6362\u673aSW5\u8bbe\u7f6e\u4e3avlan10\u300120\u7684\u4e3b\u6839\u6865\u4ee5\u53cavlan30\u300140\u7684\u6b21\u6839\u6865\u3002<\/p>\n [SW5] stp instance 1 priority 4096<\/p>\n [SW5] stp instance 2 priority 4096<\/p>\n [SW5] stp instance 3 priority 8192<\/p>\n [SW5] stp instance 4 priority 8192<\/p>\n \uff083\uff09\u5c06\u6838\u5fc3\u4ea4\u6362\u673aSW6\u8bbe\u7f6e\u4e3avlan30\u300140\u7684\u4e3b\u6839\u6865\u4ee5\u53cavlan10\u300120\u7684\u6b21\u6839\u6865\u3002<\/p>\n [SW6] stp instance 1 priority 8192<\/p>\n [SW6] stp instance 2 priority 8192<\/p>\n [SW6] stp instance 3 priority 4096<\/p>\n [SW6] stp instance 4 priority 4096<\/p>\n \u6b65\u9aa4\u56db\uff1a<\/strong><\/p>\n \uff08\u56db\uff09\u5b9e\u73b0\u5185\u7f51\u8bbf\u95ee\u5916\u7f51<\/strong><\/p>\n \u4e3a\u5b9e\u73b0\u5185\u7f51\u53ef\u4ee5\u8bbf\u95ee\u5916\u7f51\uff0c\u9700\u8981\u5c06\u6838\u5fc3\u4ea4\u6362\u673aSW5\u548c\u6838\u5fc3\u4ea4\u6362\u673aSW6\u4ee5\u53ca\u6838\u5fc3\u8bbe\u5907R1\u6240\u8fde\u63a5\u7684\u7f51\u7edc\u8fdb\u884cOSPF\u5212\u5206\u533a\u57df\u3002\u6dfb\u52a0SW7\u5b9e\u73b0\u6838\u5fc3\u5197\u4f59\u5907\u4efd\u3002<\/p>\n 1.\u62d3\u6251\u642d\u5efa<\/p>\n <\/p>\n <\/p>\n 2.\u4ea4\u6362\u673a\u914d\u7f6e<\/p>\n \uff081\uff09\u5728\u4ea4\u6362\u673aSW1~SW6\u3001SW10\u7cfb\u7edf\u89c6\u56fe\u4e0b\u6dfb\u52a0VLAN15\u3002<\/p>\n [SW1]vlan 15 [SW2]vlan 15 [SW3]vlan 15 [SW4]vlan 15<\/p>\n [SW5]vlan 15 [SW6]vlan 15 [SW10]vlan 15<\/p>\n \uff082\uff09\u5728SW7\u4e0a\u521b\u5efaVLAN10\u300115\u300120\u300130\u300140\u300166\u300188<\/p>\n <Huawei>sys<\/p>\n [Huawei]sysname SW7<\/p>\n [SW7]undo info-center enable<\/p>\n [SW7]vlan batch 10 15 20 30 40 66 88<\/p>\n \uff083\uff09SW5\u548cSW6\u5728GE0\/0\/7\u63a5\u53e3\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709\u7684VLAN\u901a\u8fc7\u3002<\/p>\n [SW5]interface GigabitEthernet0\/0\/7<\/p>\n [SW5-GigabitEthernet0\/0\/7]port link-type trunk<\/p>\n [SW5-GigabitEthernet0\/0\/7]port trunk allow-pass vlan all<\/p>\n [SW6]interface GigabitEthernet0\/0\/7<\/p>\n [SW6-GigabitEthernet0\/0\/7]port link-type trunk<\/p>\n [SW6-GigabitEthernet0\/0\/7]port trunk allow-pass vlan all<\/p>\n \uff084\uff09SW7\u5728GE0\/0\/5\u548cGE0\/0\/6\u63a5\u53e3\u914d\u7f6eTrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709\u7684VLAN\u901a\u8fc7\uff1b\u5728GE0\/0\/15\u914d\u7f6eAccess\u7aef\u53e3\uff0c\u5141\u8bb8VLAN15\u901a\u8fc7\u3002<\/p>\n [SW7]interface GigabitEthernet0\/0\/5<\/p>\n [SW7-GigabitEthernet0\/0\/5]port link-type trunk<\/p>\n [SW7-GigabitEthernet0\/0\/5]port trunk allow-pass vlan all<\/p>\n [SW7-GigabitEthernet0\/0\/5]quit<\/p>\n [SW7]interface GigabitEthernet0\/0\/6<\/p>\n [SW7-GigabitEthernet0\/0\/6]port link-type trunk<\/p>\n [SW7-GigabitEthernet0\/0\/6]port trunk allow-pass vlan all<\/p>\n [SW7-GigabitEthernet0\/0\/6]quit<\/p>\n [SW7-GigabitEthernet0\/0\/15]interface GigabitEthernet0\/0\/15<\/p>\n [SW7-GigabitEthernet0\/0\/15]port link-type access<\/p>\n [SW7-GigabitEthernet0\/0\/15]port default vlan 15<\/p>\n (5) \u5728SW5\u3001SW6\u4e0a\u5206\u522b\u914d\u7f6evlan15\u4e09\u5c42\u63a5\u53e3\u5730\u5740<\/p>\n [SW5]interface Vlanif15<\/p>\n [SW5-Vlanif15]ip address 192.168.15.5 255.255.255.0<\/p>\n [SW6]interface Vlanif15<\/p>\n [SW6-Vlanif15]ip address 192.168.15.6 255.255.255.0<\/p>\n (6) \u5728SW7\u4e0a\u914d\u7f6eMSTP\u57df\uff0c\u5e76\u4e14\u5c06vlan10\u6620\u5c04\u5230instance1\u5185\uff0c\u5c06vlan20\u6620\u5c04\u5230instance2\u5185\uff0cvlan30\u6620\u5c04\u5230instance3\u5185\uff0cvlan15\u6620\u5c04\u5230instance15\u5185\uff0cvlan40\u6620\u5c04\u5230instance4\u5185\u3002\u5e76\u5c06SW7\u8bbe\u7f6e\u4e3avlan15\u7684\u4e3b\u6839\u6865\uff0c instance 15\u4f18\u5148\u7ea7\u8bbe\u7f6e\u4e3a0\u3002<\/p>\n [SW7]stp region-configuration<\/p>\n [SW7-mst-region]region-name zhaoqing<\/p>\n [SW7-mst-region]instance 1 vlan 10<\/p>\n [SW7-mst-region]instance 15 vlan 15<\/p>\n [SW7-mst-region]instance 2 vlan 20<\/p>\n [SW7-mst-region]instance 3 vlan 30<\/p>\n [SW7-mst-region]instance 4 vlan 40<\/p>\n [SW7-mst-region]active region-configuration<\/p>\n [SW7-mst-region]quit<\/p>\n [SW7]stp instance 15 priority 0<\/p>\n (7) \u5728SW5\u914d\u7f6e\u57fa\u672cOSPF\uff0c\u5212\u5206\u591a\u533a\u57df\uff0c\u624b\u52a8\u6307\u5b9aRouter ID\uff0c\u9aa8\u5e72\u533a\u57df\u4e3aarea 0\uff0c\u5ba3\u544a\u7f51\u6bb5192.168.15.0\u3002<\/p>\n [SW5]ospf 1 router-id 5.5.5.5<\/p>\n [SW5-ospf-1]area 0<\/p>\n [SW5-ospf-1-area-0.0.0.0]network 192.168.15.0 0.0.0.255<\/p>\n [SW5-ospf-1-area-0.0.0.0]quit<\/p>\n [SW5-ospf-1]area 10<\/p>\n [SW5-ospf-1-area-0.0.0.10]network 192.168.10.0 0.0.0.255<\/p>\n [SW5-ospf-1-area-0.0.0.10]quit<\/p>\n [SW5-ospf-1]area 20<\/p>\n [SW5-ospf-1-area-0.0.0.20]network 192.168.20.0 0.0.0.255<\/p>\n [SW5-ospf-1-area-0.0.0.20]quit<\/p>\n [SW5-ospf-1]area 30<\/p>\n [SW5-ospf-1-area-0.0.0.30]network 192.168.30.0 0.0.0.255<\/p>\n [SW5-ospf-1-area-0.0.0.30]quit<\/p>\n [SW5-ospf-1]area 40<\/p>\n [SW5-ospf-1-area-0.0.0.40]network 192.168.40.0 0.0.0.255<\/p>\n [SW5-ospf-1-area-0.0.0.40]quit<\/p>\n [SW5-ospf-1]area 66<\/p>\n [SW5-ospf-1-area-0.0.0.66]network 192.168.66.0 0.0.0.255<\/p>\n [SW5-ospf-1-area-0.0.0.66]quit<\/p>\n [SW5-ospf-1]area 88<\/p>\n [SW5-ospf-1-area-0.0.0.88]network 192.168.88.0 0.0.0.255<\/p>\n [SW5-ospf-1-area-0.0.0.88]quit<\/p>\n (8) \u5728SW6\u914d\u7f6e\u57fa\u672cOSPF\uff0c\u5212\u5206\u591a\u533a\u57df\uff0c\u624b\u52a8\u6307\u5b9aRouter ID\uff0c\u9aa8\u5e72\u533a\u57df\u4e3aarea 0\uff0c\u5ba3\u544a\u7f51\u6bb5192.168.15.0\u3002<\/p>\n [SW6]ospf 1 router-id 6.6.6.6<\/p>\n [SW6-ospf-1]area 0<\/p>\n [SW6-ospf-1-area-0.0.0.0]network 192.168.15.0 0.0.0.255<\/p>\n [SW6-ospf-1-area-0.0.0.0]quit<\/p>\n [SW6-ospf-1]area 10<\/p>\n [SW6-ospf-1-area-0.0.0.10]network 192.168.10.0 0.0.0.255<\/p>\n [SW6-ospf-1-area-0.0.0.10]quit<\/p>\n [SW6-ospf-1]area 20<\/p>\n [SW6-ospf-1-area-0.0.0.20]network 192.168.20.0 0.0.0.255<\/p>\n [SW6-ospf-1-area-0.0.0.20]quit<\/p>\n [SW6-ospf-1]area 30<\/p>\n [SW6-ospf-1-area-0.0.0.30]network 192.168.30.0 0.0.0.255<\/p>\n [SW6-ospf-1-area-0.0.0.30]quit<\/p>\n [SW6-ospf-1]area 40<\/p>\n [SW6-ospf-1-area-0.0.0.40]network 192.168.40.0 0.0.0.255<\/p>\n [SW6-ospf-1-area-0.0.0.40]quit<\/p>\n [SW6-ospf-1]area 66<\/p>\n [SW6-ospf-1-area-0.0.0.66]network 192.168.66.0 0.0.0.255<\/p>\n [SW6-ospf-1-area-0.0.0.66]quit<\/p>\n [SW6-ospf-1]area 88<\/p>\n [SW6-ospf-1-area-0.0.0.88]network 192.168.88.0 0.0.0.255<\/p>\n [SW6-ospf-1-area-0.0.0.88]quit<\/p>\n <\/p>\n 3.\u8def\u7531\u5668\u914d\u7f6e<\/p>\n \uff081\uff09\u4e3aR1\u7684G0\/0\/0\u548cG0\/0\/1\u63a5\u53e3\u914d\u7f6eIP\u5730\u5740\u3002<\/p>\n <Huawei>sys<\/p>\n [Huawei]sysname R1<\/p>\n [R1]un in en<\/p>\n [R1]interface GigabitEthernet0\/0\/0<\/p>\n [R1-GigabitEthernet0\/0\/0]ip address 192.168.15.1 24<\/p>\n [R1-GigabitEthernet0\/0\/0]interface GigabitEthernet0\/0\/1<\/p>\n [R1-GigabitEthernet0\/0\/1]ip address 100.1.1.1 24<\/p>\n <\/p>\n (2) \u5728R3\u7684GE0\/0\/0\u548cGE0\/0\/1\u63a5\u53e3\u914d\u7f6eIP\u5730\u5740\u3002<\/p>\n <Huawei>sys<\/p>\n [Huawei]sysname R3<\/p>\n [R3]un in en<\/p>\n [R3]interface GigabitEthernet0\/0\/0<\/p>\n [R3-GigabitEthernet0\/0\/0]ip address 200.1.1.254 24<\/p>\n [R3-GigabitEthernet0\/0\/0]interface GigabitEthernet0\/0\/1<\/p>\n [R3-GigabitEthernet0\/0\/1]ip address 100.1.1.6 24<\/p>\n \uff083\uff09\u5728R1\u914d\u7f6eOSPF\uff0croute-id\u4e3a1.1.1.1\uff0c\u5c06\u5176\u8fde\u63a5\u7684vlan\u5b50\u7f51\u5bf9\u5e94area\u533a\u57df\u53f7\u8fdb\u884c\u914d\u7f6e\uff0c\u5e76\u4e14\u914d\u7f6eOSPF\u52a8\u6001\u9ed8\u8ba4\u8def\u7531\u3002<\/p>\n [Huawei] ospf 1 router-id 1.1.1.1<\/p>\n [R1-ospf-1]default-route-advertise<\/p>\n [Huawei-ospf-1]area 0<\/p>\n [Huawei-ospf-1-area-0.0.0.0] network 192.168.15.0 0.0.0.255<\/p>\n \uff084\uff09\u5728R1\u914d\u7f6e\u7528\u4e8e\u5185\u7f51\u8bbf\u95ee\u5916\u7f51\u7684\u8bbf\u95ee\u63a7\u5236\u94fe\u8defACL\uff0c\u5e76\u4e14\u5728G0\/0\/1\u63a5\u53e3\u8c03\u7528ACL\uff0c\u4f7f\u5185\u7f51\u9664\u4e86\u8d22\u52a1\u90e8\u4ee5\u5916\u7684\u7f51\u7edc\u5747\u53ef\u8bbf\u95ee\u5916\u7f51\u3002<\/p>\n [R1]acl 2000<\/p>\n [R1-acl-basic-2000] rule 5 deny source 192.168.10.0 0.0.0.255<\/p>\n [R1-acl-basic-2000] rule 10 permit source 192.168.20.0 0.0.0.255<\/p>\n [R1-acl-basic-2000] rule 15 permit source 192.168.30.0 0.0.0.255<\/p>\n [R1-acl-basic-2000] rule 20 permit source 192.168.40.0 0.0.0.255<\/p>\n [R1-acl-basic-2000] rule 25 permit source 192.168.15.0 0.0.0.255<\/p>\n [R1-acl-basic-2000] rule 30 permit source 192.168.66.0 0.0.0.255<\/p>\n [R1-acl-basic-2000] rule 35 permit source 192.168.88.0 0.0.0.255<\/p>\n [R1]interface GigabitEthernet0\/0\/1<\/p>\n [R1-GigabitEthernet0\/0\/1] nat outbound 2000<\/p>\n \uff085\uff09\u5728R1\u914d\u7f6e\u4e00\u6761\u5411\u5916\u7684\u9ed8\u8ba4\u8def\u7531\uff0c\u7528\u4e8e\u8fde\u63a5\u5916\u7f51\u7684\u7f51\u7edc\u3002<\/p>\n [R1]ip route-static 0.0.0.0 0 100.1.1.6<\/p>\n \u6b65\u9aa4\u4e94\uff1a<\/strong><\/p>\n \uff08\u4e94\uff09\u5b9e\u73b0\u5916\u7f51\u8bbf\u95ee\u5185\u7f51WEB\u670d\u52a1\u5668\uff1b\u5b9e\u73b0\u5916\u7f51\u8fdc\u7a0b\u767b\u5f55\u7ba1\u7406<\/strong><\/p>\n \u4e3a\u5b9e\u73b0\u603b\u516c\u53f8\u901a\u8fc7\u5ba2\u6237\u7aef\u4ece\u5916\u7f51\u8bbf\u95ee\u5b50\u516c\u53f8\u5185\u7f51WEB\u670d\u52a1\u5668\uff0c\u9700\u8981\u5c06\u516c\u7f51IP\u5730\u5740\u6620\u5c04\u5230\u5185\u7f51WEB\u670d\u52a1\u5668IP\u5730\u5740\uff1b\u4e3a\u5b9e\u73b0\u5916\u7f51\u8fdc\u7a0b\u767b\u5f55\u7ba1\u7406\uff0c\u603b\u516c\u53f8\u7684\u7f51\u7edc\u7ba1\u7406\u5458\u901a\u8fc7Telnet\u8fdc\u7a0b\u767b\u5f55\u5230\u6838\u5fc3\u4ea4\u6362\u673a\u4e0a\uff0c\u5bf9\u5b50\u516c\u53f8\u5185\u7f51\u7f51\u7edc\u8bbe\u5907\u5b9e\u73b0\u7ba1\u7406\uff0c\u5185\u7f51\u7684\u6240\u6709\u7f51\u7edc\u8bbe\u5907\u5f00\u542fTelnet\u670d\u52a1\u3002<\/p>\n 1.\u62d3\u6251\u642d\u5efa<\/p>\n <\/p>\n <\/p>\n 1. \u914d\u7f6e\u4ea4\u6362\u673a<\/p>\n \uff081\uff09\u5728\u6240\u6709\u4ea4\u6362\u673a\u521b\u5efavlan 99\uff0c\u4f5c\u4e3a\u7ba1\u7406vlan\u3002<\/p>\n [SW1]vlan 99 [SW2]vlan 99 [SW3]vlan 99 [SW4]vlan 99<\/p>\n [SW5]vlan 99 [SW6]vlan 99 [SW7]vlan 99 [SW10]vlan 99<\/p>\n \uff082\uff09\u4e3a\u6240\u6709\u4ea4\u6362\u673a\u914d\u7f6evlan99\u4e09\u5c42\u63a5\u53e3IP\u5730\u5740\u3002<\/p>\n [SW1]int vlanif 99<\/p>\n [SW1-Vlanif99]ip address 192.168.99.1<\/p>\n [SW2]int vlanif 99<\/p>\n [SW2-Vlanif99]ip address 192.168.99.2<\/p>\n [SW3]int vlanif 99<\/p>\n [SW3-Vlanif99]ip address 192.168.99.3<\/p>\n [SW4]int vlanif 99<\/p>\n [SW4-Vlanif99]ip address 192.168.99.4<\/p>\n [SW5]int vlanif 99<\/p>\n [SW5-Vlanif99]ip address 192.168.99.5<\/p>\n [SW6]int vlanif 99<\/p>\n [SW6-Vlanif99]ip address 192.168.99.6<\/p>\n [SW7]int vlanif 99<\/p>\n [SW7-Vlanif99]ip address 192.168.99.7<\/p>\n [SW10]int vlanif 99<\/p>\n [SW10-Vlanif99]ip address 192.168.99.10<\/p>\n \uff083\uff09\u5728\u6240\u6709\u4ea4\u6362\u673a\u4e0a\u5f00\u542f\u8fdc\u7a0b\u7ba1\u7406\u670d\u52a1\uff08\u771f\u5b9e\u7684\u8bbe\u5907\u4e0a\uff0c\u5728\u7528\u6237\u63a5\u53e3\u89c6\u56fe\u4e0a\u9700\u914d\u7f6eprotocol inbound all---\u652f\u6301\u6240\u6709\u534f\u8bae\u5165\u7ad9\uff0c\u4e0d\u7136\u65e0\u6cd5\u8fdc\u7a0b\u7ba1\u7406\uff09\u3002<\/p>\n [SWX]telnet server enable<\/p>\n [SWX]user-interface vty 0 4<\/p>\n [SWX-ui-vty0-4]authentication-mode aaa<\/p>\n [SWX-ui-vty0-4]protocol inbound all<\/p>\n [SWX]aaa<\/p>\n [SWX-aaa]local-user admin password cipher huawei@123<\/p>\n [SWX-aaa]local-user admin privilege level 15<\/p>\n [SWX-aaa]local-user admin service-type telnet<\/p>\n \uff084\uff09\u5728SW5\u30016\u4e0a\u505avlan99\u7684\u4e3b\u4ece\u5907\u4efd\uff0c\u8bbe\u7f6e\u4f18\u5148\u7ea7\uff0c\u865a\u62dfIP\u4e3a192.168.99.254\u3002<\/p>\n [SW5]int Vlanif 99<\/p>\n [SW5-Vlanif99]vrrp vrid 99 virtual-ip 192.168.99.254<\/p>\n [SW5-Vlanif99]vrrp vrid 99 priority 200<\/p>\n [SW6]int Vlanif 99<\/p>\n [SW6-Vlanif99]vrrp vrid 99 virtual-ip 192.168.99.254<\/p>\n [SW6-Vlanif99]vrrp vrid 99 priority 100<\/p>\n \uff085\uff09\u6240\u6709\u4ea4\u6362\u673a\u6dfb\u52a0MSTP\u914d\u7f6evlan99\u7684\u5b9e\u4f8b9\u3002<\/p>\n [SWX]stp region-configuration<\/p>\n [SWX-mst-region]region-name zhaoqing<\/p>\n [SWX-mst-region]instance 9 vlan 99<\/p>\n [SWX-mst-region]active region-configuration<\/p>\n \uff086\uff09SW5\u4f5c\u4e3aVLAN99\u6839\u7f51\u6865\uff0c\u4f18\u5148\u7ea7\u4e3a4096\uff1bSW6\u4f5c\u4e3aVLAN99\u6b21\u6839\u7f51\u6865\uff0c\u4f18\u5148\u7ea7\u4e3a8192\u3002<\/p>\n [SW5]stp instance 9 priority 4096<\/p>\n [SW6]stp instance 9 priority 8192<\/p>\n \uff087\uff09\u5728SW5\u30016\u4e0a\u8fdb\u5165OSPF\u8fdb\u7a0b1\u4e2d\u521b\u5efaarea 99\uff0c\u5ba3\u544a\u7f51\u7edc192.168.99.0 0.0.0.255<\/p>\n [SW5]ospf 1<\/p>\n [SW5-ospf-1]area 99<\/p>\n [SW5-ospf-1-area-0.0.0.99]network 192.168.99.0 0.0.0.255<\/p>\n <\/p>\n [SW6]ospf 1<\/p>\n [SW6-ospf-1]area 99<\/p>\n [SW6-ospf-1-area-0.0.0.99]network 192.168.99.0 0.0.0.255<\/p>\n \uff088\uff09\u5728SW1~4\u4e0a\u914d\u7f6e\u9ed8\u8ba4\u8def\u7531\uff0c\u4e0b\u4e00\u6761\u4e3a192.168.99.254<\/p>\n [SWX]ip route-static 0.0.0.0 0 192.168.99.254<\/p>\n 2.\u914d\u7f6e\u8def\u7531<\/p>\n \uff081\uff09\u5728R3\u7684GE0\/0\/2\u63a5\u53e3\u4e0a\u914d\u7f6eIP\u5730\u5740\u3002<\/p>\n [R3]int g0\/0\/2<\/p>\n [R3-GigabitEthernet0\/0\/2]ip address 115.1.1.254 24<\/p>\n \uff082\uff09\u5728R1\u67e5\u770b\u8def\u7531\u8868\uff08display ip routing-table\uff09\uff0c\u53bb\u5f80192.168.88.0\u548c192.168.99.0\u7f51\u6bb5\u5b58\u5728\u4e24\u6761\u8def\uff0c\u4e3a\u4f7f\u8def\u7531\u662f\u6700\u4f18\uff0c\u5728SW6\u8fdb\u5165vlanif88\u548cvlanif99\u4fee\u6539OSPF\u7684cost\u503c\u3002<\/p>\n [SW6]int Vlanif 88<\/p>\n [SW6-Vlanif88]ospf cost 10<\/p>\n [SW6-Vlanif88]quit<\/p>\n [SW6]int Vlanif 99<\/p>\n [SW6-Vlanif99]ospf cost 10<\/p>\n (3)\u4e3a\u4f7f\u603b\u516c\u53f8\u5916\u7f51\u5ba2\u6237\u7aef\u8bbf\u95ee\u5b50\u516c\u53f8\u5185\u7f51WEB\u670d\u52a1\u5668\uff0c\u9700\u8981\u5728\u8fb9\u754c\u8def\u7531R1\u914d\u7f6enat server\u3002<\/p>\n [R1]int g0\/0\/1<\/p>\n [R1-GigabitEthernet0\/0\/1]nat server protocol tcp global 100.1.1.2 80 inside 192.168.88.1 80<\/p>\n \uff084\uff09\u4e3a\u4f7f\u603b\u516c\u53f8\u7684\u7f51\u7edc\u7ba1\u7406\u5458\u5728\u5916\u7f51\u8fdc\u7a0b\u7ba1\u7406\u5b50\u516c\u53f8\u5185\u7f51\u7f51\u7edc\u8bbe\u5907\uff0c\u9700\u8981\u5728\u8fb9\u754c\u8def\u7531R1\u914d\u7f6enat server\u3002<\/p>\n [R1]int g0\/0\/1<\/p>\n [R1-GigabitEthernet0\/0\/1] nat server protocol tcp global 100.1.1.3 23 inside 192.168.99.254 23<\/p>\n \u6b65\u9aa4\u516d\uff1a<\/strong><\/p>\n \uff08\u516d\uff09\u5b9e\u73b0\u6838\u5fc3\u4ea4\u6362\u673a\u7f51\u5173\u5197\u4f59\u5907\u4efd\uff0c\u5185\u7f51\u7684\u8fb9\u754c\u8def\u7531R1\u548cR2\u63a5\u5165\u4e0d\u540c\u7684\u8fd0\u8425\u5546\u7f51\u7edc\uff0c\u5b9e\u73b0\u4e3b\u5907<\/strong><\/p>\n \u4e3a\u4fdd\u8bc1\u4f01\u4e1a\u5185\u7f51\u7f51\u7edc\u7684\u53ef\u9760\u6027\uff0c\u5728\u6838\u5fc3\u4ea4\u6362\u673a\u4e0a\u505a\u7f51\u5173\u5197\u4f59\u5907\u4efd\uff0c\u8fb9\u754c\u8def\u7531\u4e5f\u505a\u5907\u4efd\uff0c\u5f53\u67d0\u4e00\u8fd0\u8425\u5546\u7684\u7f51\u7edc\u51fa\u73b0\u6545\u969c\u65f6\uff0c\u53ef\u4ee5\u53ca\u65f6\u4f7f\u7528\u53e6\u4e00\u8fd0\u8425\u5546\u7684\u7f51\u7edc\uff0c\u4fdd\u8bc1\u516c\u53f8\u7f51\u7edc\u53ef\u9760\u6027\u3002<\/p>\n 1.\u62d3\u6251\u642d\u5efa<\/p>\n <\/p>\n 2.\u4ea4\u6362\u673a\u914d\u7f6e<\/p>\n (1)\u5728SW8\u4e0a\u521b\u5efavlan<\/p>\n <huawei>sys<\/p>\n [huawei]un in en<\/p>\n [huawei]sysn SW8 (2)\u6240\u6709\u4ea4\u6362\u673a\u5728\u7cfb\u7edf\u89c6\u56fe\u4e0b\u521b\u5efaVLAN16 (3)\u5728SW5\u7684GE0\/0\/5\u63a5\u53e3\uff0c\u914d\u7f6etrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709\u7684vlan\u901a\u8fc7 (4)\u5728SW6\u7684GE0\/0\/8\u63a5\u53e3\uff0c\u914d\u7f6etrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709\u7684vlan\u901a\u8fc7 (5)\u5728SW8\u7684GE0\/0\/5~7\u63a5\u53e3\uff0c\u914d\u7f6etrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709\u7684vlan\u901a\u8fc7\uff1b (6)\u5728SW7\u7684GE0\/0\/8\u63a5\u53e3\uff0c\u914d\u7f6etrunk\u7aef\u53e3\uff0c\u5141\u8bb8\u6240\u6709\u7684vlan\u901a\u8fc7 (7)\u5728SW5\u4e0a\u914d\u7f6e\u4e09\u5c42\u63a5\u53e3IP\u5730\u5740 (8)\u5728SW6\u4e0a\u914d\u7f6e\u4e09\u5c42\u63a5\u53e3IP\u5730\u5740 (9)\u5728R1\u7684GE0\/0\/2\u63a5\u53e3\u914d\u7f6eIP\u5730\u5740 (10)\u5728SW5\u30016\u548cR1\u4e0a\u8fdb\u5165OSPF 1\u7684area 0\u5ba3\u544a192.168.16.0 [SW6]ospf 1 [R1]ospf 1 (11)\u5728SW8\u4e0a\u505aVLAN16\u7684\u6839\u7f51\u6865\uff1bSW7\u505aVLAN16\u6b21\u6839\u7f51\u6865\uff1bSW8\u4f5c\u4e3avlan15\u7684\u6b21\u6839\u7f51\u6865<\/p>\n [SW8]stp region-configuration [SW8-mst-region]q [SW7]stp instance 16 priority 8192<\/p>\n (12)\u5728\u6240\u6709\u4ea4\u6362\u673a\u4e0a\u52a0\u5165\u5b9e\u4f8b16\uff0c\u7136\u540e\u91cd\u65b0\u6fc0\u6d3b (13)\u5728\u8fb9\u754c\u8def\u7531R1\u4e0a\u7684GE0\/0\/2\u63a5\u53e3\u4fee\u6539OSPF\u7684\u5f00\u9500\u4e3a10\uff0c\u662f\u8def\u7531\u6700\u4f18\uff0cvlan16\u4f5c\u4e3a\u5907\u4efd 3.\u914d\u7f6e\u8def\u7531<\/p>\n \uff081\uff09\u5728\u8fb9\u754c\u8def\u7531R2\u4e0a\u914d\u7f6eGE0\/0\/0~1\u7684IP\u5730\u5740 \uff082\uff09\u5728R3\u7684GE4\/0\/1\u4e0a\u914d\u7f6eIP\u5730\u5740 \uff083\uff09\u5728SW7\u7684GE0\/0\/16\u63a5\u53e3\u914d\u7f6eaccess\u7aef\u53e3\uff0c\u5141\u8bb8vlan15\u901a\u8fc7 (4)\u5728SW8\u7684GE0\/0\/16\u63a5\u53e3\u914d\u7f6eaccess\u7aef\u53e3\uff0c\u5141\u8bb8vlan16\u901a\u8fc7 (5)\u5728\u8fb9\u754c\u8def\u7531R2\u914d\u7f6eACL (6)\u5728\u8fb9\u754c\u8def\u7531R2\u7684GE0\/0\/1\u63a5\u53e3\u914d\u7f6e\uff0c\u6700\u8282\u7701IP\uff08easyIP\uff09nat\u8f6c\u6362 (7)\u5728\u8fb9\u754c\u8def\u7531R2\u5b9e\u73b0\u5185\u7f51\u8bbf\u95ee\u5916\u7f51\u4e00\u822c\u90fd\u4f7f\u7528\u9ed8\u8ba4\u8def\u7531 <\/p>\n (8)\u5728\u8fb9\u754c\u8def\u7531R2\u4e0a\u5907\u4efd\u5916\u7f51\u5ba2\u6237\u7aef\u8bbf\u95ee\u5185\u7f51\u7684WEB\u670d\u52a1\u5668\uff0c\u5728\u8fb9\u754c\u8def\u7531\u5668R2\u7684\u51fa\u63a5\u53e3GE0\/0\/1\u4e0a <\/p>\n (9)\u5728\u8fb9\u754c\u8def\u7531R2\u4e0a\u5907\u4efd\u4e3a\u4f7f\u5916\u7f51\u8fdc\u7a0b\u7ba1\u7406SW1\uff0c\u9700\u8981\u5728\u8fb9\u754c\u8def\u7531R2\u5907\u4efd\u914d\u7f6enat server\uff0c (10)\u5728\u8fb9\u754c\u8def\u7531R2\u4e0a\u914d\u7f6eospf (11)\u5728\u8fb9\u754c\u8def\u7531R2\u4e0a\u5f15\u5165\u9ed8\u8ba4\u8def\u7531 (12)\u628a\u8fb9\u754c\u8def\u7531R2\u7684GE0\/0\/0\u548cGE0\/0\/2\u63a5\u53e3\u7684\u5f00\u9500\u5206\u522b\u6539\u4e3a10\uff0c3 (13)\u5728\u6838\u5fc3\u4ea4\u6362\u673a\u505a\u7f51\u5173\u5197\u4f59 [SW5]int Vlanif 15 [SW6]int Vlanif 15 <\/p>\n <\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":"\u534e\u4e3aeNSP\u5b9e\u73b0\u4f01\u4e1a\u5185\u7f51\u53cc\u51fa\u63a5\u53e3\u8bbf\u95ee\u5916\u7f51\uff08VRRP\u3001MSTP\u3001DHCP\u3001NAT-easy IP\u3001nat server\u3001ACL\uff09\u516c\u53f8\u6709\u4e24\u4e2a\u51fa\u53e3\u8bbe\u5907R1\u548cR2\uff0cR1\u4f5c...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8390"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=8390"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8390\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=8390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=8390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=8390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
\n
[SW8]vlan batch 10 15 16 20 30 40 66 88 99<\/p>\n
[SWX]vlan 16<\/p>\n
[SW5]int g0\/0\/5
[SW5-GigabitEthernet0\/0\/5]port link-type trunk
[SW5-GigabitEthernet0\/0\/5]port trunk allow-pass vlan all<\/p>\n
[SW8]int g0\/0\/8
[SW8-GigabitEthernet0\/0\/8]port link-type trunk
[SW8-GigabitEthernet0\/0\/8]port trunk allow-pass vlan all<\/p>\n
GE0\/0\/15\u63a5\u53e3\uff0c\u914d\u7f6eaccess\u7aef\u53e3\uff0c\u5141\u8bb8vlan16\u901a\u8fc7
[SW8]int g0\/0\/5
[SW8-GigabitEthernet0\/0\/5]port link-type trunk
[SW8-GigabitEthernet0\/0\/5]port trunk allow-pass vlan all
[SW8]int g0\/0\/6
[SW8-GigabitEthernet0\/0\/6]port link-type trunk
[SW8-GigabitEthernet0\/0\/6]port trunk allow-pass vlan all
[SW8]int g0\/0\/7
[SW8-GigabitEthernet0\/0\/7]port link-type trunk
[SW8-GigabitEthernet0\/0\/7]port trunk allow-pass vlan all
[SW8]int g0\/0\/15
[SW8-GigabitEthernet0\/0\/15]port link-type access
[SW8-GigabitEthernet0\/0\/15]port default vlan 16<\/p>\n
[SW7]int g0\/0\/8
[SW7-GigabitEthernet0\/0\/8]port link-type trunk
[SW7-GigabitEthernet0\/0\/8]port trunk allow-pass vlan all<\/p>\n
[SW5]int Vlanif 16
[SW5-Vlanif15]ip address 192.168.16.6 24<\/p>\n
[SW6]int vlanif 16
[SW6-Vlanif16]ip address 192.168.16.5 24<\/p>\n
[R1]int g0\/0\/2
[R1-GigabitEthernet0\/0\/2]ip address 192.168.16.2 24<\/p>\n
[SW5]ospf 1
[SW5-ospf-1]area 0
[SW5-ospf-1-area-0.0.0.0]network 192.168.16.0 0.0.0.255<\/p>\n
[SW6-ospf-1]area 0
[SW6-ospf-1-area-0.0.0.0]network 192.168.16.0 0.0.0.255<\/p>\n
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.16.0 0.0.0.255<\/p>\n
[SW8-mst-region]region-name zhaoqing
[SW8-mst-region]instance 1 vlan 10
[SW8-mst-region]instance 2 vlan 20
[SW8-mst-region]instance 3 vlan 30
[SW8-mst-region]instance 4 vlan 40
[SW8-mst-region]instance 9 vlan 99
[SW8-mst-region]instance 15 vlan 15
[SW8-mst-region]instance 16 vlan 16
[SW8-mst-region]active region-configuration<\/p>\n
[SW8]stp instance 16 priority 4096
[SW8]stp instance 15 priority 8192<\/p>\n
[SWX]stp region-configuration
[SWX-mst-region]region-name zhaoqing
[SWX-mst-region]instance 16 vlan 16
[SWX-mst-region]active region-configuration<\/p>\n
[R1]int g0\/0\/2
[R1-GigabitEthernet0\/0\/2]ospf cost 10<\/p>\n
[R2]int g0\/0\/0
[R2-GigabitEthernet0\/0\/0]ip add 192.168.16.1 24
[R2-GigabitEthernet0\/0\/0]int g0\/0\/1
[R2-GigabitEthernet0\/0\/1]ip add 110.1.1.1 24
[R2-GigabitEthernet0\/0\/1]int g0\/0\/2
[R2-GigabitEthernet0\/0\/2]ip add 192.168.15.2 24<\/p>\n
[R3]int g4\/0\/1
[R3-GigabitEthernet4\/0\/1]ip add 110.1.1.6 24<\/p>\n
[SW7]int g0\/0\/16
[SW7-GigabitEthernet0\/0\/16]port link-type access
[SW7-GigabitEthernet0\/0\/16]port default vlan 15<\/p>\n
[SW8]int g0\/0\/16
[SW8-GigabitEthernet0\/0\/16]port link-type access
[SW8-GigabitEthernet0\/0\/16]port default vlan 16<\/p>\n
[R2]acl 2000
[R2-acl-2000]rule 5 deny source 192.168.10.0 0.0.0.255
[R2-acl-2000]rule 10 permit source 192.168.20.0 0.0.0.255
[R2-acl-2000]rule 15 permit source 192.168.30.0 0.0.0.255
[R2-acl-2000]rule 20 permit source 192.168.40.0 0.0.0.255
[R2-acl-2000]rule 25 permit source 192.168.15.0 0.0.0.255
[R2-acl-2000]rule 30 permit source 192.168.66.0 0.0.0.255
[R2-acl-2000]rule 35 permit source 192.168.88.0 0.0.0.255 <\/p>\n
[R2]int g0\/0\/1
[R2-GigabitEthernet0\/0\/1]nat outbound 2000<\/p>\n
[R2]ip route-static 0.0.0.0 0 110.1.1.6<\/p>\n
\u914d\u7f6enat server,\u534f\u8bae\u4e3ahttp,\u91c7\u7528TCP\u4f20\u8f93\uff0c\u7aef\u53e3\u4e3a80\uff0c\u516c\u7f51\u5730\u5740\u4e3a110.1.1.2\u6620\u5c04\u5185\u7f51WEB\u670d\u52a1\u5668\u5730\u5740
[R2]int g0\/0\/1
[R2-GigabitEthernet0\/0\/1]nat server protocol tcp global 110.1.1.2 80 inside 192.168.88.1 80<\/p>\n
[R2]int g0\/0\/1
[R2-GigabitEthernet0\/0\/1]nat server protocol tcp global 110.1.1.3 23 inside 192.168.99.254 23<\/p>\n
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.15.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.16.0 0.0.0.255<\/p>\n
[R2]ospf 1
[R2-ospf-1]default-route-advertise<\/p>\n
[R2]int g0\/0\/0
[R2-GigabitEthernet0\/0\/0]ospf cost 10
[R2]int g0\/0\/2
[R2-GigabitEthernet0\/0\/2]ospf cost 3<\/p>\n
\u5728SW5\u30016\u4e0a\u505avlan15\u300116\u7684\u4e3b\u4ece\u5907\u4efd\uff0c\u865a\u62dfIP\u4e3a192.168.XX.254<\/p>\n
[SW5-Vlanif15]vrrp vrid 15 virtual-ip 192.168.15.254
[SW5-Vlanif15]vrrp vrid 15 priority 200
[SW5-Vlanif15]int Vlanif 16
[SW5-Vlanif16]vrrp vrid 16 virtual-ip 192.168.16.254
[SW5-Vlanif16]vrrp vrid 16 priority 100<\/p>\n
[SW6-Vlanif15]vrrp vrid 15 virtual-ip 192.168.15.254
[SW6-Vlanif15]vrrp vrid 15 priority 100
[SW6-Vlanif15]int Vlanif 16
[SW6-Vlanif16]vrrp vrid 16 virtual-ip 192.168.16.254
[SW6-Vlanif16]vrrp vrid 16 priority 200<\/p>\n