`
xitongyunwei
  • 浏览: 926657 次
文章分类
社区版块
存档分类
最新评论

VTP协议及其配置

 
阅读更多

VTP协议(VLAN Trunk Protocol)

是Cisco私有协议

作用:从一个控制点(也就是VTP中的服务器)维护整个企业网上VLAN添加、删除和重命名等工作

VTP域的组成:

相同域名,必须通过Trunk相互连接,一组交换机

VTP的运行模式有3种:

——服务器模式(server)

提供VTP消息:包括VLAN ID和名字信息

学习相同域名的VTP消息

转发相同域名的VTP消息

可以添加删除更改VLAN

——客户端模式(client)

请求VTP消息

学习相同域名的VTP消息

转发相同域名的VTP消息

不可以添加删除更改VLAN

——透明模式(Transparent)

不提供VTP消息

不学习VTP消息

转发VTP消息

可以添加删除更改VLAN,只在本地生效

VTP通告

1、客户机的通告请求——获取VLAN信息

条件:交换机重启;VTP域名变更;交换机接收到了配置修订号大的汇总通告

2、服务器的通告响应——发送VLAN信息

汇总通告:用于通知邻接的交换机目前VTP域名和配置修订编号;每隔300秒一次或配置改变时发送通告

子集通告:包含VLAN的详细信息

注意:VTP通告使用组播地址发送,地址为01-00-0c-cc-cc-cc

只能通过中继端口(串口)传送

VTP消息通过VLAN 1传送

VTP版本

1、version 1:一个VTP透明传输的交换机,需要检查VTP版本号和域名是否匹配,匹配时才转发

2、version 2:再转发VTP信息时,不检查版本号和域名

相关配置命令:

#switchport mode trunk ——“全局”设置Trunk链路

#vtp domain 域名 ——“VLAN数据库”,创建VTP域

#vtp mode server | client | transparent ——2950系列配置VTP模式

#vtp server | client | transparent ——3640系列配置VTP模式

#vtp password密码 ——配置VTP口令

#vtp pruning ——配置VTP修建

#vtp version 2 ——2950配置VTP版本

#vtp v2-mode ——3640配置VTP版本

#show vtp status

例拓补图:

具体配置步骤:

【交换机A】

A(config)#interface f0/10

A(config-if)#switchport mode trunk ——设置该端口为串口模式

A(config-if)#no shutdown

A(config-if)#exit

A(config)#exit

A#vlan database ——进入VLAN数据库

A(vlan)#vlan 2 ——创建vlan 2

A(vlan)#vlan 3 ——创建vlan 3

A(vlan)#exit

A#show vlan-switch ——查看创建的VLAN是否成功

A#vlan database

A(vlan)#vtp domain name ——域名必须统一

A(vlan)#vtp server ——设置模式为server

A#show vtp status ——查看vtp状态

一下为可选项:

A#vlan databas

A(vlan)#vtp pruning ——设置修剪模式

A(vlan)#vtp v2-mode ——设置vtp版本

A(vlan)#vtp password 密码 ——如果设置了密码那么同一个域名内的交换机都要设置相同的密码

【交换机B】

B(config)#interface f0/11

B(config-if)#switchport mode trunk

B(config-if)#no shutdown

B(config-if)#exit

B(config)#interface f0/10

B(config-if)#switchport mode trunk

B(config-if)#no shutdown

B(config-if)#exit

B#vlan databse

B(vlan)#vtp domain name

B(vlan)#vtp client

B(vlan)#exit

B#show vlan-switch ——查看是否学习到vlan信息

【交换机C】

C(config)#interface f0/10

C(config-if)#switchport mode trunk

C(config-if)#no shutdown

C(config-if)#exit

C(config)#

C#vlan databse

C(vlan)#vtp domain name

C(vlan)#vtp client

C(vlan)#exit

C#show vlan-switch ——查看是否学习到vlan信息

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics