思科—vlan传输协议VTP

拓扑如下:
在这里插入图片描述
1、配置三层交换机(把三层交换机vtp模式设置成server)

Switch>en
Switch#conf t
Switch(config)#vtp domain find
Changing VTP domain name from NULL to find
Switch(config)#vtp password find
Setting device VLAN database password to find
Switch(config)#vtp mode server
Device mode already VTP SERVER.
Switch(config)#int f0/1
Switch(config-if)#switchport trunk encapsulation dot1q (三层交换机没有封装)
Switch(config-if)#switchport mode trunk 
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport trunk encapsulation dot1q 
Switch(config-if)#switchport mode trunk 
Switch(config-if)#exit 
Switch(config)#int f0/3
Switch(config-if)#switchport trunk encapsulation dot1q 
Switch(config-if)#switchport mode trunk 

2、配置交换机sw1(把交换机sw1的vtp模式设置成client)

Switch>en
Switch#conf t
Switch(config)#vtp domain find
Domain name already set to find.
Switch(config)#vtp password find
Setting device VLAN database password to find
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#int f0/2
Switch(config-if)#switchport mode trunk 
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode trunk 

3、配置交换机sw2(把交换机sw2的vtp模式设置成client)

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vtp domain find
Domain name already set to find.
Switch(config)#vtp password find
Setting device VLAN database password to find
Switch(config)#vtp mode client 
Setting device to VTP CLIENT mode.
Switch(config)#int f0/3
Switch(config-if)#switchport mode trunk 
Switch(config-if)#exit 
Switch(config)#int f0/4
Switch(config-if)#switchport mode trunk 

4、配置交换机sw3(把交换机sw3的vtp模式设置成transparent)

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vtp domain find
Domain name already set to find.
Switch(config)#vtp password find
Setting device VLAN database password to find
Switch(config)#vtp mode transparent 
Setting device to VTP TRANSPARENT mode.
Switch(config)#int f0/1
Switch(config-if)#switchport mode trunk 
Switch(config-if)#exit 
Switch(config)#int f0/2
Switch(config-if)#switchport mode trunk 

5、在三层交换机上创建vlan

Switch(config)#vlan 2
Switch(config-vlan)#name yuwen
Switch(config-vlan)#exit 
Switch(config)#vlan 3
Switch(config-vlan)#name yingyu

查看sw1上的vlan表格
在这里插入图片描述
在sw1创建vlan
在这里插入图片描述
因为sw1的vtp协议的模式是client,client模式不允许创建、修改、删除vlan。
同样sw2也是和sw1一样的实验结果。
查看sw3的vlan表格
在这里插入图片描述
发现其不能学习三层交换机的vlan信息
原因是sw3的vtp协议模式是transparent ,而transparent 模式不学习vlan信息,但可以转发vlan信息,也可以创建、修改、删除vlan信息。
在sw3上创建vlan
在这里插入图片描述
查看sw3的vlan表格
在这里插入图片描述

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值