DTP和VTP的使用

DTP和VTP的使用
DTP(动态trunk协议) 该协议在思科设备上默认开启

设备:
C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4)
Cisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory.
2960-24TT starting…
DTP步骤:
Switch(config)#ho sw1
sw1(config)#int f0/1
sw1(config-if)#switchport mode dynamic desirable
sw1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

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

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

Switch(config)#ho sw2
sw2(config)#int f0/1
sw2(config-if)#switchport mode dynamic auto

desirable:主动模式 默认45以上交换机
auto:被动模式 默认45以下交换机

被动和被动模式不能形成trunk干道,必须一方是主动一方是被动或两方均为主动模式才能形成trunk。

查看trunk干道形成:
sw1#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 desirable n-802.1q trunking 1

Port Vlans allowed on trunk
Fa0/1 1-1005

Port Vlans allowed and active in management domain
Fa0/1 1

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1

多层交换机在配置trunk干道是必须进行接口封装修改
Switch(config)#int f0/1
Switch(config-if)#switchport trunk encapsulation ?
dot1q Interface uses only 802.1q trunking encapsulation when trunking
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode dynamic desirable

VTP配置步骤:

sw2(config)#vtp domain np
Domain name already set to np.
所有交换机必须在同一个域名中内

sw2(config)#vtp mode ?
client Set the device to client mode. 客户端
server Set the device to server mode. 服务端
transparent Set the device to transparent mode. 透明

sw2(config)#vtp version ?
<1-2> Set the adminstrative domain VTP version number
版本号必须保持一致

vtp加密:
sw2(config)#vtp password 456
Setting device VLAN database password to 456
在一个域内所有交换机上的密码必须保持一致

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值