VTP实验报告
版权声明:原创作品,如需转载,请与作者联系。否则将追究法律责任。 |
1.1 实验任务
在Catalyst 2950交换机上配置VTP
1.2 实验环境和网络拓扑
![]() 1.3 完成标准
(1) 按照拓扑图要求连接交换机,在VTP服务器上配置VLAN,配置为VTP客户机的交换机能够学习到VLAN信息,不能添加、删除和修改VLAN。
(2) 配置为透明模式的交换机可以自己添加、删除和修改VLAN,但是不学习VLAN信息。
2.详细操作步骤
Step 1: 配置交换机的VTP
(1) 配置交换机的A、B和C的VTP域为Benet
交换机A配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname A //配置交换机名为A
*Mar 1 00:00:44.671: %SYS-5-CONFIG_I: Configured from console by console
A(config)#interface f0/0 //配置端口0为中继端口连接交换机B
A(config-if)#switchport mode trunk
*Mar 1 00:21:45.123: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk
A(config-if)#exit
A(config)#exit
A#vlan database
A(vlan)#vtp domain benet //配置VTP域为benet
Changing VTP domain name from NULL to benet
交换机B配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname B
*Mar 1 00:00:44.671: %SYS-5-CONFIG_I: Configured from console by console
B(config)#interface f0/0 //配置端口0为中继端口连接交换机A
B(config-if)#switchport mode trunk
*Mar 1 00:18:28.991: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk
B(config)#interface f0/1 //配置端口1为中继端口连接交换机C
B(config-if)#switchport mode trunk
*Mar 1 00:18:38.791: %DTP-5-TRUNKPORTON: Port Fa0/1 has become dot1q trunk
B(config-if)#exit
A(config)#exit
B#vlan database
B(vlan)#vtp domain benet //配置VTP域为benet
Changing VTP domain name from NULL to benet
交换机C配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname C
*Mar 1 00:01:12.647: %SYS-5-CONFIG_I: Configured from console by cosole
C(config)#interface f0/0 //配置端口0为中继端口连接交换机
C(config-if)#switchport mode trunk
*Mar 1 00:16:39.635: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk
C(config-if)#exit
A(config)#exit
C#vlan
C#vlan database
C(vlan)#vtp domain benet //配置VTP域为benet
Changing VTP domain name from NULL to benet
(2) 配置交换机A、B和C的VTP工作模式分别为Server、Transparent和Client
交换机A配置如下:
A(vlan)#vtp server //配置交换机A的VTP工作模式为Server
Device mode already VTP SERVER.
A(vlan)#exit
APPLY completed.
Exiting....
A#show vtp status
VTP Version : 2
Configuration Revision : 0 //配置修改编号从0开始
Maximum VLANs supported locally : 256
Number of existing VLANs : 5
VTP Operating Mode : Server
VTP Domain Name : benet
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x36 0xC7 0xEE 0x81 0xF1 0x23 0x
Configuration last modified by
Local updater ID is
交换机B配置如下:
B(vlan)#vtp transparent //配置交换机B的VTP工作模式为Transparent
Setting device to VTP TRANSPARENT mode.
B(vlan)#exit
APPLY completed.
Exiting....
B#show vtp status
VTP Version : 2
Configuration Revision : 0 //配置修改编号从0开始
Maximum VLANs supported locally : 256
Number of existing VLANs : 5
VTP Operating Mode : Transparent
VTP Domain Name : benet
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x36 0xC7 0xEE 0x81 0xF1 0x23 0x
Configuration last modified by
交换机C配置如下:
C(vlan)#vtp client //配置交换机C的VTP工作模式为Client
Setting device to VTP CLIENT mode.
C(vlan)#exit
In CLIENT state, no apply attempted.
Exiting....
C#show vtp status
VTP Version : 2
Configuration Revision : 0 //配置修改编号从0开始
Maximum VLANs supported locally : 256
Number of existing VLANs : 5
VTP Operating Mode : Client
VTP Domain Name : benet
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x36 0xC7 0xEE 0x81 0xF1 0x23 0x
Configuration last modified by
Step 2: 配置交换机的VLAN,并验证VTP各模式的特点
(1) 在交换机A上配置VLAN2和VLAN3
交换机A配置如下:
A#vlan database
A(vlan)#vlan 2 name VLAN2 //配置VLAN2和VLAN3
VLAN 2 added:
Name: VLAN2
A(vlan)#vlan 3 name VLAN3
VLAN 3 added:
Name: VLAN3
A(vlan)#exit
APPLY completed.
Exiting....
A#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/1, 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 VLAN2 active
3 VLAN3 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
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
交换机B配置如下:
B#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/1, 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
Fa1/0, Fa1/1, 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
//因为交换机B的VTP模式为Transparent,在此不同步Server上的VLAN配置
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
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
交换机C配置如下:
C#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, 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 VLAN2 active
3 VLAN3 active
//因为交换机C的VTP模式为Client,在此同步Server上的VLAN配置
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
1002 fddi 101002 1500 - 0 - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
(2) 在交换机B上配置VLAN4和VLAN5
B#vlan database
B(vlan)#vlan 4 name VLAN4 //配置VLAN4和VLAN5
VLAN 4 added:
Name: VLAN4
B(vlan)#vlan 5 name VLAN5
VLAN 5 added:
Name: VLAN5
B(vlan)#exit
APPLY completed.
Exiting....
B#show vlan-s
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active 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, Fa1/0, Fa1/1
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
4 VLAN4 active
5 VLAN5 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
4 enet 100004 1500 - - - - - 0 0
5 enet 100005 1500 - - - - - 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
交换机A配置如下:
A#show vlan-s
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, 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 VLAN2 active
3 VLAN3 active
//因为交换机B的VTP模式为Transparent,在此不同步Server上的VLAN配置
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
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
交换机C配置如下:
C#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, 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 VLAN2 active
3 VLAN3 active
//因为交换机B的VTP模式为Transparent,在此不同步Server上的VLAN配置
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
1002 fddi 101002 1500 - 0 - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1&n |


