VTP(虛擬局域網(wǎng)中繼協(xié)議):是思科的私有協(xié)議,通過VTP協(xié)議,可以實(shí)現(xiàn)交換機(jī)之間互相傳遞消息,從而實(shí)現(xiàn)VLAN的同步和統(tǒng)一管理。
成都創(chuàng)新互聯(lián)于2013年開始,先為寶豐等服務(wù)建站,寶豐等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為寶豐企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。
VTP示例:
R3:
R3(config)#int f1/1 #trunk模式
R3(config-if)#switchport mode trunk
R3(config)#vtp domain cisco #所有啟用VTP的交換機(jī)域名一致
R3(config)#vtp password cisco #VTP密碼一致
R3(config)#vtp mode server #VTP域至少有一臺處于服務(wù)器模式,以便于
R3(config)#vtp pruning 創(chuàng)建、修改、刪除VLAN
Pruning switched on
R3(config)#vlan 10 #新建VLAN
R3(config-vlan)#name vlan10
R3(config-vlan)#vlan 20
R3(config-vlan)#name vlan20
R3(config)#int vlan 1 #管理IP
R3(config-if)#ip add 172.16.1.1 255.255.255.0
R3(config-if)#no sh
R3#sh vlan-switch #查看VLAN
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/2, Fa1/3, Fa1/4
Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/11, Fa1/12
Fa1/13, Fa1/14, Fa1/15
10 vlan10 active
20 vlan20 active
R3#show vtp status #查看VTP狀態(tài)信息
VTP Version : 2
Configuration Revision : 3
Maximum VLANs supported locally : 36
Number of existing VLANs : 7
VTP Operating Mode : Server
VTP Domain Name : cisco
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x0A 0x68 0x1E 0xCC 0xFC 0xF2 0x7E 0x6F
Configuration last modified by 0.0.0.0 at 3-1-02 00:21:50
Local updater ID is 172.16.1.1 on interface Vl1 (lowest numbered VLAN interface found)
R4、R5配置:
R4(config)#int f1/1
R4(config-if)#switchport mode trunk
R4(config)#int f1/2
R4(config-if)#sw mo trunk
R4(config)#vtp domain cisco
R4(config)#vtp password cisco
R4(config)#vtp mode client
查看R4、R5是否同步VLAN:
R4#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/3, Fa1/4, Fa1/5
Fa1/6, Fa1/7, Fa1/8, Fa1/9
Fa1/10, Fa1/11, Fa1/12, Fa1/13
Fa1/14, Fa1/15
10 vlan10 active
20 vlan20 active
R5#show vlan-swi
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/1, Fa1/3, Fa1/4
Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/11, Fa1/12
Fa1/13, Fa1/14, Fa1/15
10 vlan10 active
20 vlan20 active
查看VTP狀態(tài):
R4#sh vtp status
VTP Version : 2
Configuration Revision : 3
Maximum VLANs supported locally : 36
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : cisco
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x0A 0x68 0x1E 0xCC 0xFC 0xF2 0x7E 0x6F
Configuration last modified by 0.0.0.0 at 3-1-02 00:21:50