
1.VTP mode
Transparent模式的VTP 配置修訂號(hào)始終為0
2.VTP的運(yùn)作
3.VTP的配置Switch(config)# vtp domain cisco配置VTP域名
Switch(config)# vtp mode {server | client | transparent}配置本機(jī)VTP模式
Switch(config)# vtp password x(可選)配置密碼
Switch# show vtp password
4.VTP的幾個(gè)問(wèn)題
如果VTPclient的配置修訂號(hào)比Server的高,那么client也是能夠?qū)erver的vlan信息覆蓋掉的。
上圖中,server及client的配置修訂號(hào)相同,但是vlan信息則不同,這時(shí)候就會(huì)報(bào)錯(cuò),提示md5 digestchecksum mismatch
5.VTP pruning1)測(cè)試目的:VLAN信息傳遞
SW1及SW2配置為VTP mode client;SW3配置為VTP mode Server在SW3上創(chuàng)建10、20、30三個(gè)VLANSW1及SW2都能學(xué)習(xí)到,三歲小孩都能做,就不多說(shuō)了SW3#sh vtp statusVTP Version capable : 1 to 3VTP version running : 1VTP Domain Name :ccnpVTP Pruning Mode : Disabled !! 默認(rèn)VTP prunnig是關(guān)閉的VTP Traps Generation : DisabledDevice ID :000a.8a07.8280Configuration last modified by 0.0.0.0 at 3-5-9300:11:48Local updater ID is 0.0.0.0 (no valid interface found)
Feature VLAN:--------------VTP Operating Mode :ServerMaximum VLANs supported locally :1005Number of existing VLANs : 8Configuration Revision : 15MD5 digest : 0x49 0x3C 0x1F 0x79 0x15 0x00 0xC70xAE 0x0E 0xDC0xDD 0xEF 0x93 0xA5 0xB6 0x26
2)測(cè)試目的:trunk allowed vlan
繼續(xù)吧,將SW1及SW2的連接PC的接口劃入vlan10完成后兩個(gè)PC就能夠互相通信了。這時(shí)候我們?cè)赟W1上看一下trunk的狀態(tài):SW1#sh int trunkPort Mode Encapsulation Status Native vlanFa0/20 on 802.1q trunking 1
Port Vlans allowed on trunkFa0/20 1-4094
Port Vlans allowed and active in managementdomainFa0/20 1,10,20,30
Port Vlans in spanning tree forwarding state and notprunedFa0/20 1,10,20,30 !!在關(guān)閉VTPprunnig的情況下,trunk默認(rèn)放行所有VLAN的流量,這在SW2及SW3上情況一樣
接下去我們?cè)赟W1的Fa0/20接口上,做switchport trunk allowed vlan remove10,將vlan10的流量修剪掉,這時(shí)候PC之間就無(wú)法ping通了,再去R1上看一下:SW1#sh int trunkPort Mode Encapsulation Status Native vlanFa0/20 on 802.1q trunking 1
Port Vlans allowed on trunkFa0/20 1-9,11-4094
Port Vlans allowed and active in managementdomainFa0/20 1,20,30
Port Vlans in spanning tree forwarding state and notprunedFa0/20 1,20,30
注意,此時(shí)此刻雖然SW1在fa0/20口上將vlan10的流量修剪了,但是SW3的fa0/20口確實(shí)依然放行該流量的,不過(guò)不管怎樣,PC之間是無(wú)法互訪了,這里只是做個(gè)演示,知道一下allowedvlan的作用。當(dāng)然,這是手工修剪的方式。
3)測(cè)試目的:VTP pruning
去掉步驟2中配置在SW1上的命令,還原實(shí)驗(yàn)環(huán)境。接下去我們?cè)赟W3,也就是VTP的server上開(kāi)啟vtp pruning。SW3#sh vtp stVTP Version capable : 1 to 3VTP version running : 1VTP Domain Name :ccnpVTP Pruning Mode : EnabledVTP Traps Generation : DisabledDevice ID :000a.8a07.8280Configuration last modified by 0.0.0.0 at 3-5-9302:01:49Local updater ID is 0.0.0.0 (no valid interface found)
Feature VLAN:--------------VTP Operating Mode :ServerMaximum VLANs supported locally :1005Number of existing VLANs : 8Configuration Revision : 17MD5 digest : 0x73 0x52 0x60 0xE7 0x4D 0xA5 0xC70x4F 0xCA 0x3D0x6F 0x1D 0x3F 0x23 0x03 0xBB
在VTP server mode的SW3上開(kāi)啟VTP pruning后,Client的SW1及SW2都會(huì)學(xué)習(xí)到并且也開(kāi)啟自己的VTP pruning。如此一來(lái),三臺(tái)交換機(jī)都會(huì)進(jìn)行VTP報(bào)文的交互,告知自己本地存在接入用戶的VLAN。對(duì)于沒(méi)有用戶的VLAN,將會(huì)被自動(dòng)修剪掉,我們看一下:SW1#show int trunkPort Mode Encapsulation Status Native vlanFa0/20 on 802.1q trunking 1
Port Vlans allowed on trunkFa0/20 1-4094
Port Vlans allowed and active in managementdomainFa0/20 1,10,20,30
Port Vlans in spanning tree forwarding state and notprunedFa0/20 1,10 !!在R1上,F(xiàn)a0/20口修剪得只剩下了vlan 1和10SW2、SW3也是類似的情況;注意,此刻我們是沒(méi)有在trunk口上做任何靜態(tài)配置的allowed vlan配置
接下去,我們?cè)赟W2上,將vlan10的端口移除,可直接在fa0/2上no switchport accessvlan如此一來(lái)SW2上就沒(méi)有vlan10的用戶了,sw2會(huì)泛洪這一消息以便其他交換機(jī)知道。SW3收到這一消息后,知道SW2不再有vlan10的用戶,也就不再需要vlan10的流量了,于是在自己的FA0/22口上將vlan10修剪掉:SW3#sh int truPort Mode Encapsulation Status Native vlanFa0/20 on 802.1q trunking 1Fa0/22 desirable n-isl trunking 1
Port Vlans allowed on trunkFa0/20 1-4094Fa0/22 1-4094
Port Vlans allowed and active in managementdomainFa0/20 1,10,20,30Fa0/22 1,10,20,30
Port Vlans in spanning tree forwarding state and notprunedFa0/20 1,10Fa0/22 1 !! vlan10被修剪
最后注意:• Vtp pruning只能在server mode上開(kāi)啟• Server mode上開(kāi)啟后,client都會(huì)自動(dòng)開(kāi)啟pruning• Vtp pruning默認(rèn)是關(guān)閉的
紅茶三杯網(wǎng)絡(luò)工程 | 項(xiàng)目管理 | IT服務(wù)管理 | CCIE培訓(xùn)學(xué)習(xí) 沉淀 成長(zhǎng) 分享微博:http://weibo.com/vinsoney博客:http://blog.sina.com.cn/vinsoney站點(diǎn):http://ccietea.com
愛(ài)華網(wǎng)本文地址 » http://www.klfzs.com/a/25101017/362255.html
愛(ài)華網(wǎng)



