Skip to main content
Cayazo
Staff & Editor
Staff & Editor
Oct 8, 2026 9:08 AM UTC

Troubleshooting Tip: STP ports remain in discard state after restarting STP

Description

This article describes an issue where STP ports move to the discard state after running the 'diagnose sys stp restart' command.

When this occurs, ports that were previously forwarding traffic remain in the discard state and traffic through the affected virtual switch is interrupted.

The issue can be seen when STP is enabled on virtual switches assigned to different VDOMs.

Scope

FortiGate, FortiOS 7.6.

Solution

The behavior can be reproduced with multiple virtual switches using the same physical switch, with STP enabled on the corresponding interfaces.

In the following example, two virtual switches are configured. Each virtual switch contains two physical ports.

The virtual-switch configuration is:

config system virtual-switch
    edit "internal-vdomA"
        set physical-switch "sw0"
        config port
            edit "port1"
            next
            edit "port2"
            next
        end
    edit "internal-vdomB"
        set physical-switch "sw0"
        config port
            edit "port3"
            next
            edit "port4"
            next
        end
    end
end


STP is enabled on the interface associated with each virtual switch.

Example for 'internal-vdomA':


config system interface
    edit "internal-vdomA"
        set vdom "VDOM-A"
        set type hard-switch
        set stp enable
        set snmp-index 31
    next
end


Example for 'internal-vdomB':


config system interface
    edit "internal-vdomB"
        set vdom "VDOM-B"
        set type hard-switch
        set stp enable
        set snmp-index 32
    next
end


After the configuration is applied, or after a FortiGate reboot, STP operates normally and traffic passes through the forwarding ports.

The current STP status can be checked with:


get system stp list


Example output before restarting STP:


bridge 'internal-vdomA' prio 21524 mac 84:39:XX:XX:XX:XX vd 'VDOM-A'
root prio 21524 mac 84:39:XX:XX:XX:XX cost 0
port 'port1' role designated state forward cost 2000 edge yes rx 3 tx 136
port 'port2' role designated state forward cost 200 edge yes rx 5 tx 136
bridge 'internal-vdomB' prio 21524 mac 84:39:XX:XX:XX:XX vd 'VDOM-B'
root prio 21524 mac 84:39:XX:XX:XX:XX cost 200
port 'port3' role alternate state discard cost 2000 edge no rx 134 tx 5
port 'port4' role root state forward cost 200 edge no rx 134 tx 7


In this output, 'port1' and 'port2' on 'internal-vdomA' are designated ports in the forward state.

On 'internal-vdomB', 'port4' is the root port and remains in the forward state. 'port3' is the alternate port and is correctly placed in the discard state.


Run the following command to restart STP:


diagnose sys stp restart


After the restart, check the STP status again:


get system stp list


The affected output can look similar to the following:


bridge 'internal-vdomA' prio 21524 mac 84:39:XX:XX:XX:XX vd 'VDOM-A'
root prio 21524 mac 84:39:XX:XX:XX:XX cost 0
port 'port1' role designated state discard cost 2000 edge no rx 6 tx 158
port 'port2' role designated state discard cost 200 edge no rx 10 tx 158
bridge 'internal-vdomB' prio 21524 mac 84:39:XX:XX:XX:XX vd 'VDOM-B'
root prio 21524 mac 84:39:XX:XX:XX:XX cost 200
port 'port3' role alternate state discard cost 2000 edge no rx 156 tx 9
port 'port4' role root state forward cost 200 edge no rx 156 tx 13


In this state, 'port1' and 'port2' on 'internal-vdomA' remain designated ports, but their state changes from forward to discard.

Traffic through these ports is blocked while they remain in the discard state.


This behavior affects FortiOS 7.6 and is resolved in FortiOS 8.0.0. Therefore, the recommendation is to upgrade to FortiOS 8.0.0 or later to resolve the issue.


On affected FortiOS 7.6 versions, avoid running the following command in a production environment unless it is required for troubleshooting:


diagnose sys stp restart


Related articles:

Technical Tip: Downgrade/Upgrade via GUI from v7.2.0

Upgrade Path Tool

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT