Вы находитесь на странице: 1из 15

STP/RSTP Test Plan Sample Test Plans

Contents
Overview................................................................................................................. 3 1. Spanning Tree Conformance Test.....................................................................3 . Spanning Tree Root Bridge Election Functional Test.......................................7 3. Spanning Tree Loop Prevention Functional Test..............................................9 4. Spanning Tree Network Convergence Performance Test..............................11 References........................................................................................................... 15

Copyright 2005 Ixia. All rights reserved. The information in this document is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Ixia. Ixia assumes no responsibility or liability for any errors or inaccuracies that may appear in this document. Ixia and the Ixia logo are trademarks of Ixia. All other companies, product names, and logos are trademarks or registered trademarks of their respective holders.

Ixia 6601 W. Agoura Road Calabasas, CA 9130 Phone: Fax: Email: Internet: (818) 871-1800 (818) 871-1805 info@ixiacom.com www.ixiacom.com

 Copyright Ixia, 005

STP/RSTP Test Plan

STP/RSTP Test Plan


Overview
The STP/RSTP Bridging test plan presented in this document includes functional and system test scenarios designed for network and QA engineers testing who are validating STP/RSTP enabled devices. IEEE standards 80.1d and 80.1w identify the various Protocols specific to STP and RSTP, respectively, that must be validated against a specific device under test (DUT) prior to deployment. These tests are considered baseline testing. Customers are encouraged to use these tests as the basis for further test plan development. This test plan describes the following tests: 1. Spanning Tree Conformance Test . Spanning Tree Root Bridge Election Functional Test 3. Spanning Tree Loop Prevention Functional Test 4. Spanning Tree Network Convergence Performance Test

1. Spanning Tree Conformance Test

Objective Verify that the DUT complies with Spanning Tree standards. This test is applicable for verifying conformance metrics contained in Spanning Tree 80.1d (STP), Rapid Spanning Tree 80.1w (RSTP), and Multiple Spanning Setup

Tree (MSTP) with the following capabilities: Configuration BPDUs Topology Change Notification (TCN) BPDUs Bridge root election, Root port election, Port states, Bridging Decision Process, and Timers

Figure 1. Bridging conformance test setup

3 Copyright Ixia, 005

STP/RSTP Test Plan

Input Parameters Two sets of parameters are required prior to running conformance tests: one for test tool configuration and one for DUT configuration. The test tool configuration describes the Parameter Test Tool Configuration

interface and protocol configuration of the Ixia chassis using the IxANVL conformance test suites, while the DUT configuration describes the STP / RSTP features of the DUT. See Table 1.

DUT Configuration

Description Test various BPDU types and traffic generation, including Root election, Path cost, Spanning Tree recalculation. STP and RSTP features (Port states, Spanning Tree calculation) and Fast port States for RSTP Network Convergence, in addition to various timers and related parameters.

Table 1. Conformance test input parameters A user friendly interface is provided to help set up both the test tool configuration and the specific parameters for the DUT and IxANVL software to define how IxANVL will interact with the DUT. These are necessary steps that must be completed prior to any IxANVL test execution. See Figures  and 3.

Figure 2. IxANVL configuration setup

4 Copyright Ixia, 005

STP/RSTP Test Plan

Figure 3. IxANVL parameter setup

Methodology Conformance testing is an important process necessary to verify how a DUT complies with specific protocol standards. The conformance test methodology operates as a dialog: the test tool send packets to the switch being tested, then receives the BPDUs sent in response, and then analyzes the response to determine the next action to take. This methodology allows conformance test tools, such as the Ixia chassis executing IxANVL conformance test suites, to test complicated scenarios much more intelligently and flexibly than is achievable by simple packet generation and capture devices.

Conformance testing also includes negative test cases to help validate device response to Bad and Storming BPDU packets. The Bridging Spanning Tree conformance test suite, for example, contains a number of test cases that run against the DUT based on the direct interpretation of STP and RSTP standards. The test methodology is as follows: 1. Enter parameters to describe both the Conformance Tester and DUT configuration. . Select all or a set of test cases to run against the DUT. See Figure 4. 3. Run the conformance tests from the user interface, or in a batch mode via command scripts. 4. Reconfigure the DUT as required between test cases to match the test setup.

5 Copyright Ixia, 005

STP/RSTP Test Plan

Figure 4. Test case selector Results The results of the test are provided in the Test Case Journal where IxANVL tracks as PASS or FAIL each of the conformance test performed. This is a high level executive summary result for reporting. See Figure 5. You can also get more detailed trace information on any given test case executed by reviewing the actual test case results tracked by test case ID as shown in Figure 6.

Figure 5. Test case journal


6 Copyright Ixia, 005 STP/RSTP Test Plan

Figure 6. Test case results

2. Spanning Tree Root Bridge Election Functional Test

Objective The Spanning Tree root is the central location of all bridges in a switched network. All bridges in a Spanning Tree topology must be able to reach the root directly or indirectly via another bridge. Test 1 verifies that the bridge with the lowest bridge ID becomes the root of the LAN. This test uses a single emulated bridge port residing on the same LAN communicating with another bridge device. The Spanning Tree Protocol uses this topology when switches are first initialized. This configuration is modified by port transitioning and a Spanning Tree algorithm calculation that stabilizes the Spanning Tree topology.

Test 2 verifies that the bridge with the lowest bridge ID becomes the root of the LAN. The MAC address on the DUT is the lowest possible address within the LAN by setting the MAC addresses of all the test ports higher than the DUT address. Setup The initial configuration is one physical test port to emulate one Spanning Tree bridge that is connected to one port on the DUT. An initial Spanning Tree bridge startup state must be set enabling the DUT to have the lowest possible bridge ID, therefore making it the root. The emulated Sender bridge ID MAC address is set a very high value. Ixias IxRouter application can be used to set up and execute this test.

Figure 7. Spanning tree emulated root bridge connected to the DUT


7 Copyright Ixia, 005 STP/RSTP Test Plan

Input Parameters Parameters Root ID Description Contains the bridge ID of the root bridge. The root ID consists of the Priority, System ID, and MAC Address. After convergence, all configuration BPDUs in the bridged network should contain the same value for this field Bridge Mode Bridge mode type can be Spanning Tree or Rapid Spanning Tree Table 2. Spanning Tree emulated bridge input parameters

Methodology TEST 1- Vary bridge priority 1. The emulated bridge and DUT exchange BPDUs at startup. BPDUs contain unique bridge ID (MAC Address), Root Cost, and port Identifier (MAC address associated with each port). See Figure 8. . Set the emulated bridge to have a priority of 61440 (highest possible), making the DUT the Root.

3. The switch with the highest bridge priority (the lowest numerical priority value), which in this case is the DUT, becomes the Root bridge for the LAN 4. Verify the Root bridge election by checking the actual port state and bridge status on the DUT. In this case, the DUT port should be in Designated/Forwarding State. A stable Spanning Tree topology is achieved once all bridge ports in the network have reached their final state (either block or forwarding).

Figure 8. Spanning Tree root bridge election setup

8 Copyright Ixia, 005

STP/RSTP Test Plan

TEST - Vary MAC Address 1. Set the emulated bridge to have the highest possible Sender Root bridge MAC address (all Fs) and default bridge priority 32768, making the DUT bridge the Root. The switch with the highest bridge priority

(lowest numerical value), including both the priority ID and MAC address, becomes the Root bridge. In this case DUT becomes the Root. . Verify the Root bridge election by checking the actual bridge ports state and status on the DUT.

Results The success of these tests depends on the final states of the bridge ports. Depending on the other bridge ID on the network, the bridge ID with the lowest priority becomes

the Root bridge. Verification is done on both the test port and the DUT bridge port. The Ixia test port shows in the Spanning Tree Interfaces/Learned Info the bridge port in Root/Forwarding state. See Figure 9.

Figure 9. Spanning Tree bridge port state

3. Spanning Tree Loop Prevention Functional Test

Objective This test verifies the fundamental functionality behind the Spanning Tree protocol Loop Detection and Prevention. The network that is running Spanning Tree protocol is to remain Loop Free at all times under any network variations and conditions, which includes variation on the DUT itself and/or the network connected to the DUT. One of the network variations can be the cost to the root from a spanning tree bridge. Changing the root cost on a bridge causes topology changes, and forces Spanning Tree recalculation. A non-root bridge will select the shortest path to the root making this

path the preferable path to reach the root. All other paths to the root will be blocked, preventing from any looping conditions. The election of the root port for each bridge will be affected. Each bridge is to have its own root port. A root port is the primary port that the bridge will use to reach the root bridge. This root port represents the best possible way to reach the root based on its cost (the lower the cost the more preferable the path). Any other redundant path from any given bridge on the same switched network to the root bridge will be blocked, eliminating any possible looping in the Spanning Tree topology.
STP/RSTP Test Plan

9 Copyright Ixia, 005

Setup Each of the two test ports emulates a bridge connected to two separate physical ports on the DUT running Spanning Tree Protocol. At startup, the emulated bridge is the root

bridge for the network (set the emulated bridge ID to be the lowest ID by changing priority and/or MAC address). Ixias IxRouter application can be used to setup and execute this test.

Figure 10. Spanning Tree Loop prevention setup with two emulated bridges connected to the DUT

Input Parameters Parameters Root ID Description Contains the bridge ID of the root bridge. The root ID consists of the Priority, System ID, and MAC Address. After convergence, all Configuration BPDUs in the bridged network should contain the same value for this field. Root Cost The cumulative cost of all links leading to the root bridge. Bridge Mode Bridge mode type can be Spanning Tree or Rapid Spanning Tree Table 3. Spanning Tree Loop prevention input parameters

10 Copyright Ixia, 005

STP/RSTP Test Plan

Methodology 1. Change BR1 and BR sending root bridge MAC address to CC CC CC CC CC CC and priority to 4096. The root is the imaginary emulated root bridge. . BR1 and BR bridge ports are in designated Forwarding. One of the DUT bridge ports is in Alternate/Blocking state, the other is in Root/Forwarding state. 3. DUT port1 is in Root/Forwarding state. Select BR1 and change its Path Cost to Root from 0 to 3, forcing the Spanning Tree to be recalculated. 4. BR1 and BR bridge ports are still in Designated/Forwarding; however, the ports states on the DUT alternate. 5. DUT port 1 state is now in Alternate/ Blocking and DUT port 2 state is in Root / Forwarding state.

path to the root is attained. The selected path is the preferable lowest path cost to the root. To avoid looping, the Spanning Tree Protocol will block the other path from forwarding traffic. Verification is done on both before and after the Path Cost to root changes. Before the Path Cost change on BR1, the bridge ports state show the following: Ixia BR1 port 1 Designated/ Forwarding Ixia BR2 port 2 Designated/ Forwarding DUT indicates the imaginary bridge with MAC is the Root (that is CC CC CC CC CC CC) DUT port 1 is Root/Forwarding DUT port 2 is Alternate/Blocking

NOTE: Every non-root bridge will have a selected root port


Results The success of the test depends on the final calculation of the Spanning Tree topology, the root port election, and the bridge port states with the Loop Free topology at all times. Depending on each of the emulated path cost to the root, a preferable selected

After the Path Cost change on BR1, the bridge ports state show the following: Ixia BR1 port 1 Designated/ Forwarding Ixia BR2 port 2 Designated/ Forwarding The imaginary bridge with MAC is the Root (shown in the DUT) DUT port 1 is Alternate/Blocking DUT port 2 is Root/Forwarding

4. Spanning Tree Network Convergence Performance Test

Objective This test verifies that whenever the Path Cost to root changes, or a bridge link goes down, or a bridge stops sending BPDUs during a traffic generation on a switched LAN, the Spanning Tree topology is recalculated to update all bridges on the network with the latest BPDU topology notification and changes. This test measures the network convergence based on the DUT performance and handling of the Topology Changes Notifications and Configurations BDPUs as well as traffic switchover.

This test case validates the following: DUTs Spanning Tree recalculation based on new Root Path Cost, a bridge link failure, or a bridge stops sending BPDUs Network topology changes and convergence due to the occurrence of any of the previously listed conditions Traffic switch over from one emulated bridge port to another due to the occurrence of any of the previous listed conditions

11 Copyright Ixia, 005

STP/RSTP Test Plan

Any traffic forwarded by the emulated bridge from Host A to Host B through the DUT bridge will be halted until the complete Spanning Tree is recalculated, the new Spanning Tree topology has stabilized, and all network bridges ports have reached their final state. After the Spanning Tree is stabilized, the traffic is switched over from one path to another. This switchover mechanism should take about twenty-eight seconds for the Spanning Tree to complete, and is virtually immediate for the Rapid Spanning Tree protocol, since the later is designed with less port states to cycle through before the Spanning Tree network topology is stabilized.

Setup Each of the two test ports emulates a bridge connected to two separate physical ports on the DUT running Spanning Tree Protocol. In addition, a third DUT bridge port is connected to a non-Spanning Tree emulated test port for sending and receiving traffic. At startup, the emulated bridge is the root bridge for the network (set the emulated bridge ID to be the lowest ID by changing priority and/or MAC address). Ixias IxRouter application can be used to setup and execute this test.

Figure 11. Multiple Spanning Tree emulated bridges connected to the DUT

Input Parameters Parameters Root ID Description Contains the bridge ID of the root bridge. The root ID consists of the Priority, System ID and MAC Address. After convergence, all Configuration BPDUs in the bridged network should contain the same value for this field. Root Cost The cumulative cost of all links leading to the root bridge. Bridge Mode Bridge mode type can be Spanning Tree or Rapid Spanning Tree. Table 4. Spanning Tree network convergence input parameters

1 Copyright Ixia, 005

STP/RSTP Test Plan

Methodology TEST 1- Traffic switch-over due to Path Cost change 1. Change BR1 and BR Sending Root bridge MAC address to CC CC CC CC CC CC and priority 4096. The root is the imaginary emulated root bridge. . BR1 and BR bridge ports are in Root Forwarding. One of the DUT bridge ports is in Alternate / Blocking state. 3. Set up two traffic streams on BR1 and BR for the emulated Host B, and stream 3 for the emulated Host A. 4. Stream 1 on BR1 is set with the Host B MAC address value for the DUT to learn Host B MAC address from BR1. 5. Stream  on BR is set with the Host B MAC address value for the DUT to learn Host B MAC address from BR. 6. Setup traffic stream 3 on the emulated traffic receive / generation port for the DUT to learn Host A MAC address. 7. Start traffic streams enabling the DUT to learn the MAC address of the emulated LAN nodes. 8. Host A <- -> Host B traffic is going over one of the available DUT / emulated bridge Paths. See Figure 11. 9. Select the emulated bridge that is forwarding the traffic, and change its Path Cost to Root from 0 to 3, forcing the Spanning Tree to be recalculated. 10.The traffic is temporarily halted due to the new topology change occurrence. 11.Once the Spanning Tree is stabilized and all ports have reached their final states, the traffic will switch over to the other Path. See Figure 11.
13 Copyright Ixia, 005

1.Any other path from any of the bridges in the network to the root bridge (DUT) that is not needed in this switched network will be set to blocking state, avoiding redundant path to the Root and possible looping condition. TEST - Traffic switch over due to one bridge link down and failover 1. Given that the traffic is been handled by one of the DUT ports that is connected to the emulated bridge port via one of the paths, select this emulated bridge port and simulate a cable disconnect. . The same behavior as in previous step is observed: The Spanning Tree is recalculated based on the new topology change and the network converges. 3. The traffic is once again switched over to the other available path. This process will only take few seconds. TEST 3- Traffic switch over due to one bridge stopping BPDUs 1. Given that the traffic is been handled by one of the DUT port that is connected to the emulated bridge port via one of the paths, select this emulated bridge and stop its Spanning Tree protocol. . The same behavior as in previous step is observed: The Spanning Tree is recalculated based on the new topology change and the network converges since one of the bridge ports has removed itself from the Spanning Tree topology. 3. The traffic is once again switched over to the other available path. This process will only take few seconds. Results The success of the test depends on the convergence of the Spanning Tree and traffic
STP/RSTP Test Plan

switch over. This process will only take about 15-0 seconds for Spanning Tree mode (STP) and is virtually immediate for Rapid Spanning Tree mode (RSTP). The results shown below are captured for Spanning Tree mode (STP). The verification is calculated before and after the change of the Spanning Tree due to the new Path cost bridge parameters change.

CC CC CC) DUT port 1 is Root/Forwarding DUT port 2 is Alternate/Blocking The traffic is shown passing through Ixia port 1 as illustrated in Figure 1 below, identifying the last packet received prior to switch over. After switch over, the bridge ports state should show the following: Ixia BR1 port 1 Designated/ Forwarding Ixia BR2 port 2 Designated/ Forwarding The imaginary bridge with MAC is the Root (shown in the DUT) DUT port 1 is Alternate/Blocking DUT port 2 is Root/Forwarding The traffic is shown passing through Ixia port  as illustrated in Figure 1 below, identifying the drop down of packets received on BR1, the delay (about 8 seconds), then the traffic picking up with the BR2.

NOTE: The initial Spanning Tree state shows that the lowest cost to the root is the preferable path. To avoid looping, the Spanning Tree Protocol will block the other path from forwarding traffic. The other port will be set as Alternate/Blocking on the DUT.
Before switch over, the bridge ports state show the following: Ixia BR1 port 1 Designated/ Forwarding Ixia BR2 port 2 Designated/ Forwarding DUT indicates the imaginary bridge with MAC is the Root (that is CC CC CC

Figure 12. Traffic switch over from BR1 to BR2

14 Copyright Ixia, 005

STP/RSTP Test Plan

References

The table below presents more information regarding the configuration of a bridge port. Use this table when changing the bridge port cost. This cost setting affects the reachability of a given Spanning Tree or Rapid Spanning Tree bridge to the root bridge based on the link type. Link Speed 4Mbps 10Mbps 16Mbps 100Mbps 1Gbps 10Gbps Recommended Cost Recommended Cost Range 50 100 to 1000 100 50 to 600 6 40 to 400 19 10 to 60 4 3 to 10  1 to 5 Table 5. Link speed and cost reference table stamp of the first frame was received on port  (BR) minus time stamp of the last frame received on port 1 (BR1). For Rapid Spanning Tree, this measurement is calculated in milliseconds.

Ixias IxExplorer provides the capability of measuring the delay between the last time traffic was received on port 1 (BR1) and the first time traffic was received on port  (BR). This measurement is done by calculating the difference between the time

Figure 13. Spanning Tree Switchover Time Calculation

15 Copyright Ixia, 005

STP/RSTP Test Plan

Вам также может понравиться