1. 程式人生 > >cisco之VTP

cisco之VTP

cisco vtp

VTP(虛擬局域網中繼協議):是思科的私有協議,通過VTP協議,可以實現交換機之間互相傳遞消息,從而實現VLAN的同步和統一管理。

VTP示例:

技術分享

R3:

R3(config)#int f1/1 #trunk模式

R3(config-if)#switchport mode trunk


R3(config)#vtp domain cisco #所有啟用VTP的交換機域名一致

R3(config)#vtp password cisco #VTP密碼一致


R3(config)#vtp mode server #VTP域至少有一臺處於服務器模式,以便於

R3(config)#vtp pruning 創建、修改、刪除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狀態信息

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狀態:

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


本文出自 “一萬年太久,只爭朝夕” 博客,請務必保留此出處http://zengwj1949.blog.51cto.com/10747365/1922243

cisco之VTP