How does spanning tree calculate cost
The root path cost and message age inside a region stays constant, but the IST path cost is incremented and the IST remaining hops is decremented at each hop. Enter the show spantree mst command to display the information about the IST master, path cost, and remaining hops for the bridge.
A port that is connected to a nonbridging device for example, a host or a router is an edge port. A port that connects to a hub is also an edge port, provided that the hub or any LAN that is connected by it does not have a bridge. These ports start forwarding as soon as the link is up. MST requires that all ports are configured for each host or router. To establish rapid connectivity after a failure, you need to block the nonedge-designated ports of an intermediate bridge.
If the port connects to another bridge that can send back an agreement, then the port starts forwarding immediately. Otherwise, the port requires twice the forward delay time to start forwarding again. You must explicitly configure the ports that are connected to the hosts and routers as edge ports while using MST.
Note To configure a port as an edge port, you enable PortFast on that port. You can establish rapid connectivity only on point-to-point links.
For correct operation of the protocol, you must explicitly configure ports to a host or router. However, cabling in most networks meets this requirement, and you can avoid explicit configuration by treating all full-duplex links as point-to-point links.
Enter the set spantree mst link-type command to configure point-to-point links. You can configure each MST bridge with a maximum hop count. The root bridge of the instance sends a BPDU or M-record with the remaining hop count that is equal to the maximum hop count. The bridge discards the BPDU M-record and ages out the information held for the port if the count reaches zero after decrementing. The nonroot bridges propagate the decremented count as the remaining hop count in the BPDUs M-records they generate.
The Message Age and Maximum Age timer settings in the RST portion of the BPDU remain the same throughout the region, and the same values are propagated by the region's designated ports at the boundary. This example shows the ports simulating PVST:.
In this case, the topology changes are only propagated in the instance to which the VLAN is mapped. Skewing occurs when the following occurs:.
The skew causes BPDUs to reflood the network to keep the spanning tree topology database current. The nonroot switches receive and process one BPDU during each configured time period. Spanning tree uses the Hello Time see the "Configuring the Hello Time" section to detect when a connection to the root switch exists through a port and when that connection is lost.
If BPDU skewing occurs, a syslog message is displayed. The number of syslog messages that are generated may impact the convergence of the network and the CPU utilization of the switch. New syslog messages are not generated as individual messages for every VLAN because the higher the number of syslog messages that are reported, the slower the switching process will be.
To reduce the impact on the switch, the syslog messages are as follows:. To set the spanning tree bridge priority for a VLAN, perform this task in privileged mode:. You can configure the port cost of switch ports. Ports with lower port costs are more likely to be chosen to forward frames. Assign lower numbers to ports that are attached to faster media such as full duplex , and higher numbers to ports that are attached to slower media. The possible range of cost is from The default differs for different media.
This example shows how to configure the port VLAN priority on a port and verify the configuration:. The port with the lowest priority value forwards frames for all VLANs. The possible port priority value is from The default is If all ports have the same priority value, the port with the lowest port number forwards frames. To configure the port priority for a port, perform this task in privileged mode:.
You can enter the set spantree defaultcostmode command to force all VLANs that are associated with all the ports to have the same path cost default set. For port speeds of 10 Gb and greater, you must set the default port cost mode to long. You can configure the port cost for a port on a per-VLAN basis. Ports with a lower port VLAN cost are more likely to be chosen to forward frames. You should assign lower numbers to ports that are attached to faster media such as full duplex and higher numbers to ports that are attached to slower media.
The default cost differs for different media. To configure the port VLAN cost for a port, perform this task in privileged mode:. The possible port VLAN priority range is from To configure the port VLAN priority for a port, perform this task in privileged mode:. The first line in the output displays the spanning tree mode:. If you want to use MISTP mode in your network, we recommend that you carefully follow the procedures that are described in the following sections in order to avoid loss of connectivity in your network.
When you change the spanning tree mode from one mode to another, the current mode stops, the information collected at run-time is used to build the port database for the new mode, and the new spanning tree mode restarts the computation of the active topology. Information about the port states is lost; however, all of the configuration parameters are preserved for the previous mode.
If you return to the previous mode, the configuration will still be there. Note MAC addresses are not displayed when you specify the keyword config. You can set 16 possible bridge priority values: 0, , , 12,, 16,, 20,, 24,, 28,, 32,, 36,, 40,, 45,, 49,, 53,, 57,, and 61, When forwarding frames, the switch is more likely to use ports with lower port costs. Assign lower numbers to ports that are attached to faster media such as full duplex and higher numbers to ports that are attached to slower media.
The possible range is from , This example shows how to configure the port cost on an MISTP instance and verify the configuration:. You can configure the port priority of switch ports. The possible port priority value is from ; the default is This example shows how to configure the port priority and verify the configuration:.
Ports with a lower instance cost are more likely to be chosen to forward frames. The possible value for port instance cost is from To configure the port instance cost for a port, perform this task in privileged mode:. The port with the lowest priority value for a specific MISTP instance forwards frames for that instance.
The possible port instance range is from If all ports have the same priority value for an MISTP instance, the port with the lowest port number forwards frames for that instance. This example shows how to configure the port instance priority on an MISTP instance and verify the configuration:.
You can enable a single MISTP instance, a range of instances, or all instances at once using the all keyword. Note Enter the active keyword to display active ports only. If you attempt to map a VLAN to more than one instance, all of its ports are set to blocking mode.
When only one entry is printed or when all the entries are associated to the same instance, the VLAN is mapped to that instance. To clear up the conflict, you must manually remove the incorrect mapping s from the root switch.
The remaining entry on the list becomes the official mapping. The Time Left timer shows the time in seconds left before the entry will expire and be removed from the table. The timer is restarted every time an incoming BPDU confirms the mapping. Entries pertaining to the root switch show inactive on the root switch itself. The following examples are with VTP version 3 enabled.
The root switch is also the primary server for the nonroot switch. The root switch is not the primary server for the switch in conflict, because that switch has been partitioned. This example is from the switch in conflict note that the switch is inactive :. When the switch is in MISTP mode, you disable spanning tree on an instance, not for the whole switch. This section explains how to configure a primary root switch and a secondary root switch, and how you can prevent a switch from becoming a root switch by using root guard.
Enter the set spantree root command to lower the bridge priority the value that is associated with the switch below the default 32, ; the switch can then become the root switch. As per the standard, we can see the ceiling of the configurable port cost has been raised from 65, to ,, in more recent IOS releases:.
Therefore in they recommended a non linear relationship between Data rates and link costs while maintaining backwards compatibility with the original specification". Have you been looking for a better way to model your network infrastructure? Check out what we're doing with NetBox!
Open source and widely extensible, NetBox has enabled thousands of organizations to automate their networks like never before possible. The path with the lowest cost will be used to reach the root bridge. In the BPDU you can see a field called root path cost. This is where each switch will insert the cost of its shortest path to the root bridge.
Once the switches found out which switch is declared as root bridge they will look for the shortest path to get there. BPDUs will flow from the root bridge downwards to all switches. SW2 will use the direct link to SW1 as its root port since this is a Mbit interface and has a cost of If you like to keep on reading, Become a Member Now!
Here is why:. Scott Switch show spanning-tree bridge detail If this switch is using the long method then this value will show 32 bit.
A good reference for this information on STP configuration on Juniper switches can be found in this book. Therefore, I think that most organizations might want to hold-off on using this command until the organization can validate that this command is universally supported on all their LAN switches. If you are in a multi-vendor LAN switched environment then you should definitely take inventory on which switches are using the bit values or bit values.
Therefore, if you plan on migrating to long-mode then you should do it on all switches within your layer-2 LAN switch domain at the same time during a carefully orchestrated change window.
I am curious if any of you are using the longer STP path costs and what other issues should we consider as data center link speeds increase. Scott Hogg is a co-founder of HexaBuild. Here are the latest Insider stories. More Insider Sign Out. Sign In Register. Sign Out Sign In Register. Latest Insider.
0コメント