Configuring Rapid Spanning Tree Protocol for a port

Configure RSTP to reduce the recovery time after a network breakdown.

Procedure

  1. Enter GigabitEthernet Interface Configuration mode:

    enable

    configure terminal

    interface GigabitEthernet {slot/port[/sub-port][-slot/port[/sub-port]][,...]}

    Note

    Note

    If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

  2. Configure RSTP:

    spanning-tree rstp cost <1–200000000> edge-port <false|true> p2p <auto|force-false|force-true> priority <0–240> protocol-migration <false|true> stp enable

Example

Configure RSTP:

Switch:1(config-if)# spanning-tree rstp cost 100 edge-port true p2p auto priority 32 protocol-migration true stp enable

Variable Definitions

Use the data in the following table to use the spanning-tree rstp command.

Variable

Value

cost <1–200000000>

Specifies the contribution of this port to the path cost.

edge-port <false|true>

Configures the edge-port value for the port. A value of true indicates that this port is an edge-port, and a value of false indicates that this port is a nonedge-port.

p2p <auto|force-false|force-true>

Specifies the point-to-point status of the LAN segment attached to this port. A value of force-true indicates that this port is treated as if it connects to a point-to-point link. A value of force-false indicates that this port is treated as having a shared media connection. A value of auto indicates that this port is considered to have a point-to-point link if it is an aggregator and all of its members are aggregatable, or if the MAC entity is configured for full-duplex operation, either through autonegotation or by management means.

priority <0-240>

Assigns the RSTP bridge priority in a range of 0–240. The value has to increment in steps of 16.

protocol-migration <false|true>

If you chose true, the option initiates protocol migration for a port. If you chose false, the option terminates protocol migration for a port.

An RSTP-compatible port transmits and receives only RSTP BPDUs. If an RSTP port receives an STP BPDU, it becomes an STP port. User intervention is required to change this port back to RSTP mode. This process is called Port Protocol Migration.

stp enable

Configures STP for the port.