Cisco思科模拟器上配置交换机VTP&检验三种模式区别!

原创 阁主  2019-03-14 14:32:22  阅读 6956 次 评论 1 条
摘要:

前面有篇文章(点我访问)已经讲解了VTP协议的基本用法,本篇主要讲解案例实验操作!

实验工具:

模拟器:Cisco Packet Tracer 7.0

交换机:三台2690-24TT(二层交换机)

操作系统:Windows 10 X64

VTP实验目的:

1.理解VTP的作用。

2.学会配置VTP实例。

3.掌握VTP的使用应该注意的事项。

拓扑图:

VTP-验证三种模式区别.png

实验命令:

  1. 在SW1上创建一个域,给SW1配置Server模式。

Server_S1>enable  //进入特权模式
Server_S1#vlan database   //进入vlan数据库模式
Server_S1(vlan)#vtp domain cisco  //创建一个名为cisco的域
Server_S1(vlan)#vtp server  //定义角色为server
Server_S1(vlan)#exit   //退出到特权模式
Server_S1#configure terminal   //进入全局模式
Server_S1(config)#interface range fastEthernet 0/1-2  //进入F0/1端口
Server_S1(config-if-range)#switchport mode trunk   //指定端口为trunk模式
Server_S1(config-if-range)#switchport nonegotiate   //关闭自动协商
Server_S1(config-if)#end   //退出至特权模式
Server_S1#write //把当前配置写入NVRAM保存

2.在SW2上给SW2配置Client模式。

2.在SW2上给SW2配置client模式。
Client_S2>enable 
Client_S2#configure terminal 
Client_S2(config)#exit
Client_S2#vlan database 
Client_S2(vlan)#vtp domain cisco
Client_S2(vlan)#vtp client //定义角色为client
Client_S2(vlan)#exit
Client_S2#configure terminal 
Client_S2(config)#interface range fastEthernet 0/2-3
Client_S2(config-if-range)#Client_S2port mode trunk 
Client_S2(config-if-range)#Client_S2port nonegotiate
Client_S2(config-if)#end
Client_S2#write //把当前配置写入NVRAM保存

3.在SW3上给SW3配置Transparent模式。

Transparent_S3>enable
Transparent_S3#vlan database 
Transparent_S3(vlan)#vtp domain cisco
Transparent_S3(vlan)#vtp transparent 
Transparent_S3#configure terminal //定义角色为terminal
Transparent_S3(config)#interface range fastEthernet 0/1
Transparent_S3(config-if-range)#Transparent_S3port mode trunk 
Transparent_S3(config-if-range)#Transparent_S3port nonegotiate 
Transparent_S3(config)#interface range fastEthernet 0/3
Transparent_S3(config-if-range)#Transparent_S3port mode trunk 
Transparent_S3(config-if-range)#Transparent_S3port nonegotiate
Transparent_S3(config-if)#end
Transparent_S3#write //把当前配置写入NVRAM保存

检验配置:

1.在SW1上添加一个VLAN10,名字叫cisco,在SW2和SW3上查看结果。

Server_S1(config)#vlan 10
Server_S1(config-vlan)#name cisco

查看S1的VLAN配置:自身VLAN信息

S1.png

查看S2的VLAN配置:有同步到VLAN信息

S2配置.png

查看S3的VLAN配置:没有同步到VLAN信息

S3.png

2.分别在SW2和SW3上各添加一个VLAN20,在其它两个交换机上查看结果。

下图为S2创建失败提示:当设备处于客户端模式时,不允许进行VTP VLAN配置。

拒绝.png

S3交换机:成功创建VLAN20,但是不会发布VTP通告,也就是其他交换机无法同步S3的VLAN信息。

Transparent_S3#VLAN Database
Transparent_S3(vlan)#VLAN 20

创建成功.png

S1的VLAN信息:

无vlan20_1.png


S2的VLAN信息:

无vlan20_2.png

总结:

  • Server:可以删除,添加,更改vlan,会同步给其他设备。

  • Client:不能删除,添加,更改vlan。

  • Transparent:可以删除,添加,更改vlan,但不会同步给其他设备。

附件:

已经过安全软件检测无毒,请您放心下载。
本文地址:https://www.mainblog.cn/144.html
版权声明:本文为原创文章,版权归 阁主 所有,欢迎分享本文,转载请保留出处!
免责申明:有些内容源于网络,没能联系到作者。如侵犯到你的权益请告知,我们会尽快删除相关内容。

评论已关闭!