vlan间通信配置vtp模式

VTP 模式如果为服务器模式,可以在交换机上增加,删除和修改 VLAN 信息;
如果 VTP 模式为客户模式,不 能再交换机上增加,删除和修改 VLAN 信息,它的 VLAN 信息是从 VTP 模式的交换机上学习而来;
如果 VTP 模式 为透明模式,交换机可以独立维持自身的 VLAN 信息库。默认 VTP 模式均为服务器模式。

拓扑图:

 左右两侧的配置与端口都是相同的,故而仅仅配置左边的。

实现:

Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostna shiyan2
shiyan2(config)#inter f0/1
shiyan2(config-if)#ex
shiyan2(config)#vlan 10
shiyan2(config-vlan)#vlan 20
shiyan2(config-vlan)#inter f0/1
shiyan2(config-if)#sw mo ac
shiyan2(config-if)#sw ac vl 10
shiyan2(config-if)#inter f0/2
shiyan2(config-if)#sw mo ac
shiyan2(config-if)#sw ac v 20
shiyan2(config-if)#inter f0/3
shiyan2(config-if)#sw mo tr

shiyan2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

查看:

 配置vtp的左边与右边

shiyan2(config)#
shiyan2(config)#vtp do
shiyan2(config)#vtp domain shiyan3【对边的名字】
Changing VTP domain name from NULL to shiyan3
shiyan2(config)#vtp mode server
Device mode already VTP SERVER.
shiyan2(config)#
shiyansan(config)#vtp mode client 
Setting device to VTP CLIENT mode.
shiyansan(config)#no vlan 2 
VTP VLAN configuration not allowed when device is in CLIENT mode. Aiko(config)#vtp password shiyansan2
Setting device VLAN database password to Asuqa 
原文地址:https://www.cnblogs.com/topass123/p/13127159.html