RSTP概要天外飞仙一剑西来紫禁之巅月圆之夜目录1.协议简介(Overview).................................11.1开天辟地的第一代生成树协议:STP/RSTP.................11.2聪明伶俐的第二代生成树协议:PVST/PVST+...............51.3多实例化的第三代生成树协议:MISTP/MSTP...............71.4生成树协议的未来之路................................92.基本概念(Definition)...............................92.1端口角色(PortRole)...............................92.1.1根端口(RootPort)............................92.1.2指定端口(DesignatedPort).....................92.1.3备份端口(BackupPort)........................102.1.4替换端口(AlternatePort).....................102.2端口状态(PortState).............................102.2.1丢弃(Discarding)............................112.2.2学习(Learning)..............................112.2.3转发(Forwarding)............................112.3端口参数(Per-Portvariables).....................112.3.1端口ID(PortIdentifier).....................112.3.2边缘端口(EdgePort)..........................112.3.3链路类型(LinkType)..........................11I天外飞仙一剑西来紫禁之巅月圆之夜2.3.4端口链路代价(PortPathCost).................122.4网桥参数(Per-Bridgevariables)...................122.4.1网桥ID(BridgeIdentifier)...................122.4.2最大消息生存时间(maximumage).................122.4.3转发延迟(ForwardDelay)......................122.4.4保活时间(HelloTime).........................122.5状态机参数(Statemachineparameters).............132.5.1老化时间(AgeingTime)........................132.5.2迁移时间(MigrateTime).......................132.5.3拓扑变化通知时间(TCWhile)....................132.5.4传输间隔(TransmitHoldCount)................132.5.5协议版本(ForceProtocolVersion).............132.6参数取值(ParameterValue)........................142.6.1性能参数(PerformaceParameter)...............142.6.2端口链路代价(PortPathCost).................142.7消息封装(EncodingofBPDUs)......................152.7.1EncodingofProtocolIdentifiers...........162.7.2EncodingofProtocolVersionIdentifiers...162.7.3EncodingofBPDUTypes.....................162.7.4EncodingofFlags..........................162.7.5EncodingofBridgeIdentifiers.............172.7.6EncodingofRootPathCost.................172.7.7EncodingofPortIdentifiers...............172.7.8EncodingofTimerValues...................17II天外飞仙一剑西来紫禁之巅月圆之夜2.7.9EncodingofLengthValues..................172.7.10ValidationofReceivedBPDUs..............173.状态机(StateMachine).............................183.1overviewandinterrelationships.................183.2NotationalConventions..........................193.3PortTimersStateMachine.......................203.4PortInformationStateMachine..................213.5PortRoleSelectionStateMachine...............223.6PortStatesTransitionsStateMachine...........233.7PortRoleTransitionsStateMachine.............243.8TopologyChangeStateMachine...................283.9PortProtocolMigrationStateMachine...........293.10PortTransmitStateMachine.....................303.11Handshake.......................................314.典型案例..........................................324.1链路备份.........................................324.2版本兼容.........................................345.注意事项..........................................355.1ProtocolDesignRequirements....................355.2SymmetricConnectivity..........................355.3TemporaryLoops.................................355.4Root............................................355.5RootBridgeSelction............................355.6RootPortSelection.............................365.7DesignatedBridgeSelction......................365.8STPcompatibility...............................365.9Updatinglearnedstationinformation............375.10ProtocolVersion................................37III天外飞仙一剑西来紫禁之巅月圆之夜5.11PortRole---Unknown.............................375.12ConfigurationMessageandTCNMessage...........376.疑难解答..........................................386.1优先级设置.......................................386.2端口角色选择......................................38图1-1生成树工作过程示意图.............................................2图1-2RSTP冗余链路快速切换示意图......................................4图1-3非对称网络示意图.................................................4图1-4SST带宽利用率低下示意图.........................................5图1-5PVST+与SST对接示意图............................................6图1-6PVST+负载均衡示意图.............................................6图1-7MSTP工作原理示意图..............................................8图2-1端口角色示意图..................................................10图2-2RSTP与STP端口状态比较示意图...................................10图2-3性能参数取值范围................................................14图2-4端口链路代价取值范围............................................14图2-5协议封装格式....................................................15图2-6RSTFlag示意图.................................................16图3-1RSTPstatemachines-overviewandinterrelationships...........19图3-2PortTimersStateMachine.......................................20图3-3PortInformationStateMachine..................................21图3-4PortRoleSelctionStateMachine................................22图3-5PortStatesTransitionStateMachine............................23图3-6PortRoleTransition:Disabled,Alternate,andBackupRole......24图3-7PortRoleTransition:RootPortRole.............