Spanning Tree Protocol
- The Spanning Tree Protocol (STP) is a network protocol that builds a logical loop-free topology for Ethernet networks.
- The basic function of STP is to prevent bridge loops and the broadcast radiation that results from them
- STP creates a spanning tree within a network of connected layer-2 bridges, and disables those links that are not part of the spanning tree, leaving a single active path between any two network nodes.
Bridge Protocol Data Units:
- The bridges have to determine the root bridge and compute the port roles (root, designated, or blocked) with only the information that they have
- To ensure that each bridge has enough information, the bridges use special data frames called Bridge Protocol Data Units (BPDUs) to exchange information about bridge IDs and root path costs.
- A bridge sends a BPDU frame using the unique MAC address of the port itself as a source address, and a destination address of the STP multicast address 01:80:C2:00:00:00.
- There are two types of BPDUs in the original STP specification[7]:63 (the Rapid Spanning Tree (RSTP) extension uses a specific RSTP BPDU):
- Configuration BPDU (CBPDU), used for Spanning Tree computation
- Topology Change Notification (TCN) BPDU, used to announce changes in the network topology
BPDUs are exchanged regularly (every 2 seconds by default) and enable switches to keep track of network changes and to start and stop forwarding at ports as require - When a device is first attached to a switch port, it will not immediately start to forward data. It will instead go through a number of states while it processes BPDUs and determines the topology of the network.
- When a host is attached such as a computer, printer or server the port will always go into the forwarding state, albeit after a delay of about 30 seconds while it goes through the listening and learning states (see below). The time spent in the listening and learning states is determined by a value known as the forward delay (default 15 seconds and set by the root bridge)
- However, if instead another switch is connected, the port may remain in blocking mode if it is determined that it would cause a loop in the network. Topology Change Notification (TCN) BPDUs are used to inform other switches of port changes. TCNs are injected into the network by a non-root switch and propagated to the root. Upon receipt of the TCN, the root switch will set a Topology Change flag in its normal BPDUs. This flag is propagated to all other switches to instruct them to rapidly age out their forwarding table entries.
STP switch port states:
- Blocking - A port that would cause a switching loop if it were active. No user data is sent or received over a blocking port, but it may go into forwarding mode if the other links in use fail and the spanning tree algorithm determines the port may transition to the forwarding state. BPDU data is still received in blocking state. Prevents the use of looped paths.
- Listening - The switch processes BPDUs and awaits possible new information that would cause it to return to the blocking state. It does not populate the MAC address table and it does not forward frames.
- Learning - While the port does not yet forward frames it does learn source addresses from frames received and adds them to the filtering database (switching database). It populates the MAC address table, but does not forward frames.
- Forwarding - A port receiving and sending data, normal operation. STP still monitors incoming BPDUs that would indicate it should return to the blocking state to prevent a loop.
- Disabled - Not strictly part of STP, a network administrator can manually disable a port
To prevent the delay when connecting hosts to a switch and during some topology changes, Rapid STP was developed, which allows a switch port to rapidly transition into the forwarding state during these situations.
Here's a definition. The term "wireless bridge" and the term "wireless mesh router" can either be used with the definition because at this level of consideration both technologies do the same thing:
A [wireless bridge / wireless mesh router] creates a Layer 2 connection to one or more other [wireless bridges / wireless mesh routers] to allow data to be passed between them. Links are transparent at the Data Link layer which means that devices on either side of the [wireless bridge / wireless mesh router] link have no awareness of the presence of the link. A client computer communicates to a server exactly as if it were hard-wired with CAT5 Ethernet cable. The [wireless bridge / wireless mesh router] link is transparent to any IP configuration in the network.
|
A mesh router link potentially provides greater redundancy because it assumes a certain degree of dynamic change in the environment. This could be as simple as creating a redundant path to use in the event of node failure or as elaborate as a mesh router on a passenger train maintaining a dynamic connection to a series of mesh routers installed at intervals along the railroad track. The mesh router automatically discovers new end-points and dynamically determines the best path between Point A and Point B. |
In general, a WDS bridge link assumes a relatively static configuration without significant redundancy. A bridge link is created by configuring the end-points with the correct MAC address of each one's adjacent peer. A bridge device does not automatically discover new end-points and, if an end-point fails, the bridge is unable to automatically locate a new, previously unconfigured, alternative path.
If bridge links were set up to create a circular set of connections a serious problem would occur. Broadcast traffic would be retransmitted from bridge to bridge, around in a circle, without stopping. This "bridging loop" would almost immediately bring the network to a complete standstill. There are two ways to avoid a bridging loop: 1) the network is manually configured without loops or 2) the bridges communicate to each other and detect the presence of loops. They then block the connections that would cause loops. The software mechanism and accompanying set of inter-bridge communications is called the Spanning Tree Algorithm ("STA"). It is an algorithm that considers "path cost" and computes the best path between two points while setting all other paths into "blocking mode" (so they don't forward any traffic). |
No comments:
Post a Comment