STP RSTP MSTP PVST+学习 (2)
2007-09-11 22:41
716 查看
MAC media access control
STA spanning-tree Algorithm
hello time 2 second
01-80-c2-00-00-00
TCN topoolgy change notification
DLC--------DLC Header-----------
DLC:
DLC: Frame 15 arrived at 11:02:20:8523:frame size is 60(003c)bytes.
DLC: Destination=Mulitcast 0180c2000000, Bridge_Group_Addr 2层多播地址
DLC: Source=station cisco 7A009A6 发送端口MAC地址
DLC: 802.3length = 39 长度
DLC
LLC:---------LLC Header------------
LLC:
LLC: DSAP Address = 42, DSAP IG Bit=00 (individual address) 0x42 代表 BPDU
LLC: SSAP Address = 42, SSAP CR Bit= 00 (command) 0x42 代表 BPDU
LLC: unnumbered frame:UI
LLC:
BPDU:-------Bridge Protocol Data Unit Header-------------
BPDU:Protocol identifier = 0000 0 协议ID
BPDU:Protocol Version = 00 0 STP 为0 RSTP 2
BPDU:
BPDU: BPDU Type = 00 (configuration) 00 配置BPDU 80 TCN BPDU
BPDU:
BPDU:BPDU Flags = 00 LSB = TC 标记 MSB=TCN 标记
BPDU:0... .... = Not Topology Change Acknowledgement
BPDU:.... ...0 = Not Topology Change
BPDU:000 000. = Unused
BPDU:
BPDU:Root identifier= 8000.004000BA009A2 根网桥ID
BPDU:Priority = 8000 优先级
BPDU:MAC Address = 00400BA009A2 MAC地址
BPDU:
BPDU:Root Path Cost = 0 根路径成本
BPDU:Sending Bridge id = 8000.00400BA009A2.8005 发送网桥ID
BPDU:Priority = 8000 发送网桥优先级
BPDU:MAC Address = 0040BA009A2 发送网桥MAC
BPDU:Port = 8005 端口ID
BPDU:Message Age =0.000 seconds 自根发出BPDU之后的时间
BPDU:Information Lifetime = 20.000 seconds
BPDU:Root Hello Time = 20.000 seconds
BPDU:Forwarding Delay = 15.000 seconds
BPDU:
DLC: Frame Padding =7 btyes 填充
LSB least significant bit 最低有效位
MSB most significant bit 最高有效位
RP root port
DP designated port
N-DP nondesignated port
hello 时间默认为2秒 配置为1-10秒之间的某个数值
forwarding delay 默认为15秒 可以配置为 4-30秒
当网络拓朴处于过渡期的时候,将不传递任何用户数据
MAC地址分配和缩减
Catalyst 交换机MAC地址池最多可以支持1024个MAC地址
交换机型号决定了可用MAC地址的数目,并不是所有交换机都支持1024个MAC地址
最后一个MAC地址分配给supervisor engine 的带内管理接口 sc0
如果交换机所拥有的MAC地址数目少于所支持的VLAN数目,那么MAC地址缩减就支持4094个STP实例。
系统ID扩展 system id extension
|------------------------16bit-----------------|------------------------48bit---------------------------------|
| 优先级 | MAC地址 |
|----4bit------|----------12bit----------------|-----------------------48bit---------------------------------|
优先级 系统ID扩展 MAC地址
如果启用MAC地址缩减特性,网桥优先级就成为了4096的倍数加上VLAN ID。
0 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248
57344 61440
catalyst 交换机上STP 默认模式是PVST+,PVST+ 模式为每一个VLAN 运行一个STP实例
switch# conf t
switch(config)# spanning-tree vlan 100
switch(config)#spanning-tree vlan 100 priortiy 4096
switch(config)#spanning-tree vlan 100 root primary
switch(config)#spanning-tree vlan 100 root secondary
我们建议给跟网桥指定的根优先级值是4096
通过手工配置优先级,可以为根网桥和辅助跟网桥获得确定性的优先级数值。是推荐的做法
接口介质决定了生成树端口路径开销的默认值
switch(config)# interface fastethernet 1/4
switch(config-if)#spanning-tree cost 10
switch(config)#interface fastethernet 1/5
switch(config-if)# switchport trunk encapsulation dot1q
switch(config-if)#switchport mode trunk
swtich(config-if)#spanning-tree vlan 10 cost 20
2950#show spanning-tree vlan 68
Spanning tree 68 is executing the IEEE compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 0007.eb7c.4a84
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set, changes 7
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Interface Fa0/1 (port 7) in Spanning tree 68 is down
Port path cost 100, Port priority 128
Designated root has priority 32768, address 0007.eb7c.4a84
Designated bridge has priority 32768, address 0007.eb7c.4a84
Designated port is 7, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 0, received 0
Interface Fa0/7 (port 13) in Spanning tree 68 is FORWARDING
Port path cost 19, Port priority 128
Designated root has priority 32768, address 0007.eb7c.4a84
Designated bridge has priority 32768, address 0007.eb7c.4a84
Designated port is 13, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 274349, received 0
Interface Fa0/23 (port 29) in Spanning tree 68 is FORWARDING
Port path cost 19, Port priority 128
Designated root has priority 32768, address 0007.eb7c.4a84
Designated bridge has priority 32768, address 0007.eb7c.4a84
Designated port is 29, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 274360, received 0
2950#show spanning-tree brief
VLAN68
Spanning tree enabled protocol IEEE
ROOT ID Priority 32768
Address 0007.eb7c.4a84
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address 0007.eb7c.4a84
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Port Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
------- ------- ---- ---- --- ---- -------------- -------
Fa0/1 128.7 128 100 BLK 0 0007.eb7c.4a84 128.7
Fa0/7 128.13 128 19 FWD 0 0007.eb7c.4a84 128.13
Fa0/23 128.29 128 19 FWD 0 0007.eb7c.4a84 128.29
2950# show spanning-tree vlan 68 interface fastEthernet 0/7
Spanning tree 68 is executing the IEEE compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 0007.eb7c.4a84
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set, changes 7
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Interface Fa0/7 (port 13) in Spanning tree 68 is FORWARDING
Port path cost 19, Port priority 128
Designated root has priority 32768, address 0007.eb7c.4a84
Designated bridge has priority 32768, address 0007.eb7c.4a84
Designated port is 13, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 274711, received 0
show spanning-tree [bridge-group| active | backbonfast| {bridge [ id ]} | detail | inconsistentports |
{interface interface-type number} | root | summary [total] | uplinkfast | {vlan vlan-id}| port-channel
number} | pathcost method]
Changeing the Spanning-Tree Mode
switch# configure termianl
switch(config)#spanning-tree mode pvst
switch(config)#spanning-tree mode mst
switch(config)#spanning-tree mode rapid-pvst
pvst to enable pvst+ (the default setting)
mst to enable MSTP (and RSTP)
rapid-pvst to enable rapid PVST+
switch#show spanning-tree summary
switch#show spanning-tree interface interface-id
switch(config)#no spanning-tree vlan vlan_id
switch#show spanning-tree detail
switch(config)#spanning-tree vlan vlan_id root primary [diameter net-diameter[hello-time seconds]
For diameter net-diameter, specify the maximum number of switches between any two end stations.The range is 2 to 7.
For hello-time seconds,specify the interval in seconds between the generation of configuration messages by the root switch.The range is 1 to 10; the default is 2.
switch(config)#spanning-tree vlan vlan-id root secondary [diameter net-diameter [hello-time seconds]]
switch(config)#interface interface-id
switch(config-if)#spanning-tree port-priority priority
switch(config-if)#spanning-tree vlan vlan_id port-priority priority
switch#show spanning-tree interface interface-id
switch#show spanning-tree vlan vlan_id
switch(config)#spanning-tree vlan vlan_id hello-time seconds
switch(config)#spanning-tree vlan vlan_id forward-time seconds
switch(config)#spanning-tree vlan vlan_id max-age seconds
switch(config)#spanning-tree vlan vlan_id hold-count value
switch#show spanning-tree active
displays spanning-tree information on active interface only.
switch#show spanning-tree detail
displays a detailed summary of interface information
switch#show spanning-tree interface interface-id
switch#show spanning-tree summary [total]
STA spanning-tree Algorithm
hello time 2 second
01-80-c2-00-00-00
TCN topoolgy change notification
DLC--------DLC Header-----------
DLC:
DLC: Frame 15 arrived at 11:02:20:8523:frame size is 60(003c)bytes.
DLC: Destination=Mulitcast 0180c2000000, Bridge_Group_Addr 2层多播地址
DLC: Source=station cisco 7A009A6 发送端口MAC地址
DLC: 802.3length = 39 长度
DLC
LLC:---------LLC Header------------
LLC:
LLC: DSAP Address = 42, DSAP IG Bit=00 (individual address) 0x42 代表 BPDU
LLC: SSAP Address = 42, SSAP CR Bit= 00 (command) 0x42 代表 BPDU
LLC: unnumbered frame:UI
LLC:
BPDU:-------Bridge Protocol Data Unit Header-------------
BPDU:Protocol identifier = 0000 0 协议ID
BPDU:Protocol Version = 00 0 STP 为0 RSTP 2
BPDU:
BPDU: BPDU Type = 00 (configuration) 00 配置BPDU 80 TCN BPDU
BPDU:
BPDU:BPDU Flags = 00 LSB = TC 标记 MSB=TCN 标记
BPDU:0... .... = Not Topology Change Acknowledgement
BPDU:.... ...0 = Not Topology Change
BPDU:000 000. = Unused
BPDU:
BPDU:Root identifier= 8000.004000BA009A2 根网桥ID
BPDU:Priority = 8000 优先级
BPDU:MAC Address = 00400BA009A2 MAC地址
BPDU:
BPDU:Root Path Cost = 0 根路径成本
BPDU:Sending Bridge id = 8000.00400BA009A2.8005 发送网桥ID
BPDU:Priority = 8000 发送网桥优先级
BPDU:MAC Address = 0040BA009A2 发送网桥MAC
BPDU:Port = 8005 端口ID
BPDU:Message Age =0.000 seconds 自根发出BPDU之后的时间
BPDU:Information Lifetime = 20.000 seconds
BPDU:Root Hello Time = 20.000 seconds
BPDU:Forwarding Delay = 15.000 seconds
BPDU:
DLC: Frame Padding =7 btyes 填充
LSB least significant bit 最低有效位
MSB most significant bit 最高有效位
RP root port
DP designated port
N-DP nondesignated port
hello 时间默认为2秒 配置为1-10秒之间的某个数值
forwarding delay 默认为15秒 可以配置为 4-30秒
当网络拓朴处于过渡期的时候,将不传递任何用户数据
MAC地址分配和缩减
Catalyst 交换机MAC地址池最多可以支持1024个MAC地址
交换机型号决定了可用MAC地址的数目,并不是所有交换机都支持1024个MAC地址
最后一个MAC地址分配给supervisor engine 的带内管理接口 sc0
如果交换机所拥有的MAC地址数目少于所支持的VLAN数目,那么MAC地址缩减就支持4094个STP实例。
系统ID扩展 system id extension
|------------------------16bit-----------------|------------------------48bit---------------------------------|
| 优先级 | MAC地址 |
|----4bit------|----------12bit----------------|-----------------------48bit---------------------------------|
优先级 系统ID扩展 MAC地址
如果启用MAC地址缩减特性,网桥优先级就成为了4096的倍数加上VLAN ID。
0 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248
57344 61440
catalyst 交换机上STP 默认模式是PVST+,PVST+ 模式为每一个VLAN 运行一个STP实例
switch# conf t
switch(config)# spanning-tree vlan 100
switch(config)#spanning-tree vlan 100 priortiy 4096
switch(config)#spanning-tree vlan 100 root primary
switch(config)#spanning-tree vlan 100 root secondary
我们建议给跟网桥指定的根优先级值是4096
通过手工配置优先级,可以为根网桥和辅助跟网桥获得确定性的优先级数值。是推荐的做法
接口介质决定了生成树端口路径开销的默认值
switch(config)# interface fastethernet 1/4
switch(config-if)#spanning-tree cost 10
switch(config)#interface fastethernet 1/5
switch(config-if)# switchport trunk encapsulation dot1q
switch(config-if)#switchport mode trunk
swtich(config-if)#spanning-tree vlan 10 cost 20
2950#show spanning-tree vlan 68
Spanning tree 68 is executing the IEEE compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 0007.eb7c.4a84
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set, changes 7
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Interface Fa0/1 (port 7) in Spanning tree 68 is down
Port path cost 100, Port priority 128
Designated root has priority 32768, address 0007.eb7c.4a84
Designated bridge has priority 32768, address 0007.eb7c.4a84
Designated port is 7, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 0, received 0
Interface Fa0/7 (port 13) in Spanning tree 68 is FORWARDING
Port path cost 19, Port priority 128
Designated root has priority 32768, address 0007.eb7c.4a84
Designated bridge has priority 32768, address 0007.eb7c.4a84
Designated port is 13, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 274349, received 0
Interface Fa0/23 (port 29) in Spanning tree 68 is FORWARDING
Port path cost 19, Port priority 128
Designated root has priority 32768, address 0007.eb7c.4a84
Designated bridge has priority 32768, address 0007.eb7c.4a84
Designated port is 29, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 274360, received 0
2950#show spanning-tree brief
VLAN68
Spanning tree enabled protocol IEEE
ROOT ID Priority 32768
Address 0007.eb7c.4a84
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address 0007.eb7c.4a84
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Port Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
------- ------- ---- ---- --- ---- -------------- -------
Fa0/1 128.7 128 100 BLK 0 0007.eb7c.4a84 128.7
Fa0/7 128.13 128 19 FWD 0 0007.eb7c.4a84 128.13
Fa0/23 128.29 128 19 FWD 0 0007.eb7c.4a84 128.29
2950# show spanning-tree vlan 68 interface fastEthernet 0/7
Spanning tree 68 is executing the IEEE compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 0007.eb7c.4a84
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set, changes 7
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Interface Fa0/7 (port 13) in Spanning tree 68 is FORWARDING
Port path cost 19, Port priority 128
Designated root has priority 32768, address 0007.eb7c.4a84
Designated bridge has priority 32768, address 0007.eb7c.4a84
Designated port is 13, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 274711, received 0
show spanning-tree [bridge-group| active | backbonfast| {bridge [ id ]} | detail | inconsistentports |
{interface interface-type number} | root | summary [total] | uplinkfast | {vlan vlan-id}| port-channel
number} | pathcost method]
Changeing the Spanning-Tree Mode
switch# configure termianl
switch(config)#spanning-tree mode pvst
switch(config)#spanning-tree mode mst
switch(config)#spanning-tree mode rapid-pvst
pvst to enable pvst+ (the default setting)
mst to enable MSTP (and RSTP)
rapid-pvst to enable rapid PVST+
switch#show spanning-tree summary
switch#show spanning-tree interface interface-id
switch(config)#no spanning-tree vlan vlan_id
switch#show spanning-tree detail
switch(config)#spanning-tree vlan vlan_id root primary [diameter net-diameter[hello-time seconds]
For diameter net-diameter, specify the maximum number of switches between any two end stations.The range is 2 to 7.
For hello-time seconds,specify the interval in seconds between the generation of configuration messages by the root switch.The range is 1 to 10; the default is 2.
switch(config)#spanning-tree vlan vlan-id root secondary [diameter net-diameter [hello-time seconds]]
switch(config)#interface interface-id
switch(config-if)#spanning-tree port-priority priority
switch(config-if)#spanning-tree vlan vlan_id port-priority priority
switch#show spanning-tree interface interface-id
switch#show spanning-tree vlan vlan_id
switch(config)#spanning-tree vlan vlan_id hello-time seconds
switch(config)#spanning-tree vlan vlan_id forward-time seconds
switch(config)#spanning-tree vlan vlan_id max-age seconds
switch(config)#spanning-tree vlan vlan_id hold-count value
switch#show spanning-tree active
displays spanning-tree information on active interface only.
switch#show spanning-tree detail
displays a detailed summary of interface information
switch#show spanning-tree interface interface-id
switch#show spanning-tree summary [total]
相关文章推荐
- STP RSTP MSTP PVST+学习 (3)
- STP RSTP MSTP PVST+学习 (1)
- STP RSTP MSTP PVST+学习 (1)
- STP、RSTP、PVST&PVST+、MSTP
- STP、RSTP、PVST&PVST+、MSTP
- Cisco 交换机 STP、RSTP、PVST&PVST+、MSTP
- 生成树协议(STP PVST CST RSTP MSTP)笔记
- STP,RSTP,MSTP和链路聚合
- STP/RSTP/MSTP的分析与对比续
- STP,RSTP,MSTP比较
- stp Rstp Mstp
- 生成树协议(STP PVST CST RSTP MSTP)解析
- STP、RSTP、MSTP对比与分析
- STP、RSTP、MSTP
- H3C CLI基础笔记(交换机,STP/RSTP/MSTP)
- STP/RSTP/MSTP
- STP手动计算生成树以及STP\RSTP\MSTP的区别
- 关于STP、RSTP 和MSTP 说法正确的是
- STP 、RSTP 学习笔记
- MSTP与stp/rstp