实验拓扑:
一、配置VTP协议
VTP(VLAN Trunking Protocol):是VLAN中继协议,也被称为虚拟局域网干道协议。
它是思科私有协议。
在所有的交换机上配置VTP,域名为ccna,设置VTP的Sever和Client。
VTP Server:
Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Server
Server(config)#vtp domain ccna
Changing VTP domain name from NULL to ccna
Server(config)#vtp mode server
Device mode already VTP SERVER.
Server(config)#vtp version 2
Server(config)#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Client1:
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Client1
Client1(config)#vtp domain ccna
Changing VTP domain name from NULL to ccna
Client1(config)#vtp mode client
Setting device to VTP CLIENT mode.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Client2:
Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Client2
Client2(config)#vtp domain ccna
Changing VTP domain name from NULL to ccna
Client2(config)#vtp mode client
Setting device to VTP CLIENT mode.
Client2(config)#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
二、配置中继端口
配置交换机的接口有五种模式:
- Switchport mode access
将接口设置为永久非中继模式,成为专用的第二层接入点。
- switchport mode trunk
将接口设置为永久中继模式,并可以通过协商将链路设置为Trunk模式。
- switchport mode dynamic auto
这种模式为自动模式,若邻接接口为Trunk和desirable 模式,可以自动协商成Trunk