Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 13 of 25

Using the Cisco Aironet 340 Series Wireless Bridges: Using the Spanning-Tree Protocol, pages 99 to 108

Pages 99 to 108 of 218, from Using the Cisco Aironet 340 Series Wireless Bridges

The original document is the PDF (1.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Cisco 340 Bridge

Page 99

Chapter 8 - Using the Spanning Tree Protocol

8 CHAPTER 8

Using the Spanning-Tree Protocol This chapter describes how to configure the Aironet 340 Series Bridge for use with the Spanning Tree Protocol (STP) Protocol. Here’s what you’ll find in this chapter:

n

Overview n

Understanding Loops n

How STP Protocol Works n

Receiving Configuration Messages n

Determining the Root Bridge, Root Cost, and Spanning Tree n

Understanding Bridge Failures n

Avoiding Temporary Loops n

Establishing Timeouts n

Node Aging Addressing n

Implementing the STP Protocol

Page 100

8 - 2 Aironet 340 Series Bridge

Overview STP is used to remove loops from a bridged LAN environment. The Aironet 340 Series Bridge implements the IEEE 802.1d Spanning Tree Protocol (STP) specification to manage multiple bridges in an extended LAN environment. This allows the Aironet 340 Series Bridge to be used in bridged infrastructures with other 802.1d compliant bridges. The protocol also allows the bridges in an arbitrarily connected infrastructure to discover a topology that is loop free (a tree) and make sure there is a path between every pair of LANs (a spanning tree). If you are administering a multiple-bridge infrastructure, this Chapter explains how the protocol works. However, if your infrastructure consists of a single bridge you can operate with the default values, although it might not be the optimal configuration required.

Page 101

Using the Spanning-Tree Protocol 8 - 3

Understanding Loops If there is more than one path from one LAN to another, the infrastructure contains a loop. Figure 8.1 - Example Loop on a Bridge Infrastructure

Node A

LAN 1

Bridge 1

Bridge 2

LAN 2

If Node A transmits a multicast packet, both Bridge 1 and Bridge 2 will try and forward the packet to LAN 2. Each bridge, on seeing the other’s transmission on LAN 2, will forward the packet back to LAN 1. The cycle will continue and the packet will loop forever taking up all of the bandwidth of the bridges. Topologies containing loops may be more complicated. For example, if Bridge 2 was replaced by two bridges with a LAN between them, the effect would still be the same.

Page 102

8 - 4 Aironet 340 Series Bridge

How STP Protocol Works The STP protocol works by having the bridges transmit special configuration messages to each other. The messages contain enough information to allow the bridges to:

n

Elect a single bridge. A single bridge is selected, from all the bridges on all the LAN, to be the root bridge. Each bridge then calculates the distance of the shortest path to the root bridge.

n

Elect a designated bridge (for each LAN). A bridge from all the bridges residing on the LAN will be selected. This bridge will be closest to the root bridge.

n

Select its own port to be root port.This bridge has the best path to the root bridge.

n

Select ports are to be included in the spanning tree. Ports are included if they are a root port or the bridge itself has been selected as the designated bridge for the port’s LAN.

Any ports not included in the spanning tree will be blocked and any data received from its LAN will be discarded. The bridge will not forward any traffic to this port.

Receiving Configuration Messages Configuration messages contain four main fields.

n

The Bridge ID of the root bridge. This is called the root ID. A bridge’s ID consists of a 16 bit priority value appended with the infrastructure address of the bridge. The infrastructure address of the bridge is usually the address of one of the bridge’s ports.The priority value is assigned by the operator with a default value of 8000 hex.

n

The Bridge ID of the transmitting bridge.

n

The cost of the path from the transmitting bridge to the root bridge.

n

The port ID of the port on which the message was transmitted.The ID is made up of an 8 bit priority value appended with an 8 bit port number assigned to the port by the bridge. The priority value is assigned by the operator with a default value of 80 hex.

Page 103

Using the Spanning-Tree Protocol 8 - 5

Each bridge starts by assuming it is the root and its root cost is 0. When a bridge receives a configuration message, it records the values only if the message received is better than the message it would transmit out the port. For example, message C1 is better than C2:

n

If the root ID in C1 has a lower numeric value than the value from C2.

n

If the root ID’s are equal and C1’s root cost is lower.

n

If the root ID’s and costs are equal and C1’s transmitting Bridge ID has a lower numeric value.

n

If the root ID, cost, and Bridge ID are equal and C1 was transmitted on a port with a lower port ID. This should only occur if two ports from the same bridge are connected to the same LAN.

If a port receives a better message than the one it would transmit, the bridge stops transmitting configuration messages on that port. Only one port on each LAN will be transmitting the messages. The bridge that contains this port is called the designated bridge for that LAN and the port is called the designated port.

Determining the Root Bridge and Root Cost Each bridge determines the root bridge’s ID by comparing its own ID with those from the best messages received on all of its ports. The root ID is then used in all transmitted configuration messages. If a bridge is the root, its root cost is 0. If a bridge is not a root, its cost is the minimum of the costs received in the messages from all its ports as well as the cost from the port on which the minimum cost message was received. This cost is then used in all transmitted configuration messages. The port on which the minimum cost message was received is called the root port.

Page 104

8 - 6 Aironet 340 Series Bridge

Determining the Spanning Tree 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.

Understanding Bridge Failures All root and blocked ports monitor the LANs to which they are connected and watch for configuration messages transmitted by the designated bridge for the LAN. The STP protocol specifies a timeout period in which these ports must see at least one message. Each time a message is received, the timer is restarted. If the timeout period expires, the bridge assumes the designated bridge has failed. The bridge will discard the saved value for the port, make the port the designated port for that LAN, and restart sending configuration messages. The bridge will also recalculate its values for the root bridge and root cost based on the active ports. Other blocked ports on the same LAN will timeout and start to transmit messages. Eventually a new designated bridge, port, and root bridge will be determined.

Avoiding Temporary Loops It will take a non-zero amount of time for the protocol to determine a stable loop free topology due to the time for messages to pass from one end of the infrastructure to the other. If the ports were allowed to forward 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. They must first go through a state called listening. In this state, they may receive and transmit configuration messages as needed but must block all data traffic. The time spent in the listening state must be at least twice the end-to-end transmit time of the infrastructure.

Page 105

Using the Spanning-Tree Protocol 8 - 7

If the port is still part of the spanning tree at the end of the listening period it is put in the learning state. In this state it can still receive and transmit configuration messages, but is also allowed to learn the source addresses from the packets received from its LAN. It is still not allowed to forward any packets. The learning state is used to lessen 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.

Establishing Timeouts The configured timeout values on the root bridge are passed to each bridge in a configuration message to ensure that all bridges on the infrastructure are using the same timeout periods. The root bridge puts its own values in its messages. All other bridges copy the values contained in the configuration message sent to them from their root port. The value in this message is used in all of the bridge’s transmitted messages. Using this method, the values are propagated throughout the infrastructure.

Node Address Aging Occasionally stations may be moved from one LAN to another. The bridges will remove learned addresses from their tables if no packets have been received from a node for a period of time. If node addresses do not timeout, the bridge may continue to send packets for a node to the wrong LAN. If a node sends packets from its new LAN location, the tables might be corrected, however, this is not guaranteed. The default timeout period is 5 minutes. If a new bridge or port is added to an infrastructure, the ports included in the spanning tree could change dramatically. It may appear that a node has changed location very quickly. To allow for these quick changes of location, the spanning tree protocol specifies that every time a port enters the blocked or forwarding states, its bridge must send a topology changed message to the root bridge.

Page 106

8 - 8 Aironet 340 Series Bridge

The root bridge in turn will include a flag in all the configuration messages it sends.This flag will be propagated through the infrastructure by all the other bridges. After a time period the root bridge will clear the flag. This instructs all bridges to return to the normal aging timeout.

Implementing STP Protocol The STP protocol is implemented on the Aironet 340 Series Bridge as follows.

n

Each root bridge, with all of its repeaters, looks to other bridges in the infrastructure as a single multi-port bridge with a bridge address equal to the infrastructure address of the root bridge.

n

The STP protocol runs only on the root bridge, not on repeaters. Repeaters only transmit packets or change state on commands from the root bridge.

n

To reduce radio traffic, the repeaters will continue to transmit configuration messages at the timeout period without having to be told to transmit each one by the root bridge. They will also only send received configuration messages back to the root bridge if they are different from the previously received message.

n

When a repeater is not associated to a parent bridge, it will put its LAN port in the blocked state and will not forward any data to or from the port. Once associated, the root bridge will take control.

n

The protocol parameters are all configured from the root bridge. The local port parameters are configured on each repeater bridge.

Page 107

Using the Spanning-Tree Protocol 8 - 9

Using the Configuration STP Menu (Root Bridge Only) The STP Protocol for a root bridge is configured using the Configuration STP Menu. This menu will only appear if the Root Mode is “On” as described in Chapter 4 “Configuring the Radio Network”. To access this menu, select Configuration from the Main Menu, then select STP from the Configuration Menu. Configuration Stp Menu Option

Value

Description

1 - Active

[ off

]

- Protocol enabled

2 - Bridge

[ menu

]

- Bridge parameters

3 - Port

[ menu

]

- Port parameters

4 - Display 5 - State

- Protocol status [ "Forward" ]

- Local ethernet port state

Enabling STP Protocol (Active) The active option acts as an On/Off switch for the STP protocol. The default setting is “Off”, which means all root and repeater LAN ports are placed in the forwarding state. If the option is turned “On”, the root and repeater LAN ports are placed in the listening state. If you are running a small infrastructure, and there will never be any loops, leave the STP protocol “Off”. If you are unsure, change the setting to “On” as the overhead involved for bridges is small.

Setting Bridge Parameters (Bridge) The bridge option allows you to set the overall parameters and timeout values for a root bridge. When the bridge option is selected, the Configure STP Bridge Menu appears. Configuration Stp Bridge Menu Option

Value

Description

1 - Priority

[ 8000 ]

- Bridge priority

2 - Hello_time

[

2

]

- Hello message interval

3 - Forward_delay

[

15

]

- Forwarding delay

4 - Msg_age_timeout

[

20

]

- Receive hello message timeout

Page 108

8 - 10 Aironet 340 Series Bridge

Setting the Bridge Priority (Priority) The priority option is used to set the priority value appended to the infrastructure address of the Bridge ID. By changing the priority value, you 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 (8000 hex), a bridge set with a lower value will become the root.