stp port-log

Syntax

stp port-log { instance { instance-id | all } | vlan vlan-list }

undo stp port-log { instance { instance-id | all } | vlan vlan-list }

View

System view

Default level

2: System level

Parameters

instance instance-id: Specifies an MSTI. The value of instance-id ranges from 0 to 16, where 0 represents the CIST. To enable or disable outputting port state transition information in STP/RSTP mode, specify instance 0.

all: Specifies all MSTIs.

vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the vlan-id argument represents the VLAN ID, in the range of 1 to 4094, and &<1-10> indicates that you can specify up to 10 VLAN IDs or VLAN ID ranges.

Description

Use stp port-log to enable outputting port state transition information for the specified MSTI or all MSTIs.

Use undo stp port-log to disable outputting port state transition information for the specified MSTI or all MSTIs.

By default, this function is enabled.

Examples

# In MSTP mode, enable outputting port state transition information for MSTI 2.

<Sysname> system-view
[Sysname] stp port-log instance 2
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/MSTP_DISCARDING: Instance 2's Ethernet1/0/1 has been set to discarding state!
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/MSTP_DISCARDING: Instance 2's Ethernet1/0/2 has been set to forwarding state!

The output shows that Ethernet 1/0/1 in MSTI 2 transitioned to the discarding state and Ethernet 1/0/2 in MSTI 2 transitioned to the forwarding state.

# In PVST mode, enable outputting port state transition information for VLAN 1 to VLAN 4094.

<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp port-log vlan 1 to 4094
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/PVST_DISCARDING: VLAN 2's Ethernet1/0/1 has been set to discarding state!
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/PVST_FORWARDING: VLAN 2's Ethernet1/0/2 has been set to forwarding state!

The output shows that Ethernet 1/0/1 in VLAN 2 transitioned to the discarding state and Ethernet 1/0/2 in VLAN 2 transitioned to the forwarding state.