Skip Navigation Links
Exit Print View
| Sun Ethernet Fabric Operating System ### STP Administration Guide

Search Scope:

- This Document
- Entire Library

## Configure the Cost

In this example, all switches are configured to be STP compatible using `spanning-tree compatibility stp` in Global Configuration mode. After the topology stabilizes and switch 1 is elected as root, the ports, except port 2 of switch 3, are in forwarding state. Port 2 of switch 3 is an alternate port and is in discarding state.

After the path cost for port 1 in switch 3 is set, port 2 of switch 2 is the alternate port, and port 2 of switch 3 is the designated port.

This example configures the path cost associated with port `0/1` to `2000`.

See STP Topology Example for the sample topology referenced in this section.

1. Specify the interface for path cost and configure the cost in switch 3.

       SEFOS# configure terminal
       SEFOS(config)# interface extreme-ethernet 0/1
       SEFOS(config-if)# spanning-tree cost 2000
       SEFOS(config-if)# end

2. View the spanning tree properties of an interface.
   1. In Switch 1, type.

          SEFOS# show spanning-tree

          Root Id         Priority   32768
                          Address    00:01:02:03:04:01
                          Cost       0
                          Port       0 [0]
                          This bridge is the root
                         Max age 20 Sec, forward delay 15 Sec
                          Hello Time is 2 Sec
          MST00
          Spanning Tree  Protocol Enabled.
          MST00 is executing the mstp compatible Multiple Spanning Tree Protocol
          Bridge Id       Priority  32768
                          Address  00:01:02:03:04:01
                          Max age is 20 sec, forward delay is 15 sec
                          Hello Time is 2 sec                Dynamic Path Cost is Disabled                Dynamic Path Cost Lag-Speed Change is Disabled
          Name      Role         State        Cost     Prio   Type
          ----      ----         -----        ----     ----   ------
          Ex0/1     Designated   Forwarding   200000    128    SharedLan
          Ex0/2     Designated   Forwarding   200000    128    SharedLan

   2. In Switch 2, type.

          SEFOS# show spanning-tree

          Root Id         Priority   32768
                          Address    00:01:02:03:04:01
                          Cost       200000
                          Port       1 [Ex0/1]
                         Max age 20 Sec, forward delay 15 Sec
                          Hello Time is 2 Sec
          MST00
          Spanning Tree  Protocol Enabled.
          MST00 is executing the mstp compatible Multiple Spanning Tree Protocol

          Bridge Id       Priority  32768
                          Address  00:02:02:03:04:01
                         Max age is 20 sec, forward delay is 15 sec
                          Hello Time is 2 sec                Dynamic Path Cost is Disabled                Dynamic Path Cost Lag-Speed Change is Disabled
          Name      Role         State        Cost     Prio   Type
          ----      ----         -----        ----     ----   ------
          Ex0/1     Root         Forwarding   200000    128    SharedLan
          Ex0/2     Alternate    Discarding   200000    128    SharedLan

   3. In Switch 3, type.

          SEFOS# show spanning-tree

          Root Id         Priority   32768
                          Address    00:01:02:03:04:01
                          Cost       2000
                          Port       1 [Ex0/1]
                          Max age 20 Sec, forward delay 15 Sec
                          Hello Time is 2 Sec

          MST00

          Spanning Tree  Protocol Enabled.
          MST00 is executing the mstp compatible Multiple Spanning Tree Protocol
          Bridge Id       Priority  32768
                          Address  00:03:02:03:04:01
                         Max age is 20 sec, forward delay is 15 sec
                          Hello Time is 2 sec                Dynamic Path Cost is Disabled                Dynamic Path Cost Lag-Speed Change is Disabled
          Name      Role         State        Cost     Prio   Type
          ----      ----         -----        ----     ----   ------
          Ex0/1     Root         Forwarding   2000     128    SharedLan
          Ex0/2     Designated   Forwarding   200000    128    SharedLan

Copyright © 2010, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |