display stp history

Syntax

display stp [ instance instance-id | vlan vlan-id ] history [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

0: Visit level

Parameters

instance instance-id: Displays the historical port role calculation information of a specific MSTI. The value of instance-id ranges from 0 to 16, where 0 represents the CIST.

vlan vlan-id: Displays the historical port role calculation information for a specific VLAN, in the range of 1 to 4094.

slot slot-number: Specifies the ID of a switch. The value can only be 1.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display stp history to display the historical port role calculation information of the specified MSTI or all MSTIs.

In STP/RSTP mode, the displayed information is sorted by port role calculation time.

In MSTP mode, follow these guidelines:

In PVST mode, follow these guidelines:

Examples

# In MSTP mode, display the historical port role calculation information in MSTI 2.

<Sysname> display stp instance 2 history slot 1
 --------------- STP slot 1 history trace ---------------
 -------------------  Instance 2   ---------------------

 Port Ethernet1/0/1
   Role change   : ROOT->DESI (Aged)
   Time          : 2009/02/08 00:22:56
   Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.1

 Port Ethernet1/0/2
   Role change   : ALTER->ROOT
   Time          : 2009/02/08 00:22:56
   Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.2

# In PVST mode, display the historical port role calculation information in VLAN 2.

<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp vlan 2 history slot 1
 --------------- STP slot 1 history trace ---------------
 -------------------  VLAN 2   ---------------------

 Port Ethernet1/0/1
   Role change   : ROOT->DESI (Aged)
   Time          : 2009/02/08 00:22:56
   Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.1

 Port Ethernet1/0/2
   Role change   : ALTER->ROOT
   Time          : 2009/02/08 00:22:56
   Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.2

Table 27: Command output

Field

Description

Port

Port name.

Role change

Role change of the port ("Age" means that the change was caused by expiration of the received configuration BPDU).

Time

Time of port role calculation.

Port priority

Port priority.