发布时间: 2017-06-16 14:55:04
Vlan trunking protocol是思科的私有协议
1.简化大型园区网中VLAN信息库同步的问题(同一个VTP管理域中)
2.只同步VLAN信息
3.需要交换机之间的trunk链路支持
4.用的不多
Vtp的模式有server、client、transparent这三种模式,如果你激活了vtp,必须属于这三种模式之一。
Server | Client | Transparent |
1.创建、修改、删除Vlan 2.发送/转发信息宣告 3.同步 4.Vlan信息存储于NVRAM 5.交换机的默认模式 | 1.不可创建、删除、修改 2.发送/转发信息宣告 3.同步 4.不存储在NVRAM | 1.创建、修改、删除Vlan 2.转发信息宣告 3.不同步、不始发 4.Vlan信息存储于NVRA |
Switch#dir
Directory of flash:/
1 -rw- 4414921 <no date> c2960-lanbase-mz.122-25.FX.bin
Switch(config)#vlan 10
Switch#dir
Directory of flash:/
1 -rw- 4414921 <no date> c2960-lanbase-mz.122-25.FX.bin
2 -rw- 616 <no date> vlan.dat
如果创建了vlan信息之后,发现多了vlan.dat的文件 --- 默认是server模式
Vtp是在交换机和交换机之间,通过trunk链路传输vlan的信息
1.VTP协议通过组播地址0100-0CCC-CCCC在Trunk链路上发送VTP通告
2.VTP Server和clients通过较高的修订号来同步数据库
3.VTP协议每隔5分钟发送一次VTP通过或者有变化是发生
Domain-域名 | 在同一个VTP域的交换机,域名必须一致,否则可能出现信息不一样 |
Config revision | 表示VTP配置信息的折旧 |
配置版本号 | 如果数值小则便是越旧,如果数值大,表示信息 如果自己配置的值(收到信息的配置值,就会去学习) |
Password | 密码必须一直,才能进行进步 |
Mode | Server、Client、Transparent这三种模式中,确定一种模式 |
Version | 版本有1和2 |
查看VTP的信息
Switch#show vtp status
VTP Version : 2 !运行版本2
Configuration Revision : 0 !配置修订号,每一次修改,都会引起+1
Maximum VLANs supported locally : 255
Number of existing VLANs : 5
VTP Operating Mode : Server
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x7D 0x5A 0xA6 0x0E 0x9A 0x72 0xA0 0x3A
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 0.0.0.0 (no valid interface found)
设置VTP域名
Switch(config)#vtp domain togogo
配置本机VTP模式
Switch(config)#vtp mode ?
client Set the device to client mode.
server Set the device to server mode.
transparent Set the device to transparent mode.
修改VTP的密码
Switch(config)#vtp password hztogogo
这里有两个问题需要注意:
1.
前面一直说,server对交换机进行配置的时候,会让revision增加,client会去学习信息
但是client也是有机会让server来学习他的信息的
可能中间链路断掉了,将SW0模式调整成Server,修改Vlan信息
(让SW0的修订号大于SW1)
将SW0的模式调整成Client,然后将中间链路连通
查看SW1的VTP信息,发现和SW0进行了同步
2.
当Server和Client的修订号一致,不知道该根据哪个信息进行同步,就会报错
MD5 checksum mismatch(修订号相同,vlan信息无法同步)
上一篇: VRRP和HSRP对比
下一篇: 物理机和虚拟机的结构区分