实验来源:工大瑞普Cisco网络技术论坛
Sw 1:vtp server
Sw 2:vtp client
Sw 3:vtp client
主要配置:
Sw 1:配置Sw 1为 vtp server
验证:在Sw 2 and Sw 3上使用命令show vlan-switch验证是否同步到Sw 1设置的vlan信息
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
Sw 1:vtp server
Sw 2:vtp client
Sw 3:vtp client
主要配置:
Sw 1:配置Sw 1为 vtp server
switch1#vlan database //进入vlan数据库配置模式
switch1(vlan)#vtp server //配置为vtp server模式
Device mode already VTP SERVER.
switch1(vlan)#vtp domain cisco //设置vtp域为cisco
Changing VTP domain name from NULL to cisco
switch1(vlan)#exit
Sw 2 and Sw 3:配置Sw 2 and Sw 3为vtp client
switch1(vlan)#vtp server //配置为vtp server模式
Device mode already VTP SERVER.
switch1(vlan)#vtp domain cisco //设置vtp域为cisco
Changing VTP domain name from NULL to cisco
switch1(vlan)#exit
switch(vlan)#vtp client //配置为vtp client模式
Setting device to VTP CLIENT mode.
switch(vlan)#vtp domain cisco
Changing VTP domain name from NULL to cisco
switch(vlan)#exit
Setting device to VTP CLIENT mode.
switch(vlan)#vtp domain cisco
Changing VTP domain name from NULL to cisco
switch(vlan)#exit
switch#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15
2 VLAN0002 active //同步到Sw 1上设置的vlan信息
3 VLAN0003 active
4 VLAN0004 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
1002 fddi 101002 1500 - 0 - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
在Sw 2 and Sw 3上使用命令show vtp status查看Sw 2 and Sw 3的vtp模式:
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15
2 VLAN0002 active //同步到Sw 1上设置的vlan信息
3 VLAN0003 active
4 VLAN0004 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
1002 fddi 101002 1500 - 0 - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
switch#show vtp status
*Mar 1 00:06:07.139: %SYS-5-CONFIG_I: Configured from console by console
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Client
VTP Domain Name : cisco
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xC8 0x45 0x4A 0xAB 0xE4 0xB4 0x5A 0x5E
Configuration last modified by 0.0.0.0 at 3-1-02 00:02:43
*Mar 1 00:06:07.139: %SYS-5-CONFIG_I: Configured from console by console
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Client
VTP Domain Name : cisco
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xC8 0x45 0x4A 0xAB 0xE4 0xB4 0x5A 0x5E
Configuration last modified by 0.0.0.0 at 3-1-02 00:02:43
OK,试验完!
本文转自loveme2351CTO博客,原文链接:http://blog.51cto.com/loveme23/29098 ,如需转载请自行联系原作者