本文共 1776 字,大约阅读时间需要 5 分钟。
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 autodesirable:主动模式 默认45以上交换机
auto:被动模式 默认45以下交换机被动和被动模式不能形成trunk干道,必须一方是主动一方是被动或两方均为主动模式才能形成trunk。
查看trunk干道形成:
sw1#show interfaces trunk Port Mode Encapsulation Status Native vlan Fa0/1 desirable n-802.1q trunking 1Port Vlans allowed on trunk
Fa0/1 1-1005Port Vlans allowed and active in management domain
Fa0/1 1Port 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 desirableVTP配置步骤:
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 在一个域内所有交换机上的密码必须保持一致转载地址:http://lixzi.baihongyu.com/