STP RSTP MSTP PVST+ѧϰ (2)
2007-09-11 22:41:23
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ÃëÖ®¼äµÄij¸öÊýÖµ
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]
|



7layer
²©¿Íͳ¼ÆÐÅÏ¢
ÈÈÃÅÎÄÕÂ
×îÐÂÆÀÂÛ
ÓÑÇéÁ´½Ó