
SA
sA#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
sA(config)#interface f0/0
sA(config-if)#switchport mode trunk //启用trunk链路
*Mar 1 00:15:52.435: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk
sA(config-if)#end
*Mar 1 00:17:08.131: %SYS-5-CONFIG_I: Configured from console by console
sA#vlan database //进入VLAN数据库
sA(vlan)#vlan 2 name vlan2 //创建vlan
VLAN 2 added:
Name: vlan2
sA(vlan)#vlan 3 name vlan3
VLAN 3 added:
Name: vlan3
sA(config)#vtp domain benet //配置VTP域名
Changing VTP domain name from NULL to benet
sA(config)#vtp mode server //配置交换机的VTP模式
*Mar 1 00:06:14.167: %SYS-5-CONFIG_I: Configured from console by console
Device mode already VTP SERVER.
sA(config)#vtp password cisco //配置VTP口令
Setting device VLAN database password to cisco.
sA(config)#vtp pruning //配置VTP修剪
Pruning switched ON
sA(vlan)#vtp version 2 //默认情况下使用版本1,如果使用版本2需要使用如下命令
V2 mode enabled.
sA(config)#interface vlan 1 //进入VLAN 1
sA(config-if)#ip address 192.168.1.1 255.255.255.0 //配置管理IP 地址
sA(config-if)#no shutdown
sA(config-if)#exit
sA(config)#exit
*Mar 1 00:09:22.967: %SYS-5-CONFIG_I: Configured from console by console
sA#show vtp status //查看VTP配置信息
VTP Version : 2 //显示设备支持扳本2
Configuration Revision : 2 //目前的配置修改编号
Maximum VLANs supported locally : 256 //支持的最大的VLAN数是256个
Number of existing VLANs : 5 //已经存在的VLAN 数
VTP Operating Mode : Server //VTP模式为服务器模式
VTP Domain Name : benet //VTP域名
VTP Pruning Mode : Enabled //VTP修剪已经启用
VTP V2 Mode : Enabled //启用了VTP版本2
VTP Traps Generation : Disabled
MD5 digest : 0x5C 0xFD 0x08 0x82 0x3E 0x7C 0xAE 0x1B //MD5值
Configuration last modified by 0.0.0.0 at 3-1-02 00:08:13 //VTP更新者的IP及时间
Local updater ID is 192.168.1.1 on interface Vl1 (lowest numbered VLAN interface found)
sB>enable
sB#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
sB(config)#interface f0/0
sB(config-if)#switchport mode trunk
*Mar 1 00:18:52.435: %DTP-5-TRUNKPORTON: Port Fa0/0 has become dot1q trunk
sB(config-if)exit
sB(config)#interface f0/1
sB(config-if)#switchport mode trunk
*Mar 1 00:19:21.435: %DTP-5-TRUNKPORTON: Port Fa0/1 has become dot1q trunk
sB(config-if)#end
*Mar 1 00:20:08.131: %SYS-5-CONFIG_I: Configured from console by console
sB#vlan database
sB(vlan)#vlan 4 name vlan4
VLAN 2 added:
Name: vlan4
sB(vlan)#vlan 5 name vlan5
VLAN 3 added:
Name: vlan5
sB(config)#vtp domain benet
Changing VTP domain name from NULL to benet
sB(config)#vtp mode transparent
*Mar 1 00:06:14.167: %SYS-5-CONFIG_I: Configured from console by console
Device mode already VTP transparent.
sB(config)#vtp password cisco
Setting device VLAN database password to cisco.
sB(config)#vtp pruning
Pruning switched ON
sB(vlan)#vtp version 2
V2 mode enabled.
sB(config-if)#exit
sB(config)#exit
sB#show vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 256
Number of existing VLANs : 5
VTP Operating Mode : Transparent
VTP Domain Name : benet
VTP Pruning Mode : Enabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0xAE 0x60 0xEF 0xB9 0x4E 0x18 0x4F 0x15
Configuration last modified by 0.0.0.0 at 3-1-02 00:34:29
SC
sC#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
sC(config)#interface f0/1
sC(config-if)#switchport mode trunk
*Mar 1 00:35:02.435: %DTP-5-TRUNKPORTON: Port Fa0/1 has become dot1q trunk
sC(config-if)#end
*Mar 1 00:17:08.131: %SYS-5-CONFIG_I: Configured from console by console
sC(config)#vtp domain benet
Changing VTP domain name from NULL to benet
sC(config)#vtp mode client
*Mar 1 00:06:14.167: %SYS-5-CONFIG_I: Configured from console by console
Device mode already VTP client.
sC(config)#vtp password cisco
Setting device VLAN database password to cisco.
sC(config)#vtp pruning
Pruning switched ON
sC(vlan)#vtp version 2
V2 mode enabled.
sC(config-if)#end
*Mar 1 00:09:22.967: %SYS-5-CONFIG_I: Configured from console by console
sC#show vtp status
VTP Version : 2
Configuration Revision : 3
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : benet
VTP Pruning Mode : Enabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0x05 0x7F 0xB9 0xE6 0x48 0xD1 0xD6 0x6B
Configuration last modified by 192.168.1.1 at 3-1-02 00:19:46