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

Search Scope:

- This Document
- Entire Library

## Configure the Spanning-Tree Path Cost

When a loop occurs in the network topology, STP uses path cost to determine the spanning-tree states of the ports. Path cost is obtained from the speed of the interface. You can configure a lower path cost for an interface if the port needs to be selected first, or you can configure a higher path cost if the port needs to be selected last to configure it to the forwarding state. The path cost is used to determine the topology only if the loop in the network cannot be resolved using only the bridge IDs. If all of the ports have the same path cost values, then the spanning tree puts the lowest numbered port into forwarding state.

See Topology Example for details on the topology that is referenced in the following procedure. After the topology stabilizes and switch A is elected as the root, the ports on all of the switches, except port 57 of switch C, should be in the forwarding state. Port 57 of switch C should be an alternate port and in the discarding state.

1. In switch C, specify the interface on which the path cost is to be configured.

       TOR-2 SEFOS# configure terminal
       TOR-2 SEFOS(config)# interface extreme-ethernet 0/1
       TOR-2 SEFOS(config-if)#

   Valid interfaces include physical interfaces and port-channel logical interfaces (`port-channel` port_channel_number).

2. Configure the cost for the interface (2000 in this example).

       TOR-2 SEFOS(config-if)# spanning-tree vlan 10 cost 2000

       Pvrst Vlan Cost is set

       TOR-2 SEFOS(config-if)# end
       TOR-2 SEFOS#

   For `cost`, the range is 0 to 200000. The default value is derived from the media speed of the interface.

   Note - After you configure the path cost for port 1 in switch C, you should observe that port 57 of switch B is the alternate port, and that port 57 of switch C is a designated port.

3. In switch B, review the spanning tree information.

       TOR-1 SEFOS# show spanning-tree vlan 10

       -------------------------------------------------------------------
       Spanning-tree for VLAN 10
       Root Id         Priority   32778
                       Address    00:14:4f:6c:56:6f
                       Cost       2000
                       Port       Ex0/1
                       Hello Time 2 Sec, Max Age 20 Sec, Forward Delay 15 Sec

       Spanning Tree Enabled Protocol PVRST
       Bridge Id       Priority 32778
                       Address 00:14:4f:6c:69:ed
                       Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
       Name     Role         State        Cost     Prio   Type
       ----     ----         -----        ----     ----   ------
       Ex0/1    Root         Forwarding   2000     128    P2P
       Ex0/57   Alternate    Discarding   2000     128    P2P
       TOR-1 SEFOS#

4. In switch C, review the spanning tree information.

       TOR-2 SEFOS# show spanning-tree vlan 10

       -------------------------------------------------------------------
       Spanning-tree for VLAN 10
       Root Id         Priority   32778
                       Address    00:14:4f:6c:56:6f
                       Cost       200
                       Port       Ex0/1
                       Hello Time 2 Sec, Max Age 20 Sec, Forward Delay 15 Sec

       Spanning Tree Enabled Protocol PVRST
       Bridge Id       Priority 32778
                       Address 00:14:4f:6c:6e:0d
                       Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
       Name     Role         State        Cost     Prio   Type
       ----     ----         -----        ----     ----   ------
       Ex0/1    Root         Forwarding   200      128    P2P
       Ex0/57   Designated   Forwarding   2000     128    P2P

       TOR-2 SEFOS#

5. In switch C, reset the default value of the spanning-tree path cost.

       TOR-2 SEFOS# configure terminal
       TOR-2 SEFOS(config)# interface extreme-ethernet 0/1
       TOR-2 SEFOS(config-if)# no spanning-tree vlan 10 cost
       Pvrst Vlan Cost is set
       TOR-2 SEFOS(config-if)# end
       TOR-2 SEFOS#

6. In switch C, view the spanning tree information on `VLAN 10`.

   Port 57 should be in discarding state again.

       TOR-2 SEFOS# show spanning-tree vlan 10

       -------------------------------------------------------------------
       Spanning-tree for VLAN 10
       Root Id         Priority   32778
                       Address    00:14:4f:6c:56:6f
                       Cost       2000
                       Port       Ex0/1
                       Hello Time 2 Sec, Max Age 20 Sec, Forward Delay 15 Sec

       Spanning Tree Enabled Protocol PVRST
       Bridge Id       Priority 32778
                       Address 00:14:4f:6c:6e:0d
                       Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
       Name     Role         State        Cost     Prio   Type
       ----     ----         -----        ----     ----   ------
       Ex0/1    Root         Forwarding   2000     128    P2P
       Ex0/57   Alternate    Discarding   2000     128    P2P

       TOR-2 SEFOS#

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