cisco之VTP
VTP(虚拟局域网中继协议):是思科的私有协议,通过VTP协议,可以实现交换机之间互相传递消息,从而实现VLAN的同步和统一管理。
成都创新互联于2013年开始,先为宝丰等服务建站,宝丰等地企业,进行企业商务咨询服务。为宝丰企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。
VTP示例:
R3:
R3(config)#int f1/1 #trunk模式
R3(config-if)#switchport mode trunk
R3(config)#vtp domain cisco #所有启用VTP的交换机域名一致
R3(config)#vtp password cisco #VTP密码一致
R3(config)#vtp mode server #VTP域至少有一台处于服务器模式,以便于
R3(config)#vtp pruning 创建、修改、删除VLAN
Pruning switched on
R3(config)#vlan 10 #新建VLAN
R3(config-vlan)#name vlan10
R3(config-vlan)#vlan 20
R3(config-vlan)#name vlan20
R3(config)#int vlan 1 #管理IP
R3(config-if)#ip add 172.16.1.1 255.255.255.0
R3(config-if)#no sh
R3#sh vlan-switch #查看VLAN
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/2, Fa1/3, Fa1/4
Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/11, Fa1/12
Fa1/13, Fa1/14, Fa1/15
10 vlan10 active
20 vlan20 active
R3#show vtp status #查看VTP状态信息
VTP Version : 2
Configuration Revision : 3
Maximum VLANs supported locally : 36
Number of existing VLANs : 7
VTP Operating Mode : Server
VTP Domain Name : cisco
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x0A 0x68 0x1E 0xCC 0xFC 0xF2 0x7E 0x6F
Configuration last modified by 0.0.0.0 at 3-1-02 00:21:50
Local updater ID is 172.16.1.1 on interface Vl1 (lowest numbered VLAN interface found)
R4、R5配置:
R4(config)#int f1/1
R4(config-if)#switchport mode trunk
R4(config)#int f1/2
R4(config-if)#sw mo trunk
R4(config)#vtp domain cisco
R4(config)#vtp password cisco
R4(config)#vtp mode client
查看R4、R5是否同步VLAN:
R4#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/3, Fa1/4, Fa1/5
Fa1/6, Fa1/7, Fa1/8, Fa1/9
Fa1/10, Fa1/11, Fa1/12, Fa1/13
Fa1/14, Fa1/15
10 vlan10 active
20 vlan20 active
R5#show vlan-swi
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/1, Fa1/3, Fa1/4
Fa1/5, Fa1/6, Fa1/7, Fa1/8
Fa1/9, Fa1/10, Fa1/11, Fa1/12
Fa1/13, Fa1/14, Fa1/15
10 vlan10 active
20 vlan20 active
查看VTP状态:
R4#sh vtp status
VTP Version : 2
Configuration Revision : 3
Maximum VLANs supported locally : 36
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : cisco
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x0A 0x68 0x1E 0xCC 0xFC 0xF2 0x7E 0x6F
Configuration last modified by 0.0.0.0 at 3-1-02 00:21:50
分享标题:cisco之VTP
链接分享:http://scyanting.com/article/ihhgjc.html