"Copyright notice: Original translation articles, translation level is limited, errors are unavoidable,The Translator is not responsible for the consequences of errors or omissions in the article, please be careful to reprint them. Reproduced please retain this statement and source: blog.csdn.net/shallnet, download the English version of the book "
The most important commands on the Catalyst platform switch for STP areShow Spantree。 Although this command provides many useful arguments, this section only discusses its basic syntax (see chapter seventh for a complete and detailed syntax). Example 6-1 is used for switch cat-b in Figure 6-6 ExampleShow SpantreeExample of command output.Example 6-1. Show Spantree Output from Cat-b in the Network shown in Figure 6-6
Example 6-1, show SpantreeThe output of the command can be decomposed into the following 4 parts:
- Current Switch / of the Network Bridge Global Statistics (2-4 rows)
- Root Bridge statistics (5-9 rows)
- Local bridge statistics (10-12 rows)
- Port statistics (13-16 rows)
The global statistics are displayed at the top of the screen. First line (VLAN 1This paragraph indicates that the output contains only VLAN 1 information, and the second line indicates that the STPCatalyst Platform SwitchesThe specified VLAN is already enabled, and this last line shows that STP is using the IEEE version (which cannot be changed on most switches in the Catalyst platform). For more detailed information about these at the end of this chapter "all of this Per vlan!" A section of the discussion. The first two lines of the root bridge statistics show that the current root bridge bid,bid field is displayed separately-designated RootThe display field has a low six-byte MAC address, andDesignate Root PriorityThe field is 2 bytes high,designed Root Costis the cumulative and path cost to the root bridge, which is the part of row four (designated Root Port) for the root port of the current device, the root bridge statistics section last behavior the timer value of the configuration above the current root bridge. As described in the previous section, these values are uniform across the network (at least VLAN 1). The term used here designated means that these values are bridge when considered to be the current relevant value of the root bridge, but because of the reason for the link change and propagation delay during network convergence, these values reactmay beis not really the statistics of the root bridge. The first two lines of the local bridge statistics section show the bid for the current bridge, and the third line shows the currently locally configured timer value. Tips:If the local bridge is not a root bridge, the timer value in the local bridge statistics is not used. Port Statistics at the bottom of the screen, depending on the number of ports displayed by the catalyst switch, you can use the more prompt to continue content that is not displayed on the display screen. The path overhead cost has a value and port counterpart on each port, and when a BPDU is accepted on that port, the cost value is added to the root root Path costing field, that is, when Cat-b receives a BPDU that is sent by the root bridge at a cost of 0 on PORT-1/1 the PORT-1/1 cost value of 19 is added to the 0 overhead value, which makes the designated Root cost value 19. In the export direction, Cat-b sends a BPDU with a cost value of 19, andthe PORT-1/2 's path cost value of 19 does not increase to the BPDU being sent. Tips:The command show spantree Displays the cost value in the port statistics that is added when BPDUs are received (not sent) on this port. The information displayed by the command show Spantree is important for learning how the spanning tree works on the network. For example, when you want to locate the root bridge is extremely useful, consider a network such as 6-14. Figure 6-14. Using Show Spantree to Locate the Root Bridge
Example 6-2 shows thethe output of the Cat-1 switch show spantree command VLAN 1 information .
cat-1 (enable) show spantree VLAN 1Spanning Tree enabledspanning tree Type ieeedesignated root 00-e0-f9-16-28-00designated root priority 100Designated Root cost 57Designated root Port 1/1root Max Age sec Hello Time 1 sec Forward Delay Secbridge ID MAC AD DR 00-e0-f9-af-5d-00bridge ID Priority 32768Bridge Max Age SEC Hello Time 2 sec Forward Delay secport Vl An port-state cost priority Fast-start Group-method------------------------------------------------------------- 1/1 1 Forwarding Disabled 1 blocking disabled |
Although this information indicates that the root bridge bid is 100.00-e0-f9-16-28-00, it is still very difficult to locate a switch in a large network that specifies that the Mac is 00-e0-f9-16-28-00. A lengthy and error-prone method is to list all the MAC addresses of all catalyst switches, and a more efficient way is to simply use the output of the show Spantree command and then make a judgment in the network until the root bridge is located. By looking at the designated root port domain, you can easily judge whether the root bridge is located somewhere out of Port PORT-1/1, by looking at our topology (or using the show CDP neighbor command), You can tell that the Cat-2 is the next hop for the switch port PORT-1/1. , and then use the show Spantree command as shown in example 6-3 after connecting to Cat-2 via Telnet.
Example 6-3 Locating the Root Bridge with show Spantree on Cat-2 for VLANShow Spantree VLAN 1Spanning Tree enabledspanning tree type ieeedesignated root 00-e0-f9-16-28-00designated root priority 100Designated root cost 38Designated root Port 2/2root Max Age sec Hello Time 1 sec Forward D Elay Secbridge ID MAC ADDR 00-e0-f9-1d-32-00bridge ID priority 32768Bridge Max Age sec Hello time 2 SE C Forward Delay secport Vlan port-state cost priority Fast-start group-method---------------- ---------------------------------------------2/1 1 forwarding disabled 2/2 1 forwarding disabled 2/3 1 blocking disabled
|
The root port of the Cat-2 is PORT-2/2, which determines the portPORT-2/2 adjacent Bridges (Cat-4), telnet to Cat-4 and use the show Spantree command, such as example 6-4
Example 6-4 Locating the Root Bridge with show Spantree on Cat-4 for VLAN 1Show Spantree VLAN 1Spanning Tree enabledspanning tree type ieeedesignated root 00-e0-f9-16-28-00designated root priority 100Designated root cost 19Designated root Port 2/1root Max Age sec Hello Time 1 sec Forward D Elay Secbridge ID MAC ADDR 00-e0-f9-52-ba-00bridge ID priority 32768Bridge Max Age sec Hello time 2 SE C Forward Delay secport Vlan port-state cost priority Fast-start group-method---------------- ---------------------------------------------1/1 1 forwarding disabled 1 forwarding disabled 2/1 1 forwarding disabled
|
Because the root port of the root bridge is PORT-2/1, you should continue to view Cat-3, as shown in example 6-5
Example 6-5 Locating the Root Bridge with show Spantree on Cat-3 for VLAN 1Show Spantree VLAN 1Spanning Tree enabledspanning tree type ieeedesignated root 00-e0-f9-16-28-00designated root priority 100Designated root cost 0Designated root Port 1/0root Max Age sec Hello Time 1 sec Forward De Lay ten Secbridge ID MAC ADDR 00-e0-f9-16-28-00bridge ID priority 100Root Max Age sec Hello time 1 SE C Forward Delay secport Vlan port-state cost priority Fast-start group-method---------------- ---------------------------------------------1/1 1 forwarding disabled 1/2 1 forwarding disabled
|
Multiple domains fully illustrate that Cat-3 is the root bridge:
- The root ports are port 1/0. Note that the catalyst 4000s,5000s,6000s is not labeled as a 1/0 physical port, and the NPM software uses a reference to the logical control port, SC0, as a "logical root port".
- Local bid and Root bridge bid match.
- Root Path Cost is 0.
- Timer value matches.
- All ports are in the forwarding state.
Look for the end--the root bridge is Cat-3.
The classic "Cisco Lan Switching" chapter sixth (eight): Mastering the show Spantree Command