实验目的:
熟悉VTP配置的基本流程,以及VTP 协议的工作原理,VTP就是把几台交换机可以互通VLAN的一种工具协议。
实验设备:
2台1912交换机.
实验拓扑:
实验内容:
定义1912-1为SERVER模式:
switch1912-1#config t
switch1912-1(config)#vtp domain xxx
配置1912-1交换机为SERVER模式
switch1912-1(config)#vtp server
查看vtp信息
switch1912-2#show vtp
VTP version: 1
Configuration revision: 10
Maximum VLANs supported locally: 1005
Number of existing VLANs: 15
VTP domain name : xxx
VTP password :
VTP operating mode : Client
VTP pruning mode : Disabled
VTP traps generation : Enabled
Configuration last modified by: 192.168.1.100 at 00-00-0000 00:00:00
定义1912-2为CLIENT模式:
switch1912-2#config t
switch1912-2(config)#vtp domain xxx
配置1912交换机为Client模式
switch1912(config)#vtp client
查看vtp信息
switch1912-2#show vtp
VTP version: 1
Configuration revision: 10
Maximum VLANs supported locally: 1005
Number of existing VLANs: 15
VTP domain name : xxx
VTP password :
VTP operating mode : Client
VTP pruning mode : Disabled
VTP traps generation : Enabled
Configuration last modified by: 192.168.1.100 at 00-00-0000 00:00:00
如果交换机类型是2900系列的话则:
Switch2924#vlan database
Switch2924(vlan)#vtp server
定义vtp域名称,如果交换机想加入域中则域名必须相同。并且该操作必须在Server模式下操作。
Switch2924(vlan)#vtp domain xxx
Changing VTP domain name from NULL to xxx
Switch2924(vlan)#exit
APPLY completed.
Exiting....
Switch2924#
查看vtp信息:
switch2924#show vtp status
VTP Version : 2
Configuration Revision : 10
Maximum VLANs supported locally : 68
Number of existing VLANs : 15
VTP Operating Mode : Server
VTP Domain Name : xxx
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x20 0x85 0xA6 0x88 0x22 0x02 0x3F 0x58
Configuration last modified by 192.168.1.100 at 0-0-00 00:00:00
配置TRUNK链路。
1912-1上:
switch1912(config)#int f0/26
switch1912(config-if)#duplex full
switch1912(config-if)#trunk on
查看Trunk 状态:
switch1912#show trunk a
DISL state: On, Trunking: On, Encapsulation type: ISL
1912-2上:
switch1912-2(config)#int f0/26
switch1912-2(config-if)#duplex full
switch1912-2(config-if)#trunk on
查看Trunk 状态:
switch1912-2#show trunk a
DISL state: On, Trunking: On, Encapsulation type: ISL
在1912-1上配置VLAN。
switch1912-1(config)#vlan 10 name AAA
switch1912-1 (config)#vlan 20 name BBB
switch1912-1 (config)#vlan 30 name CCC
switch1912-1 (config)#vlan 40 name DDD
switch1912-1 (config)#vlan 50 name EEE
switch1912-1 (config)#vlan 60 name FFF
switch1912-1 (config)#vlan 70 name GGG
switch1912-1 (config)#vlan 80 name HHH
switch1912-1 (config)#vlan 90 name III
switch1912-1(config)#vlan 100 name JJJ
查看VLAN配置:
switch1912-1#show vlan
VLAN Name Status Ports
--------------------------------------
1 default Enabled 11-24, AUI, A, B
10 AAA Enabled 1
20 BBB Enabled 2
30 CCC Enabled 3
40 DDD Enabled 4
50 EEE Enabled 5
60 FFF Enabled 6
70 GGG Enabled 7
80 HHH Enabled 8
90 III Enabled 9
100 JJJ Enabled 10
1002 fddi-default Suspended
1003 token-ring-defau Suspended
1004 fddinet-default Suspended
1005 trnet-default Suspended
VLAN Type SAID MTU Parent RingNo BridgeNo Stp Trans1 Trans2
---------------------------------------------------------------------------
1 Ethernet 100001 1500 0 0 0 Unkn 1002 1003
10 Ethernet 100010 1500 0 1 1 Unkn 0 0
20 Ethernet 100020 1500 0 1 1 Unkn 0 0
30 Ethernet 100030 1500 0 1 1 Unkn 0 0
40 Ethernet 100040 1500 0 1 1 Unkn 0 0
50 Ethernet 100050 1500 0 1 1 Unkn 0 0
60 Ethernet 100060 1500 0 1 1 Unkn 0 0
70 Ethernet 100070 1500 0 1 1 Unkn 0 0
80 Ethernet 100080 1500 0 1 1 Unkn 0 0
90 Ethernet 100090 1500 0 1 1 Unkn 0 0
100 Ethernet 100100 1500 0 1 1 Unkn 0 0
1002 FDDI 101002 1500 0 0 0 Unkn 1 1003
1003 Token-Ring 101003 1500 1005 1 0 Unkn 1 1002
1004 FDDI-Net 101004 1500 0 0 1 IEEE 0 0
1005 Token-Ring-Net 101005 1500 0 0 1 IEEE 0 0
---------------------------------------------------------------------------
查看1912-2上能不能学习到1912-1上划分的VLAN.
查看VLAN配置:
switch1912-2#show vlan
VLAN Name Status Ports
--------------------------------------
1 default Enabled 11-24, AUI, A, B
10 AAA Enabled 1
20 BBB Enabled 2
30 CCC Enabled 3
40 DDD Enabled 4
50 EEE Enabled 5
60 FFF Enabled 6
70 GGG Enabled 7
80 HHH Enabled 8
90 III Enabled 9
100 JJJ Enabled 10
1002 fddi-default Suspended
1003 token-ring-defau Suspended
1004 fddinet-default Suspended
1005 trnet-default Suspended
VLAN Type SAID MTU Parent RingNo BridgeNo Stp Trans1 Trans2
---------------------------------------------------------------------------
1 Ethernet 100001 1500 0 0 0 Unkn 1002 1003
10 Ethernet 100010 1500 0 1 1 Unkn 0 0
20 Ethernet 100020 1500 0 1 1 Unkn 0 0
30 Ethernet 100030 1500 0 1 1 Unkn 0 0
40 Ethernet 100040 1500 0 1 1 Unkn 0 0
50 Ethernet 100050 1500 0 1 1 Unkn 0 0
60 Ethernet 100060 1500 0 1 1 Unkn 0 0
70 Ethernet 100070 1500 0 1 1 Unkn 0 0
80 Ethernet 100080 1500 0 1 1 Unkn 0 0
90 Ethernet 100090 1500 0 1 1 Unkn 0 0
100 Ethernet 100100 1500 0 1 1 Unkn 0 0
1002 FDDI 101002 1500 0 0 0 Unkn 1 1003
1003 Token-Ring 101003 1500 1005 1 0 Unkn 1 1002
1004 FDDI-Net 101004 1500 0 0 1 IEEE 0 0
1005 Token-Ring-Net 101005 1500 0 0 1 IEEE 0 0
---------------------------------------------------------------------------
实验总结:
有SHOW VLAN命令给出的信息可以看出,1912-2已经完全学习到1912-1的VLAN信息,所以我们配置的VTP协议是完全成功的。
注:因为1900系列交换机只支持TRUNK的ISL封装,而2900系列交换机只支持802.1Q封装,而更高系列的交换机则都是支持这两种封装,所以只有1900系列和2900系列之间不能起TRUNK。