The classic "Cisco Lan Switching" chapter sixth (12): Deterministic Root Bridge Placement

Source: Internet
Author: User

"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 "


based on the previous discussion, you should agree that it is necessary to set up your root bridge with certainty. In fact, you should always set more than one root bridge . One for the main, in addition is in the main fault is as backup used. If your bridge network is really big, you may need to set up a third root bridge in case the first and second failures occur. This section takes a look at how to determine the location of the root bridge in the network, and please read the seventh chapter on the considerations and recommendations for placing the device location. There are two useful tips when setting up a root bridge:
    • Set Spantree Priority command
    • Set Spantree root command

manually arranging the root bridge:set Spantree priorityto force a bridge to win in the root bridge election, you need to be sure that the bid is smaller than all the other bridges. A method can be a modifier MAC address, but this is too ugly (believe me!). ), a simpler approach is to modify the bridge priority. Because the bid 16 bits is the bridge priority, lowering the priority even if one number (from 32768 to 32767) will cause the bridge to defeat all other bridges that use the default value in the election .
The bridge priority is controlled by the command set Spantree proority . The command syntax is:
  set spantree priority  &NBSP;   < Span style= "Background-color:inherit" >priority [VLAN]   
Although the VLAN parameter is optional, I recommend that you have a good habit of always entering it (in order to prevent you from accidentally modifying VLAN 1 one day when you intended to modify a VLAN). In the following we will discuss the VALN parameter in detail and now assume that all are using VLAN 1. Tips:almost all spanning tree set and show commands support an optional VLAN parameter. If you omit this argument, the default is VLAN 1. Even if you only use VLAN 1, you have a good habit of entering this parameter, which avoids accidentally modifying or viewing the wrong VLAN.
assuming that you want Cat-4 to be the root bridge, you should telnet to the switch and enter:
Set Spantree Priority 100 1
in VLAN 1 lower priority 100, yes Cat-4 always beats other switches that use the default value of 32769 (including MGS for Lower MAC addresses). But what happens if the Cat-4 fails? Do you want MGS to continue to be the root bridge? Obviously not, enter the following on the Cat-2 to make it the second root bridge of the backup:
Set Spantree Priority 200 1
once the Cat-4 fault is lifted, Cat-2 will not win the election again. But once Cat-4 died, Cat-2 took over the work of the Root bridge. Tips: Notice that I give the primary root bridge a priority value of 100 and a secondary root bridge of 200. I found these numerical numbering conventions useful in practical applications, and it is recommended that you adopt this usage as well. This setting is easy to understand and, more important, easy to remember. For example, when you use the show command to find that your current root bridge has a priority of 200, you will immediately know that the primary root bridge has failed. This scenario is also useful for discussing load balancing topics later.
Using Macros:set spantree root starting with the Catalyst NMP version 3.x, Cisco introduced a very powerful macro that automatically calculates the bridge priority and other values. The full syntax of the macro is as follows:
< Span style= "BACKGROUND-COLOR:INHERIT; font-size:14px ">set spantree Root   [secondary ] [ vlan_list  ] [dia   network_diameter  ] [hello   hello_time  ]  
to make a catalyst switch a root bridge in VLAN 1, the device on the Telnet connection enters the following:
set spantree root 1   
This allows the catalyst to check the current bridge priority of the root bridge, and if the value is greater than 8192, the macro set Spantree root will set the local bridge priority to 8192 if the current root bridge is less than 8192. The macro will set the priority value of the local bridge to 1 less than the current root bridge priority level. For example, if the current root bridge uses the bridge priority, setspantree root sets the local bridge priority to 99. Note:The document argues that if 8192 is not small enough to become the root bridge, set spantree root Sets the priority to a value that is 100 smaller than the current priority level. But I often set the value to only decrease by 1. in order to have another bridge as the backup root bridge, telnet to the device and enter the following:
Set Spantree root 1 secondary
This causes the current Catalyst Bridge priority to be set to 16384. Because the value is greater than the priority of the primary root bridge and is less than the default value of 32768. This is a simple and efficient way to provide a root bridge failure backup. The DIA and hello parameters can automatically adjust the STP timer value with the recommendations listed in 802.1D. A detailed discussion of the coordination of STP timer values is in the seventh chapter "Fast STP Convergence" section. That doesn't seem very important, actually. Set Spantree root is not a normal command-it is a macro that affects other commands. In other words, Set Spantree root does not appear in the command result of Show config . For example, you run a macroset Spantree root 1, assuming that the current root bridge priority is greater than 8192, the macro automatically executes the set spantree priorities 1 8191 command. After the command set Spantree priority is written to NVRAM, there are no signs of using macros.
despite Set Spantree root is just a macro, but do not let you foolishly think that it is "superfluous worthless stuff". Instead, using the set Spantree root macro has more advantages than using commands:
    • It's easier to use.
    • So you don't have to memorize too much grammar
    • Setspantree root is more secure than setting the timer manually if you need to coordinate the timer frequently, because it automatically calculates the value based on 802.1D recommendations. More detailed information on timer coordination is found in chapter seventh, "Fast Convergence" section.

The classic "Cisco Lan Switching" chapter sixth (12): Deterministic Root Bridge Placement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.