{"id":180,"date":"2010-01-22T16:39:05","date_gmt":"2010-01-22T08:39:05","guid":{"rendered":"http:\/\/www.ipcpu.com\/?p=180"},"modified":"2010-01-22T16:39:05","modified_gmt":"2010-01-22T08:39:05","slug":"switch-vlan-trunk-vtp","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2010\/01\/switch-vlan-trunk-vtp\/","title":{"rendered":"\u4ea4\u6362\u673a\u539f\u7406\u3001VLAN\u3001TRUNK\u3001VTP"},"content":{"rendered":"

\u4e00\u3001\u4ea4\u6362\u673a\u539f\u7406\uff1a
\n1\uff0e \u57fa\u4e8e\u6e90MAC\u5730\u5740\u5b66\u4e60\uff0c\u57fa\u4e8e\u76ee\u6807MAC\u5730\u5740\u8f6c\u53d1\u3002
\n2. \u00a0 \u5bf9\u4e8e\u6ca1\u6709\u76ee\u6807MAC\u5730\u5740\u8868\u9879\u7684\u5e27\uff0c\u5411\u672cVLAN\u7684\u5176\u4ed6\u6240\u6709\u63a5\u53e3\uff08\uff09\u8f6c\u53d1
\n3\uff0e \u6536\u5230\u5e7f\/\u7ec4\u64ad\u5e27, \u5411\u672cVLAN\u7684\u5176\u4ed6\u6240\u6709\u63a5\u53e3\uff08\uff09\u8f6c\u53d1
\n4. \u00a0 \u540c\u4e00\u4e2aMAC\u5730\u5740\u88ab\u591a\u4e2a\u63a5\u53e3\u5b66\u4e60\u5230\uff0c\u9009\u62e9\u540e\u5b66\u4e60\u5230\u7684\u63a5\u53e3
\n5\uff0e \u540c\u4e00\u63a5\u53e3\u53ef\u4ee5\u5b66\u4e60\u5230\u591a\u4e2aMAC\u5730\u5740<\/p>\n

\u601d\u79d1\u4ea4\u6362\u673a\u9ed8\u8ba4MAC\u5730\u5740\u8001\u5316\u65f6\u95f4\u662f300S,<\/p>\n

\u4fee\u6539\u8001\u5316\u65f6\u95f4\uff0c\u53ef\u4ee5\u9488\u5bf9\u5355\u4e2aVLAN\u6765\u6539\u52a8<\/p>\n

Sw1(config)# mac-addresst-able aging-time 150 [vlan 10]<\/p>\n

Switch#sh mac-address-table
\nMac Address Table
\n-------------------------------------------<\/p>\n

Vlan\u00a0\u00a0\u00a0 Mac Address\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Type\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ports
\n----\u00a0\u00a0\u00a0 -----------\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 --------\u00a0\u00a0\u00a0 -----<\/p>\n

1\u00a0\u00a0\u00a0 0030.f2b4.4601\u00a0\u00a0\u00a0 DYNAMIC\u00a0\u00a0\u00a0\u00a0 Fa0\/1
\n10\u00a0\u00a0\u00a0 0001.00cc.0521\u00a0\u00a0\u00a0 STATIC\u00a0\u00a0\u00a0\u00a0\u00a0 Fa0\/1
\nSwitch#
\n\u4e09\u5143\u7ec4\uff1aVLAN\u3001MAC\u3001Port<\/p>\n

\u81ea\u884c\u7ed1\u5b9a\u9759\u6001MAC\u5730\u5740
\nSW(config)#mac-address-table static 0001.00cc.0521 vlan 10 interface FastEthernet0\/1<\/p>\n

\u5bf9\u4e8e\u6bcf\u4e2a\u7f51\u5361\u800c\u8a00\uff0c\u90fd\u6709\u81ea\u5df1\u7684MAC\u5730\u5740\uff0c\u90a3\u4e48\u5982\u4f55\u67e5\u770b\u6bcf\u4e2a\u4ea4\u6362\u673a\u63a5\u53e3\u7684\u5185\u7f6eMAC\u5730\u5740\uff0c\u90a3\u4e48\u600e\u4e48\u67e5\u770b\u5462\uff1f\u54c8\u54c8\uff0c\u8fd9\u4e2a\u95ee\u9898\u6709\u4e9b\u65e0\u804a\u554a\uff0c\u7528sh int\u5c31\u53ef\u4ee5\u67e5\u770b\u4e86\u3002<\/p>\n

\u4e8c\u3001VLAN<\/p>\n

VLAN\u4f5c\u7528\uff1a\u9694\u79bb\u5e7f\u64ad\u57df<\/p>\n

VLAN\u521b\u5efa
\nSw1(config)#vlan 2
\nSw1(config-vlan)#name ipcpu<\/p>\n

\u67e5\u770bVLAN
\nSw1#show vlan
\nSw1#show vlan brief<\/p>\n

\u6ce8\u610f\uff1a
\nVLAN\u7684\u6570\u636e\u4fdd\u5b58\u5728flash\u4e2d\u7684vlan.dat\u6587\u4ef6\u4e2d\uff0csh ru\u4e0d\u80fd\u67e5\u770bVLAN<\/p>\n

\u4e09\u3001TRUNK<\/p>\n

\u5728\u5355\u6761\u7269\u7406\u94fe\u8def\u4e0a\u627f\u8f7d\u591a\u4e2aVLAN\u7684\u6d41\u91cf\u3002\u4e00\u822c\u7528\u5728\u4ea4\u6362\u673a\u4e0e\u4ea4\u6362\u673a\u4e4b\u95f4\u3002<\/p>\n

Trunk\u8fd0\u7528\u76842\u79cd\u534f\u8bae\uff1a
\n1.802.1Q\uff1a\u57fa\u672c\u6807\u51c6\u7684IEEE\u534f\u8bae\uff0c\u5c5e\u4e1a\u754c\u6807\u51c6\u3002
\n2.ISL\uff08Inter-Switch Link\uff09\uff1aCisco\u4e13\u6709\u7684Trunk\u5c01\u88c5\u65b9\u5f0f\u3002<\/p>\n

\u5e38\u89c1\u914d\u7f6e\uff1a<\/p>\n

!
\ninterface FastEthernet0\/11
\nswitchport trunk allowed vlan 10,20
\nswitchport trunk encapsulation dot1q
\nswitchport mode trunk
\n!
\ninterface FastEthernet0\/12
\nswitchport access vlan 10
\nswitchport mode access
\n!
\n\u56db\u3001VTP<\/p>\n

VTP\u662f\u4e00\u79cd2\u5c42\u6d88\u606f\u534f\u8bae\uff0c\u901a\u8fc7\u7ba1\u7406VTP\u57df\u5185\u7684VLAN\u589e\/\u5220\/\u6539\uff0c\u4fdd\u6301VLAN\u914d\u7f6e\u7684\u4e00\u81f4\u6027\u3002
\n\u4ea4\u6362\u673a\u53ea\u80fd\u5728802.1Q\/ISL Trunk\u4e2d\u4f20\u9001VTP\u4fe1\u606f\u3002
\n\u8fd9\u662f\u601d\u79d1\u79c1\u6709\u534f\u8bae\uff0c\u76f8\u4f3c\u529f\u80fd\u7684\u4e1a\u5185\u6807\u51c6\u6709GVRP\u3002<\/p>\n

VTP\u6709\u4e09\u79cd\u6a21\u5f0f\uff1a
\nServer
\nClient
\nTransparent[\u672c\u5730\u6709\u6548]<\/p>\n

VTP\u4fe1\u606f\u6bcf5\u5206\u949f\u901a\u544a\u4e00\u6b21\uff0c\u6216\u89e6\u53d1\u66f4\u65b0\u3002
\nVLAN\u4fe1\u606f\u540c\u6b65\u89c4\u5219\uff1a\u4f4e\u7248\u672c\u53f7\u7684\u8ddf\u9ad8\u7248\u672c\u53f7\u7684\u5b66\u4e60<\/p>\n

\u6ce8\u610f\uff1a\u7f51\u7edc\u4e2d\u65b0\u589e\u4ea4\u6362\u673a\u5e94\u8be5\u5148\u914d\u7f6e\u6210transparent\u518d\u63a5\u5165\uff0c\u7136\u540e\u4fee\u6539\u6210server\u6216\u8005client\uff0c\u9632\u6b62\u5b58\u5728\u9ad8<\/p>\n

\u7248\u672cVLAN\u4fe1\u606f\uff0c\u5c06\u539f\u5148VTP server\u4e2d\u7684\u4fe1\u606f\u5237\u6389\u3002<\/p>\n

\u5e38\u7528\u64cd\u4f5c\uff1a<\/p>\n

Switch(config)#vtp domain ipcpu.com
\nChanging VTP domain name from NULL to ipcpu.com
\nSwitch(config)#vtp password haha
\nSwitch(config)#vtp mode server
\nDevice mode already VTP SERVER.<\/p>\n

\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » \u4ea4\u6362\u673a\u539f\u7406\u3001VLAN\u3001TRUNK\u3001VTP<\/a><\/p>","protected":false},"excerpt":{"rendered":"

\u4e00\u3001\u4ea4\u6362\u673a\u539f\u7406\uff1a 1\uff0e \u57fa\u4e8e\u6e90MAC\u5730\u5740\u5b66\u4e60\uff0c\u57fa\u4e8e\u76ee\u6807MAC\u5730\u5740\u8f6c\u53d1\u3002 2. \u00a0 \u5bf9\u4e8e\u6ca1\u6709\u76ee\u6807MAC\u5730\u5740\u8868\u9879\u7684\u5e27\uff0c\u5411\u672cVLAN\u7684\u5176\u4ed6\u6240\u6709\u63a5\u53e3\uff08\uff09\u8f6c\u53d1 3\uff0e \u6536\u5230\u5e7f\/\u7ec4\u64ad\u5e27, \u5411\u672cVLAN\u7684\u5176\u4ed6\u6240\u6709\u63a5\u53e3\uff08\uff09\u8f6c\u53d1 4. \u00a0 \u540c\u4e00\u4e2aMAC\u5730\u5740\u88ab\u591a\u4e2a\u63a5\u53e3\u5b66\u4e60\u5230\uff0c\u9009\u62e9\u540e\u5b66\u4e60\u5230\u7684\u63a5\u53e3 5\uff0e \u540c\u4e00\u63a5\u53e3\u53ef\u4ee5\u5b66\u4e60\u5230\u591a\u4e2aMAC\u5730\u5740 \u601d\u79d1\u4ea4\u6362\u673a\u9ed8\u8ba4MAC\u5730\u5740\u8001\u5316\u65f6\u95f4\u662f300S, \u4fee\u6539\u8001\u5316\u65f6\u95f4\uff0c\u53ef\u4ee5\u9488\u5bf9\u5355\u4e2aVLAN\u6765\u6539\u52a8 Sw1(config)# mac-addresst-able aging-time 150 [vlan 10] Switch#sh mac-address-table Mac Address Table ——————————————- Vlan\u00a0\u00a0\u00a0 Mac Address\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Type\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ports —-\u00a0\u00a0\u00a0 ———–\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ——–\u00a0\u00a0\u00a0 —– 1\u00a0\u00a0\u00a0 0030.f2b4.4601\u00a0\u00a0\u00a0 DYNAMIC\u00a0\u00a0\u00a0\u00a0 Fa0\/1 10\u00a0\u00a0\u00a0 0001.00cc.0521\u00a0\u00a0\u00a0 STATIC\u00a0\u00a0\u00a0\u00a0\u00a0 Fa0\/1 Switch# \u4e09\u5143\u7ec4\uff1aVLAN\u3001MAC\u3001Port \u81ea\u884c\u7ed1\u5b9a\u9759\u6001MAC\u5730\u5740 SW(config)#mac-address-table static 0001.00cc.0521 vlan 10 interface FastEthernet0\/1 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/180"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":0,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}