6.4 Spanning Tree Protocol

 < Day Day Up > 



For an Ethernet network to function properly, only one active path can be present between two stations. To ensure that this happens, a link management protocol must be used to prevent the occurrence of undesirable loops in the network. At the same time, there must be path redundancy in the network to ensure that a bridge does not become isolated due to the failure of the primary link. Both of these requirements are handled by the Spanning Tree Protocol (STP).

In multibridge environments, the STP is used to remove loops on the network. If a loop exists, there is the possibility for duplication of messages. When loops occur, some bridges see stations appear on both of its sides, confusing the forwarding algorithm and allowing duplicate frames to be forwarded.

To provide path redundancy, the STP defines a tree that spans all bridges in an extended network and then forces certain redundant data paths into a standby (blocked) state. If one network segment becomes unreachable, the spanning-tree algorithm reconfigures the spanning-tree topology and reestablishes the link by activating the standby path.

STP is a standard feature in conventional bridges used on cabled LANs, but it is just as applicable in wireless LANs. In essence, STP allows the bridges in an arbitrarily connected infrastructure to discover a topology that is loop free and ensures that there is an active and standby path between every pair of LANs.

STP works by having the bridges transmit special configuration messages to each other called BPDUs, which contain information about the transmitting bridge and its ports, including bridge and port MAC addresses, bridge priority, port priority, and port cost. [1] The STP uses this information to do the following:

  • Elect a single bridge from all the bridges on all the LANs to be the root bridge;

  • Find a bridge for each LAN that is closest to the root bridge;

  • Remove loops in the network by placing redundant bridge ports in a backup state.

All ports on a bridge, either the root port or the designated port for their LAN, are allowed to forward packets. All others are blocked and do not transmit or receive any data packets.

It may take some time for the protocol to determine a stable loop-free topology because of the time it takes for messages to pass from one end of the infrastructure to the other. If the ports were allowed to forward packets while the protocol was stabilizing, then temporary loops could form. To avoid temporary loops, ports are not allowed to go immediately from the blocked state to the forwarding state. Instead, the ports must first go through a “listening” state whereby they may receive and transmit configuration messages, but must block all data traffic. The amount of time spent in the listening state must be at least twice the end-to-end transmit time of the infrastructure.

If a port is still part of the spanning tree at the end of the listening period, it is put in the “learning” state, whereby it can still receive and transmit configuration messages, but it is also allowed to learn the source addresses from the packets received from its LAN. At this point, however, it is still not allowed to forward any packets. The learning state is used to decrease the amount of flooding of unknown destination addresses that would occur if the port started forwarding before there were any entries in its learning table. Once the learning period is over, the port is allowed to forward data normally.

Several parameters must be set in the bridge’s configuration utility to get STP working properly. With a small infrastructure consisting of a point-to-point wireless link between two units, there will never be any loops. In such cases, the STP can be set to “off.” If the network administrator is not really sure how many bridges are out there, there is no harm in changing the setting to “on” because the amount of overhead traffic between bridges is not that significant.

Priority This option is used to set the priority value appended to the infrastructure address of the bridge ID. By changing the priority value, the network administrator can influence which bridge in the infrastructure will become the root bridge. The lower the priority value, the more likely the bridge will be the root. If all other bridges are set to the default value, a bridge set with a lower value will become the root.

Hello time This option is used to set the interval time, in seconds, between transmitted configuration messages. This value is only used if the local bridge becomes the spanning tree root bridge. If not, the value contained in received configuration messages transmitted from the root bridge is used. If the interval time is set too high, the infrastructure will respond slowly in resolving any conflict problems; if set too low, the infrastructure will be congested with hello message traffic. The interval time values range between 1 and 10 seconds.

Forwarding delay This option is used to set the delay time, in seconds, that the ports will spend in the listening and learning states. This value is only used if the local bridge becomes the spanning tree root bridge. If not, the value contained in received configuration messages transmitted from the root bridge is used.

This option is also the timeout period used to age learned addresses whenever the spanning tree topology is changed. The value should be at least twice the transit time of a packet sent from one end of the infrastructure to the other. This allows for news of a topology change to reach all nodes and allows all ports to be blocked before new ports enter the forwarding state.

If the interval time is set too low, then temporary loops could be formed; if set too high, it will take longer for the infrastructure to become active after a spanning tree topology change has been made. The delay time values range between 4 and 30 seconds.

Message timeout This option is used to set the timeout period, in seconds, a blocked or root port watches for configuration messages from the infrastructure’s designated port. This value is only used if the local bridge becomes the spanning tree bridge. If not, the value received in configuration messages transmitted from the root bridge is used. Each time a configuration message is received, the timer is started. If the timer expires, the root bridge is assumed to have failed and the spanning tree infrastructure will be reconfigured.

If the timeout period is set too low, the spanning tree infrastructure may reconfigure itself unnecessarily and messages can be lost due to heavy traffic on the infrastructure. If set too high, the infrastructure will take longer than necessary to recover from failed ports or bridges. The upper limit on the allowed range is determined by the setting of the forwarding delay. The timeout period must be less than twice the forwarding delay, minus 1 second. Therefore, the timeout values range between 6 and 29 seconds.

Port This option is used to enable STP on the local port. The default setting is “on,” which allows all root bridge LAN ports to be initially placed in the listening state. If the option is turned “off,” the LAN ports are placed in the forwarding state. If the port’s LAN will always be connected to the bridge and loops will never occur, turning the protocol “off” will prevent the port from transmitting configuration messages on every timeout period.

Local port priority This option is only used when two or more repeaters are connected to the same LAN for redundancy and the network administrator wants to select which one will forward the packets. The port assigned the lowest priority value will be the one to forward.

Local port cost The value for the cost option is added to the root cost field from any received configuration messages to determine if the port has the least cost path to the root. The larger the cost value, the more likely the port will be a backup for another active port on its LAN. If there is no active port, it is likely the LAN will be a leaf of the infrastructure tree or a less-used LAN in the tree.

Ports of active connected repeaters The port, priority, and cost options are used to configure the ports of active and connected repeaters in the root’s radio tree. These parameters are the same as previously described, except that when the values are entered, the network administrator will be prompted for the applicable port number, which can be obtained from the port ID field on the configuration tool’s protocol status display screen.

Protocol status This display shows the overall status of the spanning tree protocol and the state of each port on the local bridge. Among the information that may be displayed from the status screen are the following:

  • Bridge ID: Shows the ID of the local bridge.

  • Root ID: Shows the ID of the spanning tree root. If the local bridge is not the root, then the cost to the root is also displayed.

  • Topology change: Shows whether the short aging timeout is currently in use because of a port state change somewhere on the infrastructure.

  • Network hello interval, network forward delay, and network message timeout: Shows the timeout values received from the root bridge in use by all bridges on the infrastructure. These values override any locally configured values.

  • Port address: Shows the infrastructure address of the bridge on which the port resides.

  • ID: Shows the port ID, which consists of the port priority and the port number. As each repeater connects to the root, its port is assigned the next available port number.

  • Cost: Shows the cost for the port as configured by the network administrator.

  • State: If used, shows the current state of the port—forward, learn, listen, or blocked.

  • Type: Shows the current port type as root, designated, or blocked.

  • Designated (bridge, port, root cost): Shows the designated bridge and port for the specific LAN, as well as the cost to the root from the designated port.

[1]The lower the port cost, the more likely the port will be chosen to forward frames. Usually, network managers will assign lower numbers to ports attached to faster media and higher numbers to ports attached to slower media. The default port cost is different for each media.



 < Day Day Up > 



LANs to WANs(c) The Complete Management Guide
LANs to WANs: The Complete Management Guide
ISBN: 1580535720
EAN: 2147483647
Year: 2003
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net