您的位置:首页 > 编程语言 > PHP开发

VTP实验报告

2007-12-10 17:17 141 查看
1.1 [/b]实验任务[/b][/b]
在Catalyst 2950交换机上配置VTP

1.2 [/b]实验环境和网络拓扑[/b][/b]





1.3 [/b]完成标准[/b][/b]
(1) 按照拓扑图要求连接交换机,在VTP服务器上配置VLAN,配置为VTP客户机的交换机能够学习到VLAN信息,不能添加、删除和修改VLAN。
(2) 配置为透明模式的交换机可以自己添加、删除和修改VLAN,但是不学习VLAN信息。

2[/b].详细操作步骤[/b][/b]

Step 1: [/b]配置交换机的[/b]VTP[/b]
(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 0x1A 0x21
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 0.0.0.0 (no valid interface found)

交换机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 0x1A 0x21
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

交换机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 0x1A 0x21
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

Step 2: [/b]配置交换机的[/b]VLAN[/b],并验证[/b]VTP[/b]各模式的特点[/b][/b]
(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 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0

Step 3: [/b]配置交换机的[/b]VTP[/b]口令[/b][/b]
(1) 配置交换机A的VTP口令,添加VLAN6

交换机A配置如下:
A#vlan d
A(vlan)#vtp password cisco //配置VTP口令为cisco
Setting device VLAN database password to cisco.
A(vlan)#vlan 6 name VLAN6 //添加VLAN6
VLAN 6 added:
Name: VLAN6
A(vlan)#exit
APPLY completed.
Exiting....
A#
A#show vtp s
VTP Version : 2
Configuration Revision : 2 //以上操作导致配置修改编号增加
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Server
VTP Domain Name : benet
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
A con0 is now available : 0x54 0xA2 0xFA 0x30 0x7D 0x9D 0x3C 0xC7
Configuration last modified by 0.0.0.0 at 3-1-02 00:09:07
Local updater ID is 0.0.0.0 (no valid interface found)

交换机B配置如下:
B#show vtp s
VTP Version : 2
Configuration Revision : 0 //交换机B为Transparent工作模式,不同步VTP中VLAN信息,配置修改编号无变化
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Transparent
VTP Domain Name : benet
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xA2 0xD1 0x76 0x41 0x79 0xF4 0x7F 0x4D
Configuration last modified by 0.0.0.0 at 3-1-02 00:07:14

交换机C配置如下:
C#show vtp s
VTP Version : 2
Configuration Revision : 1 //同步Server的VLAN2、VLAN3,配置修改该编号增加,但没有设置VTP口令,针对Server后两次动作没有同步,配置修改编号没有增加
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : benet
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xC0 0xD6 0xEA 0xAC 0x21 0x06 0x71 0x4B
Configuration last modified by 0.0.0.0 at 3-1-02 00:03:55

(2) 配置交换机B和C的VTP命令

交换机A配置如下:
B#vlan d
B(vlan)#vtp password cisco //配置VTP口令为cisco
Setting device VLAN database password to cisco.
B(vlan)#exit
APPLY completed.
Exiting....
B#show vtp s
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Transparent
VTP Domain Name : benet
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xE7 0x04 0xDD 0xBA 0x5D 0x21 0x32 0x19
Configuration last modified by 0.0.0.0 at 3-1-02 00:12:24

交换机C配置如下:
C#vlan d
C(vlan)#vtp password cisco //配置VTP口令为cisco
Setting device VLAN database password to cisco.
C(vlan)#exit
In CLIENT state, no apply attempted.
Exiting....
C#show vtp s
VTP Version : 2
Configuration Revision : 2 //修改口令后同步Server的VLAN信息导致配置修改编号增加
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Client
VTP Domain Name : benet
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x54 0xA2 0xFA 0x30 0x7D 0x9D 0x3C 0xC7
Configuration last modified by 0.0.0.0 at 3-1-02 00:09:07
C#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
6 VLAN6 active //与Server同步VLAN6
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
6 enet 100006 1500 - - - - - 0 0
1002 fddi 101002 1500 - 0 - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0

Step 4: [/b]配置[/b]VTP[/b]修剪[/b][/b]
在交换机A、B和C上配置VTP修剪

交换机A配置如下:
A#vlan d
A(vlan)#vtp pruning //配置VTP修剪
Pruning switched ON
A(vlan)#exit
APPLY completed.
Exiting....
A#show vtp s
VTP Version : 2
Configuration Revision : 3 //以上操作导致配置修改标号增加
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Server
VTP Domain Name : benet
VTP Pruning Mode : Enabled //VTP剪切状态开启
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x5B 0xA1 0xB8 0x83 0x26 0xF0 0x94 0xB8
Configuration last modified by 0.0.0.0 at 3-1-02 00:12:48
Local updater ID is 0.0.0.0 (no valid interface found)

交换机B配置如下:
B#vlan d
B(vlan)#vtp pruning //配置VTP修剪
Pruning switched ON
B(vlan)#exit
APPLY completed.
Exiting....
B#show vtp s
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Transparent
VTP Domain Name : benet
VTP Pruning Mode : Enabled //VTP剪切状态开启
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xE7 0x04 0xDD 0xBA 0x5D 0x21 0x32 0x19
Configuration last modified by 0.0.0.0 at 3-1-02 00:12:24

交换机C配置如下:
C(vlan)#vtp pruning //配置VTP修剪
Pruning already switched on.
C(vlan)#exit
In CLIENT state, no apply attempted.
Exiting....
C#show vtp s
VTP Version : 2
Configuration Revision : 3 //同步Server导致配置修改编号增加
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Client
VTP Domain Name : benet
VTP Pruning Mode : Enabled //VTP剪切状态开启
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x5B 0xA1 0xB8 0x83 0x26 0xF0 0x94 0xB8
Configuration last modified by 0.0.0.0 at 3-1-02 00:12:48

3[/b].实验总结[/b][/b]

通过使用VTP协议,交换机之间能够互相传递VLAN信息,实现了VLAN的统一配置和统一管理。此实验简单描述了VTP的配置过程,配置要点为:

l 交换机的VTP工作模式:Server、Client和Transparent。Server模式下交换机可控制它所在域中Vlan的生成和修改;Client模式下交换机不允许管理员创建、修改或删除;Transparent模式下交换机不参与VTP,只转发VTP通告消息,但它可以创建和删除本地Vlan。
l 每个VTP设备会纪录自己的VTP配置修改编号;VTP通告会包含发送者的VTP配置修改编号,这一信息用于确认接受到的信息是否比当前的信息更新。每个VTP通告从配置版本号0开始。每当发生变化时,配置版本编号加1。
l 在交换机上配置VTP口令,用于保证网络内交换机VLAN配置的安全性。同一VTP域内的交换机,口令配置要一致。
l VTP通过修剪来减少没有必要扩散的通信量,提高中继链路的带宽利用率。
本文出自 “゛﹊天命嘻哈” 博客,转载请与作者联系!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: