实验题目 |
在cisco交换机上实现vtp配置
|
实验应用
场景描述
|
某园区网络共包括三幢建筑物,每幢19层,共有接入层交换机2*19*3=114台
(catalyst 2950 48口),汇聚层交换机3台(catalyst 4506) ,核心层交换机1台
(catalyst 6509),
为了减少
vlan
配置的工作量,提高效率,使用vtp对vlan进行管理
|
实验使用
到的相关
命令总结
|
1.
设置VTP域名:VTP domain domain-name
2.
设置VTP模式:VTP mode server/transparent/client
3.
设置VTP密码:VTP password password
4.
设置VTP版本:VTP version 2
5.
设置VTP修剪:VTP pruning
6.
查看VTP配置信息: show vtp status
|
实验步骤
|
1.1
:操作命令及命令解释
(1).
配置交换机A.B.C的VTP域名为benet
命令是:Vtp domain benet
(2).
配置交换机A.B.C的模式分别为:server.transparent.client
命令是:VTP mode server/transparent/client
1.1
:验证结果
SwA#sh vtp status
VTP Version : 2
Configuration Revision : 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 0
Configuration last modified by 0.0.0 .0 at 0-0-00 00:00:
Local updater ID is 0.0.0 .0 (no valid interface found)
swB#sh vtp status
VTP Version : 2
Configuration Revision : 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 1A 0x21
Configuration last modified by 0.0.0 .0 at 0-0-00 00:00:00
swc#sh vtp s
VTP Version : 2
Configuration Revision : 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 1A 0x21
Configuration last modified by 0.0.0 .0 at 0-0-00 00:00:00
|
2.1
:操作命令及命令解释
(1).
在交换机A上配置VLAN 2和VLAN 3查看A.B.C的VLAN信息
用命令:vlan data
Vlan 2
Valn 3
Exit
验证结果:
swA#sh vlan b
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 VLAN0002 active
3 VLAN0003 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
swB#sh vlan b
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
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
swc#sh vlan b
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
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并没有学到VLAN的信息,分析原因�D�D没有启用中继,因为VTP消息只能通过中继端口传递。
解决方案:配置交换机上相应端口为trunk
用命令:Int f0/23
Swit mode trunk
2.2
:验证结果
swc#sh vlan b
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 VLAN0002 active
3 VLAN0003 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 - 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
交换机C已经学习到到了VLAN信息。
2.2
在交换机B上配置vlan 4和 valn 5,查看交换机A .C上的VLAN信息
配置命令为:vlan da
Vlan 4
Vlan 5
Exit
验证结果:A.C上的VLAN信息无变化,因为B的模式为透明,在其上面修改.添加VLAN信息只对自身有效,不会转发到A.C上
swb#sh vlan b
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
4 VLAN0004 active
5 VLAN0005 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
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
|
|
3.1
:操作命令及命令解释
配置交换机A的VTP口令,添加VLAN 6,查看交换机A的VTP状态信息,修改编号是否增加,查看B.C上的VTP信息,配置编号是否增加。
用到的命令:vtp password benet
swa#sh vlan b
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 VLAN0002 active
3 VLAN0003 active
6 VLAN0006 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
6 enet 100006 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
验证结果
swa#sh 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
MD5 digest : 0x13 0x42 0x0D 0xB5 0x86 0xCC 0xDF 0x48
Configuration last modified by 0.0.0 .0 at 3-1-02 17:35:57
Local updater ID is 0.0.0 .0 (no valid interface found)
swb#sh 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 : 0x 3C 0xE4 0x 7C 0xCB 0x26 0x2B 0x18 0xF9
Configuration last modified by 0.0.0 .0 at 3-1-02 17:18:41
swc#sh vtp s
VTP Version : 2
Configuration Revision : 1
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 : 0xBD 0x07 0x89 0x65 0x99 0xEE 0xD2 0x16
Configuration last modified by 0.0.0 .0 at 3-1-02 03:09:34
B.C
都没有学到,自然修改编号也就没有变化了。因为没有配置密码。
3.2
配置交换机B.C的VTP口令,查看VTP状态信息,查看B.C的VTP状态信息,编制修改编号是否增加。查看C的VLAN信息,是否学到了VLAN 6
用到的命令:vtp password benet
swb#sh 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 : 0xC5 0x5B 0x95 0x7B 0x 2A 0x23 0x53 0xC8
Configuration last modified by 0.0.0 .0 at 3-1-02 17:18:41
swc#sh vtp s
VTP Version : 2
Configuration Revision : 2
(已经学习)
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 : 0x13 0x42 0x0D 0xB5 0x86 0xCC 0xDF 0x48
Configuration last modified by 0.0.0 .0 at 3-1-02 17:35:57
swc#sh vlan b
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 VLAN0002 active
3 VLAN0003 active
6 VLAN0006 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
6 enet 100006 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
可以发现配置了密码后,交换机C学习到了VLAN信息。
3.3
配置VTP修剪,在交换机A.B.C上配置配置修剪,查看交换机是否已经启用修剪
用到的命令:vtp pruning
验证结果:
swa#sh 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 V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x38 0xFF 0x 1C 0xA3 0x19 0x 5F 0x07 0x 5A
Configuration last modified by 0.0.0 .0 at 3-1-02 18:38:09
Local updater ID is 0.0.0 .0 (no valid interface found)
swb#sh 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 V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xC5 0x5B 0x95 0x7B 0x 2A 0x23 0x53 0xC8
Configuration last modified by 0.0.0 .0 at 3-1-02 18:37:20
swc#sh vtp s
VTP Version : 2
Configuration Revision : 3
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Client
VTP Domain Name : benet
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x38 0xFF 0x 1C 0xA3 0x19 0x 5F 0x07 0x 5A
Configuration last modified by 0.0.0 .0 at 3-1-02 18:38:09
|
|
实验中遇到的问题及相应解决方法
|
刚开始的时候,没有配置中继电路,所以没有学习,解决方法,在相应的端口上配置中继端口。
总结:1.VTP通告,在中继链路上传送。
2.
客户模式只可以学习,不可创建.添加,删除VLAN信息。
3.
同一VTP域内的交换机,口令配置要一致
4.VTP
通过VLAN 1只传送VLAN信息,不传送端口信息。
5.
默认情况下,交换机是服务器模式,其默认版本为1
6.若客户机的修订号大于服务器的修订号,客户机会把vtp信息转发,替换服务器的VLAN信息,所以把一个交换机加入到网络时,一定要把它的修订号归0,方法有
两种:
(1)将交换机的VTP模式更改为透明模式在更改回原来模式。 (2)将交换机VTP的域名更改一次,在更改回原来的域名
汇总通告每5分钟发送一次,所以有时为了节省时间也可以采用上述任一个方法》
以上就是我的一些体会,希望能给大家一些帮助。
|
本文出自 “腹有诗书气自华” 博客,谢绝转载!