搜档网
当前位置:搜档网 › STP配置例子和配置命令

STP配置例子和配置命令


一、配置例子:

1、

全局
spanning-tree mode pvst
spanning-tree extend system-id 我不知道这个system-id是用来干什么的,但是它在各个vlan中一定和vlan id相同

启用边缘端口
interface GigabitEthernet0/1
spanning-tree portfast

2、
Switch(config)#spanning-tree portfast ?
bpdufilter Enable portfast bpdu filter on this switch
bpduguard Enable portfast bpdu guard on this switch
default Enable portfast by default on all access ports 在所有access端口上启用快速端口功能

zhuyu4507R(config)#spanning-tree mode ?
mst Multiple spanning tree mode
pvst Per-Vlan spanning tree mode 思科私有的生成树协议,相当于在每个vlan中单独运行stp
rapid-pvst Per-Vlan rapid spanning tree mode思科私有的生成树协议,相当于在每个vlan中单独运行rstp

zhuyu4507R(config)#spanning-tree vlan 1-2 ?
forward-time Set the forward delay for the spanning tree
hello-time Set the hello interval for the spanning tree
max-age Set the max age interval for the spanning tree
priority Set the bridge priority for the spanning tree
root Configure switch as root



二、命令

Switch(config)#spanning-tree ?
backbonefast Enable BackboneFast Feature
etherchannel Spanning tree etherchannel specific configuration
extend Spanning Tree 802.1t extensions
logging Enable Spanning tree logging
loopguard Spanning tree loopguard options
mode Spanning tree operating mode
mst Multiple spanning tree configuration
pathcost Spanning tree pathcost options
portfast Spanning tree portfast options
transmit STP transmit parameters
uplinkfast Enable UplinkFast Feature
vlan VLAN Switch Spanning Tree

启用环路监视
Switch(config)#spanning-tree loopguard ?
default Enable loopguard by default on all ports



zhuyu4507R(config)#spanning-tree mst ?
WORD MST instance range, example: 0-3,5,7-9
configuration Enter MST configuration submode
forward-time Set the forward delay for the spanning tree
hello-time Set the hello interval for the spanning tree
max-age Set the max age interval for the spanning tree
max-hops Set the max hops value for the spanning tree



1、Switch(config)#spanning-tree mst configuration
Switch(config-mst)#?
abort Exit region configuration mode, aborting changes
exit Exit region configuration mode, applying changes
instance Map vlans to an MST instance
name Set configuration name
no Negate a command or set its defaults
private-vlan Set private-vlan synchronization
revision Set configuration revision number
show Display region configurations

Switch(config-mst)#name mst-conf
Switch(config-mst)#instance 1 vlan 1-3
Switch(config-mst)#instance

2 vlan 4-6

设置交换机在每个mst实例中的优先级
zhuyu4507R(config)#spanning-tree mst 1 ?
priority Set the bridge priority for the spanning tree
root Configure switch as root







相关主题