3.6 VTP基本配置
实验目的:
1、掌握VTP基本配置。
2、理解VTP的Server、Client模式。
3、理解VTP的管理域、密码、配置版本号。
实验步骤:
1、依据图中拓扑部署VTP技术,整个VTP管理域为PingingLab,密码为Cisco,其中SW1为Server,其他交换机为Client,配置如下=>
SW1上配置:
SW1#vlan database
SW1(vlan)#vtp domain PingingLab[PL2]
SW1(vlan)#vtp password Cisco[PL3]
SW1(vlan)#exit
SW2上配置:
SW2#vlan database
SW2(vlan)#vtp client
SW2(vlan)#vtp domain PingingLab
SW2(vlan)#vtp password Cisco
SW2(vlan)#exit
SW3上配置:
SW3#vlan database
SW3(vlan)#vtp client
SW3(vlan)#vtp domain PingingLab
SW3(vlan)#vtp password Cisco
SW3(vlan)#exit
此时查看VTP信息,如下:
SW1#show vtp status
VTP Version
Configuration Revision
Maximum VLANs supported locally : 256
Number of existing VLANs
VTP Operating Mode
VTP Domain Name
VTP Pruning Mode
VTP V2 Mode
VTP Traps Generation
MD5 digest
Configuration last modified by 0.0.0.0 at 3-1-02 01:22:27
Local updater ID is 0.0.0.0 (no valid interface found)
SW2#show vtp status
VTP Version
Configuration Revision
Maximum VLANs supported locally : 256
Number of existing VLANs
VTP Operating Mode
VTP Domain Name
VTP Pruning Mode
VTP V2 Mode
VTP Traps Generation
MD5 digest
Configuration last modified by 0.0.0.0 at 3-1-02 01:22:27
以上可以看出,由于此时Server端未创建VLAN,默认配置版本号都为0。
2、为了使得全网都能学习到VLAN10/20/30,需要在Server创建,配置如下=>
SW1(vlan)#vlan 10 name VLAN_10
SW1(vlan)#vlan 20 name VLAN_20
SW1(vlan)#vlan 30 name VLAN_30
SW1(vlan)#exit
此时查看SW1上VTP信息,如下:
SW1#show vtp status
VTP Version
Configuration Revision
Maximum VLANs supported locally : 256
Number of existing VLANs
VTP Operating Mode
VTP Domain Name
VTP Pruning Mode
VTP V2 Mode
VTP Traps Generation
MD5 digest
Configuration last modified by 0.0.0.0 at 3-1-02 01:39:10
Local updater ID is 0.0.0.0 (no valid interface found)
由于VLAN信息出现变动,所以VTP版本号增加,此时查看其他Client端信息,如下:
SW2#show vtp status
VTP Version
Configuration Revision
Maximum VLANs supported locally : 256
Number of existing VLANs
VTP Operating Mode
VTP Domain Name
VTP Pruning Mode
VTP V2 Mode
VTP Traps Generation
MD5 digest
Configuration last modified by 0.0.0.0 at 3-1-02 01:39:10
可以看到,由于Server端版本号较高,Client端已经从Server端同步VLAN信息,查看VLAN信息,如下:
SW2#show vlan-switch brief
VLAN Name
---- -------------------------------- --------- -------------------------------
1
10
20
30
1002 fddi-default
1003 token-ring-default
1004 fddinet-default
1005 trnet-default
同样在SW3上查看VLAN信息,如下:
SW3#show vlan-switch brief
VLAN Name
---- -------------------------------- --------- -------------------------------
1
10
20
30
1002 fddi-default
1003 token-ring-default
1004 fddinet-default
1005 trnet-default
可以看到,通过部署VTP技术,此时VLAN信息全局同步。
3、修改SW2和SW3的管理域或者密码,并在SW1修改VLAN信息,查看VTP同步效果。
SW2上修改域名:
SW2(vlan)#vtp domain PL
Changing VTP domain name from PingingLab to PL
SW2(vlan)#exit
SW3上修改密码:
SW3(vlan)#vtp password PL
Setting device VLAN database password to PL.
SW3(vlan)#exit
SW1上修改VLAN:
SW1#vlan database
SW1(vlan)#vlan 10 name TEST
SW1(vlan)#no vlan 20
SW1(vlan)#exit
此时查看SW1上VLAN信息:
SW1#show vlan-switch brief
VLAN Name
---- -------------------------------- --------- -------------------------------
1
10
1002 fddi-default
1003 token-ring-default
1004 fddinet-default
1005 trnet-default
再次观察SW2和SW3的VLAN信息,如下:
SW2#show vlan-switch brief
VLAN Name
---- -------------------------------- --------- -------------------------------
1
10
20
30
1002 fddi-default
1003 token-ring-default
1004 fddinet-default
1005 trnet-default
SW3#show vlan-switch brief
VLAN Name
---- -------------------------------- --------- -------------------------------
1
10
20
30
1002 fddi-default
1003 token-ring-default
1004 fddinet-default
1005 trnet-default
可以看到,由于域名和密码的不一致,所以导致VTP信息无法同步。此实验完成。
PingingLab·高品质IT教育提供商
CCIE
深圳拼客信息科技有限公司·广州大学城外环西路站
新浪微博:@拼客科技PingingLab
PingingLab微信公众号:pinginglab
PingingLab技术交流群:240920680