{"id":952,"date":"2008-10-07T22:37:00","date_gmt":"2008-10-07T14:37:00","guid":{"rendered":"http:\/\/note.systw.net\/note\/?p=952"},"modified":"2023-11-07T22:47:10","modified_gmt":"2023-11-07T14:47:10","slug":"cisco-vtp","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/952","title":{"rendered":"Cisco VTP"},"content":{"rendered":"\n<p>VTP(VLAN&nbsp;Trunking&nbsp;Protocol,VLAN\u4e2d\u7e7c\u50b3\u8f38\u5354\u5b9a)<br>\u601d\u79d1\u5c08\u5c6c\u7b2c2\u5c64\u8a0a\u606f\u50b3\u9001\u50b3\u8f38\u5354\u5b9a<br>\u4f7f\u7528\u6642\u6a5f:\u4f7f\u7528vlan\u548c\u6709\u591a\u90e8switch\u6642<\/p>\n\n\n\n<p id=\"lrte\">\u7528\u9014:<br>\u5728trunk\u4e0a\u6563\u4f48vlan\u8cc7\u8a0a\u7d66vtp domain\u4e2d\u6240\u6709\u4ea4\u63db\u5668<br>\u4e3b\u8981\u63a7\u5236\u7db2\u8def\u7bc4\u570d\u5167VLANs\u7684\u589e\u52a0,\u79fb\u9664\u548c\u66f4\u540d&nbsp;<br>\u53ef\u907f\u514d\u5230\u8655\u7d44\u614b\u76f8\u540c\u7684VLAN&nbsp;<br>ex:\u5728\u591a\u53f0switch\u4e0a\u7684\u5176\u4e2d\u4e00\u53f0\u65b0\u589e\u4e00\u500bvlan10,\u5247\u6240\u6709switch\u90fd\u6703\u81ea\u52d5\u589e\u52a0\u4e00\u500bvlan10<br>ps:<br>\u8a0a\u606f\u7b49\u4ea4\u6d41\u53ea\u4f5c\u7528\u5728\u5177\u6709\u76f8\u540cvtp domain\u4e4bswitch<br>\u6bcf\u500bswitch\u53ea\u80fd\u6709\u4e00\u500bvtp domain<br>\u6240\u6709vtp\u8cc7\u8a0a\u5728\u4efb\u4f55\u6a21\u5f0f\u4e0b,\u90fd\u6703\u88ab\u4fdd\u7559\u5728NVRAM\u4e2d,\u5728\u4e0b\u6b21\u958b\u6a5f\u5f8c\u4e5f\u6703\u5b58\u5728<\/p>\n\n\n\n<p id=\"lrte7\"><br>VTP\u4e09\u7a2e\u6a21\u5f0f\uff1a&nbsp;<br><strong>transparent<\/strong>:\u8f49\u9001\u8a0a\u606f,\u53ef\u624b\u52d5\u5efa\u7acb\u4fee\u6539\u522a\u9664vlan,\u5b58\u5728nvram&nbsp;<br>\u3000transparent\u6a21\u5f0f\u7684\u8cc7\u6599\u53ea\u6709\u672c\u6a5f\u7684\u610f\u7fa9,\u56e0\u6b64\u82e5\u6536\u5230\u66f4\u65b0\u8a0a\u606f\u5247\u4e0d\u6703\u4fee\u6539\u81ea\u5df1\u7684\u8cc7\u6599&nbsp;<br>\u3000transparent\u6a21\u5f0f\u53ea\u662f\u70ba\u4e86\u8b93\u9060\u7aefswitch\u5f9e\u5176\u4ed6server switch,\u900f\u904e\u4e0d\u540cvlan\u7684switch\u63a5\u6536vlan\u8cc7\u6599\u5eab<br><strong>server<\/strong>:\u8f49\u9001\u8a0a\u606f,\u540c\u6b65(\u53ef\u81ea\u52d5\u5b78\u7fd2),\u53ef\u624b\u52d5\u5efa\u7acb\u4fee\u6539\u522a\u9664vlan,\u5b58\u5728nvram,\u6563\u64ad\u672c\u6a5fvlan\u8cc7\u8a0a&nbsp;<br>\u3000\u9810\u8a2d\u662fserver\u6a21\u5f0f,\u4e14\u5728switch\u7fa4\u88e1\u81f3\u5c11\u8981\u6709\u4e00\u500b\u662fserver\u6a21\u5f0f\u624d\u53ef\u5206\u4eabvlan\u8cc7\u8a0a<br>\u3000\u82e5\u8981\u5c07\u4ea4\u63db\u5668\u8b8a\u6210server,\u53ef\u5148\u8a2d\u6210client\u6a21\u5f0f\u5148\u5b78\u7fd2,\u4e4b\u5f8c\u5728\u8f49\u6210server\u6a21\u5f0f<br><strong>client<\/strong>:\u8f49\u9001\u8a0a\u606f,\u540c\u6b65(\u53ef\u81ea\u52d5\u5b78\u7fd2)<br>\u3000\u53ea\u6709client\u6a21\u5f0f\u57f7\u884cvlan database\u7121\u6cd5\u9032\u5165<br>ps:<br>Keeping switches in transparent mode can eliminate the chance for duplicate,overlapping VLANs in a large network with many network administrators.<br>ex:<br>two administrators might configure VLANs on switches in their respective areas but use the same VLAN identification or VLAN number.<br>Even though the two VLANs have different meanings and purposes, they could overlap if both administrators advertised them using VTP servers.<br><\/p>\n\n\n\n<p><strong>VTP configuration revision number<\/strong><br>\u7528\u4f86\u8ffd\u8e64\u6700\u5f8c\u4e00\u500bnetwork topology change\u7684\u8cc7\u8a0a,\u4ee5\u6c7a\u5b9a\u662f\u5426\u8981\u66f4\u65b0\u7d44\u614b &nbsp;<br>\u8f03\u9ad8\u7684revision switch\u4e0d\u6703\u88ab\u8f03\u4f4e\u7684revision switch\u7684\u66f4\u65b0\u8cc7\u8a0a\u6539\u8b8a<br>revision\u90fd\u662f\u5f9e0\u958b\u59cb,\u6bcf\u8b8a\u52d5\u4e00\u6b21\u6703\u52a01,\u6700\u591a\u53ef\u4ee5\u589e\u52a0\u52302147483648<br>\u82e5\u4f7f\u7528earse starup-config\u53ea\u80fd\u6e05\u9664nvram\u5167\u8cc7\u6599,\u4f46\u7121\u6cd5\u5c07revision\u6b780<br>revision number\u521d\u59cb\u5316\u70ba0\u53ea\u6709\u4ee5\u4e0b\u5169\u65b9\u6cd5<br>\u3000Change the switch&#8217;s VTP mode to transparent and then change the mode back to server.<br>\u3000Change the switch&#8217;s VTP domain to a a nonexistent VTP domain,and then change the VTP domain back to the original name.<br>TRANSPARENT\u7684revision\u4e00\u5b9a\u662f0\uff0c\u56e0\u70ba\u4ed6\u4e0d\u6703\u8ddf\u4efb\u4f55\u4eba\u540c\u6b65<br>ps:<br>\u5728\u4efb\u4f55\u6a21\u5f0f\u4e0bVTP configuration revision&nbsp;number\u4e5f\u6703\u88ab\u4fdd\u7559\u5728switch\u4e2d&nbsp;<\/p>\n\n\n\n<p><strong>VTP synchronization problem:<\/strong><br>\u82e5\u65b0\u52a0\u5165\u7684switch\u6709\u8f03\u9ad8\u7684revision,\u5247\u6703\u9001\u51fa\u65b0\u7684vtp\u8cc7\u8a0a\u7d66\u6240\u6709switch\u6539\u8b8a\u539f\u672c\u7684vtp\u8a2d\u5b9a<br>\u9019\u6703\u5c0e\u81f4\u539f\u672c\u8a72domain\u4e0b\u7684\u8a2d\u5b9a\u5168\u90fd\u88ab\u6e05\u9664\u6216\u88ab\u65b0\u52a0\u5165switch\u672a\u9810\u671f\u7684\u8986\u5beb&nbsp;<\/p>\n\n\n\n<p><strong>VTP\u904b\u4f5c\u65b9\u5f0f&nbsp;<\/strong><br>1,vtp advertisement\u662f\u7531multicast\u7684frame\u50b3\u9001\u51fa\u53bb&nbsp;<br>2,server\u8ddfclient\u6703\u8ddf\u6700\u65b0revision\u7684vlan\u7d44\u614b\u505a\u540c\u6b65,\u6bcf\u6b21\u6709\u66f4\u65b0\u7248\u672c\u6642,revision\u5c31\u6703\u81ea\u52d5\u52a01&nbsp;<br>3,\u5047\u8a2d\u4f60\u7684\u67b6\u69cb\u90fd\u6c92\u6709\u4efb\u4f55\u7570\u52d5\u7684\u8a71,\u4ed6\u6bcf\u4e94\u5206\u9418\u6703\u505a\u4e00\u6b21\u540c\u6b65,\u5982\u679c\u6709\u4efb\u4f55\u7570\u52d5\u4ed6\u6703\u99ac\u4e0a\u505a\u540c\u6b65&nbsp;<\/p>\n\n\n\n<p><strong>VTP pruning&nbsp;<\/strong><br>\u53ef\u9650\u5236VTP Trunk\u4e0a\u7684\u5ee3\u64ad\u6d41\u91cf<br>\u6548\u679c\u985e\u4f3c\u5c07switchport trunk allowed vlan\u7684\u529f\u80fd\u7531switch\u81ea\u884c\u6c7a\u5b9a<br>\u7576pruning\u555f\u52d5\u6642:<br>\u3000\u5404switch\u6703\u516c\u544a\u76ee\u524d\u4f7f\u7528\u4e2d\u7684vlan,\u4e26\u5c07switch\u4e2dpruning-eligible vlan\u95dc\u9589<br>\u3000ps:\u56e0vlan1\u662f\u7ba1\u7406\u7528\u9014,\u6240\u4ee5\u70bapruning-ineligible,\u56e0\u6b64\u4e0d\u6703\u88ab\u6b64\u529f\u80fd\u5f71\u97ff<br>\u3000\u5176\u4ed6vlan\u7684broadcast\u6d41\u91cf\u4e0d\u6703\u6d41\u5230\u672a\u4f7f\u7528\u8a72vlan\u7684switch,\u50c5\u6703\u5728\u901a\u5f80\u76ee\u7684\u88dd\u7f6e\u5fc5\u9700\u7684Trunk\u4e2d\u6d41\u52d5\u3000<br>\u3000\u6b64\u6a21\u5f0f\u4e0b,vtp\u4e0d\u6703\u50b3\u9001vlan\u8cc7\u8a0a\u5230\u975evlan\u7684port&nbsp;<br>\u4e0d\u53d7\u6b64\u9650\u5236:<br>\u3000stp:\u82e5\u8981\u9650\u5236stp\u904b\u4f5c\u5247\u5fc5\u9808\u4f7f\u7528switchport trunk allowed vlan\u660e\u78ba\u6307\u5b9a\u53ef\u901a\u904e\u7684vlan<br>\u3000\u6bcf\u53f0switch\u4ecd\u6703\u5b78\u7fd2\u5176\u4ed6vlan\u7684mac\u3000<\/p>\n\n\n\n<p><strong>\u6210\u529f\u57f7\u884cvtp\u56db\u8981\u7d20<\/strong><br>\u4e00\u5b9a\u8981\u662fcisco\u8a2d\u5099<br>\u8981\u5728\u76f8\u540c\u7684vtp\u7ba1\u7406domain<br>\u8981\u6709vlan\u8ddftrunk enable\u8d77\u4f86<br>vtp mode\u662fclient\u6216\u662fserver\u624d\u80fd\u505a\u8d77\u4f86&nbsp;<\/p>\n\n\n\n<p><strong>VTP\u7121\u6cd5\u540c\u6b65\u7684\u53ef\u80fd\u539f\u56e0<\/strong><br>switch\u8aa4\u8a2d\u5728transparent mode,\u5c0e\u81f4switch\u672c\u8eab\u4e0d\u88ab\u66f4\u65b0<br>\u8a72domain\u6c92\u6709server mode switch,\u5c0e\u81f4client mode switch\u7121\u6cd5\u88ab\u66f4\u65b0<br>swtich\u6c92\u6709\u8a2d\u5b9atrunk\u4ecb\u9762<br>\u8981\u540c\u6b65\u7684switch\u5728vtp domain\u6c92\u8a2d\u4e00\u6a23<br>\u5728vtp domain\u4e0b\u7684vtp version\u4e0d\u4e00\u81f4\u6216vtp password\u8a2d\u932f<br>vlan1\u554f\u984c,\u56e0switch\u4e4bnative vlan\u672a\u4e00\u81f4\u5c0e\u81f4\u66f4\u65b0\u8cc7\u8a0a\u7121\u6cd5\u50b3\u7d66\u5176\u4ed6switch&nbsp;<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/p>\n\n\n\n<p><strong>vtp advertisement message<\/strong><br>\u6709\u4ee5\u4e0b3\u7a2e\u985e\u578b\u6700\u5e38\u898b<br>1.Summary advertisements(\u6458\u8981\u901a\u544a):\u6bcf5\u5206\u9418\u50b3\u9001\u4e00\u6b21<br>2.Subset advertisements(\u90e8\u5206\u901a\u544a):\u542bvlan\u8a73\u7d30\u8cc7\u8a0a,\u7576vlan\u8b8a\u52d5\u6642\u6703\u9001\u51fa<br>3.Advertisement requests(\u901a\u544a\u8acb\u6c42):\u82e5\u6536\u5230\u7684revision\u6bd4\u81ea\u5df1\u9ad8\u5247\u9001\u51fa,\u4ee5\u53d6\u5f97\u65b0\u7684vlan\u8cc7\u8a0a<br>ps:\u88ab\u5c01\u88dd\u5728isl\u6216802.1q\u8a0a\u6846\u5167,header\u6703\u4f9dmessage\u7684\u578b\u614b\u8b8a\u5316&nbsp;<\/p>\n\n\n\n<p><strong>Summary advertisements<\/strong><br>\u7576vlan database\u767c\u751f\u8b8a\u5316\u6216\u6bcf5\u5206\u9418,vtp domain servers\u6703\u50b3\u9001summary advertisements<br>\u50b3\u9001\u8cc7\u8a0a\u4f9d\u5c01\u5305\u683c\u5f0f\u6c7a\u5b9a<br>\u683c\u5f0f\u5982\u4e0b\u3000<br>\u3000version:1byte,including VTP version<br>\u3000type:1byte,summary adv<br>\u3000number of subset advertisements to follow:1byte<br>\u3000domain name length:1byte,<br>\u3000management domain name:32byte,zero-padded<br>\u3000configuration revision number:4byte<br>\u3000update time stamp:12byte<br>\u3000md5 digest hash code:16byte<br>ps:<br>For VLAN configuration changes, summary advertisements are followed by one or more subset advertisements with more specific VLAN configuration data<\/p>\n\n\n\n<p><strong>Subset advertisements<\/strong><br>\u7576vlan configuration\u8b8a\u5316\u6642,vtp domain servers\u6703\u50b3\u9001subset advertisements<br>subset advertisements\u6703\u50b3\u9001\u5df1\u7d93\u88ab\u6539\u8b8a\u7684\u8cc7\u8a0a<br>ex:<br>creating or deleting a VLAN<br>suspending or activating a VLAN<br>changing the name of a VLAN<br>changing a VLAN&#8217;s MTU<br>\u50b3\u9001\u8cc7\u8a0a\u4f9d\u5c01\u5305\u683c\u5f0f\u6c7a\u5b9a\u3000<br>\u683c\u5f0f\u5982\u4e0b<br>\u3000version:1byte<br>\u3000type:1byte,summary adv<br>\u3000subset sequence number:1byte<br>\u3000domain name length:1byte\u3000<br>\u3000management domain name:32byte,zero-padded<br>\u3000configuration revision number:4byte<br>\u3000vlan info field 1-n<\/p>\n\n\n\n<p>vlan info field\u683c\u5f0f\u5982\u4e0b<br>\u3000info length:1byte<br>\u3000vlan status:1byte,status of the VLAN<br>\u3000vlan type:1byte,such as Ethernet or Token Ring)<br>\u3000vlan name length:1byte,length of the VLAN name&nbsp;<br>\u3000vlan id:2byte,VLAN number<br>\u3000mtu size:2byte<br>\u3000802.10said:4byte,security association identifier (SAID) value<br>\u3000vlan name:4byte:multiple of 4byte zero-padded\u3000<\/p>\n\n\n\n<p><strong>Advertisement requests from clients<\/strong><br>client switch\u6b32\u5f97\u6240\u7f3a\u4e4f\u7684\u8cc7\u6599\u6642\u6703\u50b3\u9001\u6b64\u985e\u578bAdvertisement<br>client switch\u63d0\u51fa\u6b64advertisement\u7684\u60c5\u6cc1\u53ef\u80fd\u6709\u4ee5\u4e0b<br>\u3000it might be reset and have its VLAN database cleared,<br>\u3000its VTP domain membership might be changed,<br>\u3000it might hear a VTP summary advertisement with a higher revision number than it currently has.<br>\u7576client switch\u63d0\u51fa\u8a72advertisement\u5f8c,vtp domain servers\u6703\u50b3\u56desummary\u548csubset advertisements\u4ee5\u66f4\u65b0client switch<\/p>\n\n\n\n<p>VTP Advertisement Request\u683c\u5f0f\u5982\u4e0b<br>\u3000version:1byte<br>\u3000type:1byte,adv request<br>\u3000reserved:1byte<br>\u3000domain name length:1byte<br>\u3000management domain name,zero-padded to 32byte<br>\u3000starting advertisement to request<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/p>\n\n\n\n<p>vtp\u7248\u672c:<br><strong>VTPv1&nbsp;<\/strong><br>\u9810\u8a2d\u4f7f\u7528<br>ps:\u4e0d\u652f\u6301token ring VLANs<\/p>\n\n\n\n<p><strong>VTPv2<br><\/strong>\u7279\u8272\u5982\u4e0b<br><strong>Version-dependent transparent mode<\/strong><br>\u3000\u5728\u8f49\u9001\u8cc7\u8a0a\u53ea\u6aa2\u67e5vtp domain<br>\u3000ps:vtp1\u6703\u6aa2\u67e5vtp domain\u548cvtp version<br><strong>Consistency checks<\/strong><br>\u3000v2\u6703\u6aa2\u67e5\u5f9eCLI\u53caSNMP\u4f86\u7684\u53c3\u6578,\u5f9e\u9130\u5c45\u53canvram\u4f86\u7684\u53c3\u6578\u4e0d\u6aa2\u67e5<br><strong>Token Ring support<\/strong><br>\u3000v2\u652f\u63f4Token Ring switching\u548cToken Ring VLANs.<br><strong>Unrecognized Type-Length-Value(TLV) support<\/strong><br>\u3000v2\u770b\u5230\u4e0d\u61c2\u7684type\u4e5f\u6703\u8f49\u9001,\u4e26\u4fdd\u7559\u4e00\u4efd\u5728nvram\u4e2d<\/p>\n\n\n\n<p><strong>VTPv3<\/strong><br>\u89e3\u6c7a\u4e00\u4e9btraditional shortcomings.<br>supports extended VLAN numbers(1-4095) that are compatible with the IEEE 802.1Q trunking standard.&nbsp;<br>\u4e0d\u80fd\u76f4\u63a5\u8655\u7406VLANs\u4e8b\u52d9\uff0c\u5b83\u53ea\u8ca0\u8cacAdministrative Domain(\u7ba1\u7406\u57df)\u5167\u4e0d\u900f\u660e\u8cc7\u6599\u5eab\u7684\u5206\u914d\u5de5\u4f5c&nbsp;<br>\u3000\u652f\u6301\u589e\u5f37VLANs<br>\u3000\u652f\u6301\u5c08\u7528VLANs\u7684\u65b0\u589e\u548c\u5ee3\u544a\u3002<br>\u3000\u63d0\u4f9b\u4f3a\u670d\u5668\u8a8d\u8b49\u6548\u80fd\u3002<br>\u3000\u907f\u514d\u300c\u932f\u8aa4\u300d\u8cc7\u6599\u5eab\u9032\u5165VTP\u57df\u3002<br>\u3000\u8207VTP v1 \u548c VTP v2 \u4ea4\u4e92\u4f5c\u7528\u3002<br>\u3000\u652f\u6301On a Per-Port Basis(\u6bcf\u9023\u63a5\u961c)\u7d44\u614b<br>\u3000\u652f\u6301\u50b3\u64adVLAN\u8cc7\u6599\u5eab\u548c\u5176\u5b83\u8cc7\u6599\u5eab\u6a94\u6848\u985e\u578b<\/p>\n\n\n\n<p id=\"suzt1\">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/p>\n\n\n\n<p id=\"suzt1\">&nbsp;\u8a2d\u5b9avtp domain&nbsp;<br><strong>(config)#vtp domain &lt; domain name&gt;<\/strong><br>name\u9577\u5ea6\u70ba1\u523032\u5b57\u5143,\u5927\u5c0f\u5beb\u6709\u5dee&nbsp;<br>\u5728\u672a\u6307\u5b9adomain\u4e4b\u524d,switch\u9810\u8a2d\u90fd\u662fnull domain&nbsp;<br>ps:domain\u8981\u76f8\u540c\u624d\u53ef\u4ee5\u5206\u4eabvlan\u8cc7\u8a0a<br>ps:\u7b49\u65bc<br>(vlan)#vtp domain &lt; domain name&gt;&nbsp;<\/p>\n\n\n\n<p id=\"lrte10\">\u8a2d\u5b9avtp\u6a21\u5f0f<br><strong>(config)#vtp mode &lt; client|server|transparent&gt;<\/strong><br>\u9810\u8a2d\u90fd\u662fserver mode<br>ps:\u7b49\u65bc<br>#vlan database&nbsp;<br>(vlan)#vtp &lt; client|server|transparent&gt;<br>ex:\u8a2d\u5b9a\u6210client\u6a21\u5f0f<br>#vlan database<br>(vlan)#vtp client<\/p>\n\n\n\n<p id=\"lrte16\">\u8a2d\u5b9avtp domain\u7684password<br><strong>(config)#vtp password &lt; password&gt;<\/strong><br>\u5bc6\u78bc\u9577\u5ea6\u70ba8\u523064\u5b57\u5143<br>\u53ef\u9810\u9632\u672a\u6388\u6b0avlan\u8cc7\u8a0a\u540c\u6b65\u6211\u5011<br>\u9810\u8a2d\u672a\u4f7f\u7528\u5bc6\u78bc<br>\u53ea\u9069\u7528\u65bcserver mode\u548cclient mode<br>ps:\u7b49\u65bc<br>(vlan)#vtp password &lt; password&gt;<\/p>\n\n\n\n<p id=\"lrte22\">\u8a2d\u5b9avtp\u7248\u672c<br><strong>(config)#vtp version &lt; 1 | 2&gt;<\/strong><br>\u9810\u8a2d\u70bav1<br>vtp\u7248\u672c\u8981\u76f8\u540c\u624d\u53ef\u4ee5\u4e92\u76f8\u4f5c\u696d&nbsp;<br>\u5728server mode\u555f\u7528v2,\u6703\u8981\u6c42\u540cdomain\u5167\u4e4bswitch\u4e5f\u555f\u7528vtp v2,\u56e0\u6b64\u9019\u4e9bswitch\u8981\u6709\u652f\u63f4vtp v2\u4e4b\u80fd\u529b\u3000<\/p>\n\n\n\n<p id=\"lrte22\">\u555f\u7528pruning<br><strong>(config)#vtp pruning<\/strong>&nbsp;<br>\u9810\u8a2d\u662f\u95dc\u9589<br>\u5728server mode\u4e0b\u555f\u7528,\u6703\u540c\u6b65\u8a72domain\u7684switch\u800c\u555f\u7528<\/p>\n\n\n\n<p id=\"lrte22\">\u8abf\u6574pruning<br>(config)# interface type mod\/num<br><strong>(config-if)# switchport trunk pruning vlan &lt;&lt; &lt; add | except | remove&gt;vlan-list&gt; | none&gt;<\/strong><br>vlan-list\u53ef\u8a2d\u7bc4\u570d\u70ba2-1001<\/p>\n\n\n\n<p id=\"lrte22\">ps:<br>2950(vlan)#vtp ?<br>client&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the device to client mode.<br>transparent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the device to transparent mode.<br>server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the device to server mode.<br>domain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the name of the VTP administrative domain.<br>password&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the password for the VTP administrative domain.<\/p>\n\n\n\n<p id=\"lrte24\">2950(config)#vtp ?<br>version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the adminstrative domain to VTP version<br>password&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the password for the VTP administrative domain.<br>mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure VTP device mode<br>domain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the name of the VTP administrative domain.<\/p>\n\n\n\n<p id=\"gms4\">ps:<br>1900(config)#vtp ?<br>transparent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VTP transparent<br>client&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VTP client<br>server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VTP server<br>trap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VTP trap<br>pruning&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VTP pruning&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>password&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set VTP password<br>domain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set VTP domain name<br>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/p>\n\n\n\n<p id=\"hgg4\">\u986f\u793avtp\u72c0\u614b<br><strong>#show vtp status<\/strong><br>\u756b\u9762\u5927\u81f4\u5982\u4e0b\uff1a<br>VTP Version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 2<br>Configuration Revision&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 2&nbsp;&nbsp;<br>Maximum VLANs supported locally : 64\u3000\u3000\/\/\u6700\u5927vlan\u6578\u91cf<br>Number of existing VLANs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 5<br>VTP Operating Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/\u9810\u8a2dvtp mode\u662fserver<br>VTP Domain Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : bigdomain&nbsp;&nbsp; \/\/\u9810\u8a2ddomain\u53ebbigdomain<br>VTP Pruning Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Disabled<br>VTP V2 Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Disabled &nbsp; &nbsp; &nbsp;<br>VTP Traps Generation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Disabled<br>MD5 digest&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0xEE 0xB3 0xDC 0x9F 0xE2 0xE0 0x25 0xDF<br>Configuration last modified by 0.0.0.0 at 3-1-93 04:55:57&nbsp;&nbsp; \/\/\u6bcf5\u5206\u9418\u5ee3\u64ad\u4e00\u6b21<br>Local updater ID is 0.0.0.0 (no valid interface found)<br>ps:1900\u70bashow vtp [statistics]<\/p>\n\n\n\n<p id=\"dbxt0\">&nbsp;<\/p>\n\n\n\n<p id=\"dbxt4\">show vtp counters<br><strong># show vtp counters<\/strong><br>Reveals VTP Message and Error Counters<br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>VTP statistics:<br>Summary advertisements received : 1<br>Subset advertisements received : 2<br>Request advertisements received : 1<br>Summary advertisements transmitted : 1630<br>Subset advertisements transmitted : 0<br>Request advertisements transmitted : 4<br>Number of config revision errors : 0<br>Number of config digest errors : 0<br>Number of V1 summary errors : 0<br>VTP pruning statistics:<br>Trunk, Join Transmitted, Join Received,Summary advts received from&nbsp;non-pruning-capable device<br>&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br>Gi0\/1,82352, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;82931, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0<\/p>\n\n\n\n<p id=\"dbxt4\">&nbsp;<\/p>\n\n\n\n<p id=\"dbxt4\">Displays VTP pruning state<br><strong>#show interface &lt; interface&gt; pruning&nbsp;<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>VTP(VLAN&nbsp;Trunking&nbsp;Pr &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[34],"tags":[],"class_list":["post-952","post","type-post","status-publish","format-standard","hentry","category-cisco-layer2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/comments?post=952"}],"version-history":[{"count":0,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/952\/revisions"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}