---
title: stp
slug: enterprise-v6p1/-Zxm-stp
createdAt: 2025-12-17T08:17:50.422Z
---

AsterNOS Model for Multiple Spanning Tree Protocol

# <font color="#1d50a2">YANG Tree Diagram</font>

```none
module: asternos-stp
  +--rw stp
     +--rw global
     |  +--rw enabled?    boolean
     |  +--rw protocol?   stp-types:stp-protocol-enumeration
     +--rw stp
     |  +--rw config
     |  |  +--rw forward-delay?   uint16
     |  |  +--rw hello-time?      uint16
     |  |  +--rw max-age?         uint32
     |  |  +--rw priority?        uint8
     |  +--rw interfaces
     |     +--rw interface* [name]
     |        +--rw name        union
     |        +--rw priority?   uint8
     |        +--ro state
     |           +--ro role?         stp-types:stp-port-role-enumeration
     |           +--ro port-state?   stp-types:stp-port-state-enumeration
     +--rw rstp
     |  +--rw config
     |  |  +--rw forward-delay?   uint16
     |  |  +--rw hello-time?      uint16
     |  |  +--rw max-age?         uint32
     |  |  +--rw priority?        uint8
     |  +--rw interfaces
     |     +--rw interface* [name]
     |        +--rw name        union
     |        +--rw priority?   uint8
     |        +--ro state
     |           +--ro role?         stp-types:stp-port-role-enumeration
     |           +--ro port-state?   stp-types:stp-port-state-enumeration
     +--rw mstp
     |  +--rw config
     |  |  +--rw name?            string
     |  |  +--rw forward-delay?   uint16
     |  |  +--rw hello-time?      uint16
     |  |  +--rw max-age?         uint32
     |  +--rw instances
     |     +--rw instance* [id]
     |        +--rw id            uint16
     |        +--rw priority?     uint8
     |        +--rw vlans*        cmn:vlan-id
     |        +--rw interfaces
     |           +--rw interface* [name]
     |              +--rw name        union
     |              +--rw priority?   uint8
     |              +--ro state
     |                 +--ro role?         stp-types:stp-port-role-enumeration
     |                 +--ro port-state?   stp-types:stp-port-state-enumeration
     +--rw interfaces
        +--rw interface* [name]
           +--rw name           union
           +--rw bpdu-filter?   boolean
           +--rw bpdu-guard?    boolean

  rpcs:
    +---x show-stp
       +---w input
       |  +---w status?     empty
       |  +---w stp_info
       |  |  +---w stpid             uint16
       |  |  +---w interface_name?   union
       |  +---w bind?       empty
       +--ro output
          +--ro data?   <anydata>
```

# <font color="#1d50a2">Resources</font>

## <font color="#1d50a2">Resource List</font>

| **Path**                                                           | **Access** |
| ------------------------------------------------------------------ | ---------- |
| /stp                                                               | Read-Write |
| /stp/global                                                        | Read-Write |
| /stp/global/enabled                                                | Read-Write |
| /stp/global/protocol                                               | Read-Write |
| /stp/stp                                                           | Read-Write |
| /stp/stp/config                                                    | Read-Write |
| /stp/stp/config/forward-delay                                      | Read-Write |
| /stp/stp/config/hello-time                                         | Read-Write |
| /stp/stp/config/max-age                                            | Read-Write |
| /stp/stp/config/priority                                           | Read-Write |
| /stp/stp/interfaces                                                | Read-Write |
| /stp/stp/interfaces/interface                                      | Read-Write |
| /stp/stp/interfaces/interface/name                                 | Read-Write |
| /stp/stp/interfaces/interface/priority                             | Read-Write |
| /stp/stp/interfaces/interface/state                                | Read-Only  |
| /stp/stp/interfaces/interface/state/role                           | Read-Only  |
| /stp/stp/interfaces/interface/state/port-state                     | Read-Only  |
| /stp/rstp                                                          | Read-Write |
| /stp/rstp/config                                                   | Read-Write |
| /stp/rstp/config/forward-delay                                     | Read-Write |
| /stp/rstp/config/hello-time                                        | Read-Write |
| /stp/rstp/config/max-age                                           | Read-Write |
| /stp/rstp/config/priority                                          | Read-Write |
| /stp/rstp/interfaces                                               | Read-Write |
| /stp/rstp/interfaces/interface                                     | Read-Write |
| /stp/rstp/interfaces/interface/name                                | Read-Write |
| /stp/rstp/interfaces/interface/priority                            | Read-Write |
| /stp/rstp/interfaces/interface/state                               | Read-Only  |
| /stp/rstp/interfaces/interface/state/role                          | Read-Only  |
| /stp/rstp/interfaces/interface/state/port-state                    | Read-Only  |
| /stp/mstp                                                          | Read-Write |
| /stp/mstp/config                                                   | Read-Write |
| /stp/mstp/config/name                                              | Read-Write |
| /stp/mstp/config/forward-delay                                     | Read-Write |
| /stp/mstp/config/hello-time                                        | Read-Write |
| /stp/mstp/config/max-age                                           | Read-Write |
| /stp/mstp/instances                                                | Read-Write |
| /stp/mstp/instances/instance                                       | Read-Write |
| /stp/mstp/instances/instance/id                                    | Read-Write |
| /stp/mstp/instances/instance/priority                              | Read-Write |
| /stp/mstp/instances/instance/vlans                                 | Read-Write |
| /stp/mstp/instances/instance/interfaces                            | Read-Write |
| /stp/mstp/instances/instance/interfaces/interface                  | Read-Write |
| /stp/mstp/instances/instance/interfaces/interface/name             | Read-Write |
| /stp/mstp/instances/instance/interfaces/interface/priority         | Read-Write |
| /stp/mstp/instances/instance/interfaces/interface/state            | Read-Only  |
| /stp/mstp/instances/instance/interfaces/interface/state/role       | Read-Only  |
| /stp/mstp/instances/instance/interfaces/interface/state/port-state | Read-Only  |
| /stp/interfaces                                                    | Read-Write |
| /stp/interfaces/interface                                          | Read-Write |
| /stp/interfaces/interface/name                                     | Read-Write |
| /stp/interfaces/interface/bpdu-filter                              | Read-Write |
| /stp/interfaces/interface/bpdu-guard                               | Read-Write |

## <font color="#1d50a2">Detailed Nodes</font>

### <font color="#1d50a2">/stp</font>

**Path**
/stp

**Node Type**
container

**Description**
Top-level grouping for Multi spanning-tree model

**Access**
Read-Write

### <font color="#1d50a2">/stp/global</font>

**Path**
/stp/global

**Node Type**
container

**Description**
Global configuration

**Access**
Read-Write

### <font color="#1d50a2">/stp/global/enabled</font>

**Path**
/stp/global/enabled

**Node Type**
leaf

**Description**
MSTP status, true means MSTP is enabled, false means MSTP is disabled

**Access**
Read-Write

**Data Type**
\<YANG type boolean>

**Constraints**
Valid in \[true, false]

### <font color="#1d50a2">/stp/global/protocol</font>

**Path**
/stp/global/protocol

**Node Type**
leaf

**Description**
List of the spanning tree protocols enabled on the device

**Access**
Read-Write

**Data Type**
\<YANG type stp-protocol-enumeration>

**Constraints**
Enumeration with options:
stp
rstp
mstp

### <font color="#1d50a2">/stp/stp</font>

**Path**
/stp/stp

**Node Type**
container

**Description**
Global configuration

**Access**
Read-Write

**Constraints**
When condition: ../global/protocol = 'stp'

### <font color="#1d50a2">/stp/stp/config</font>

**Path**
/stp/stp/config

**Node Type**
container

**Description**
Configuration data for STP

**Access**
Read-Write

### <font color="#1d50a2">/stp/stp/config/forward-delay</font>

**Path**
/stp/stp/config/forward-delay

**Node Type**
leaf

**Description**
Delay time for device state migration, in seconds, must meet 2\*(forward-delay - 1 second) >= max-age

**Access**
Read-Write

**Data Type**
\<YANG type uint16>

**Constraints**
Valid range: 4 to 30

### <font color="#1d50a2">/stp/stp/config/hello-time</font>

**Path**
/stp/stp/config/hello-time

**Node Type**
leaf

**Description**
MSTP hello time, in seconds

**Access**
Read-Write

**Data Typ**
\<YANG type uint16>

**Constraints**
Valid range: 1 to 10

### <font color="#1d50a2">/stp/stp/config/max-age</font>

**Path**
/stp/stp/config/max-age

**Node Type**
leaf

**Description**
A parameter used to determine whether a configuration message has been stored in the device for an out-of-date period of time, and the device will discard the out-of-date configuration message, in seconds, must meet 2\*(max-age - 1 second) >= forward-delay

**Access**
Read-Write

**Data Type**
\<YANG type uint32>

**Constraints**
Valid range: 6 to 40

### <font color="#1d50a2">/stp/stp/config/priority</font>

**Path**
/stp/stp/config/priority

**Node Type**
leaf

**Description**
MSTP Region priority, once mstp is enabled the value is set to 8 by default.

**Access**
Read-Write

**Data Type**
\<YANG type uint8>

**Constraints**
Valid range: 0 to 15

### <font color="#1d50a2">/stp/stp/interfaces</font>

**Path**
/stp/stp/interfaces

**Node Type**
container

**Access**
Read-Write

### <font color="#1d50a2">/stp/stp/interfaces/interface</font>

**Path**
/stp/stp/interfaces/interface

**Node Type**
list

**Description**
List of MSTP instance ports

**Access**
Read-Write

### <font color="#1d50a2">/stp/stp/interfaces/interface/name</font>

**Path**
/stp/stp/interfaces/interface/name

**Node Type**
leaf

**Description**
Port name

**Access**
Read-Write

**Data Type**
\<YANG type union>

### <font color="#1d50a2">/stp/stp/interfaces/interface/priority</font>

**Path**
/stp/stp/interfaces/interface/priority

**Node Type**
leaf

**Description**
Set port priority for the MSTI

**Access**
Read-Write

**Data Type**
\<YANG type uint8>

**Constraints**
Valid range: 0 to 15

### <font color="#1d50a2">/stp/stp/interfaces/interface/state</font>

**Path**
/stp/stp/interfaces/interface/state

**Node Type**
container

**Description**
Operational state data for STP on each interface

**Access**
Read-Only

### <font color="#1d50a2">/stp/stp/interfaces/interface/state/role</font>

**Path**
/stp/stp/interfaces/interface/state/role

**Node Type**
leaf

**Description**
The current role of the bridge port

**Access**
Read-Only

**Data Type**
\<YANG type stp-port-role-enumeration>

**Constraints**
Enumeration with options:
Root
Designated
Alternate
Backup
Master
Disabled

### <font color="#1d50a2">/stp/stp/interfaces/interface/state/port-state</font>

**Path**
/stp/stp/interfaces/interface/state/port-state

**Node Type**
leaf

**Description**
The current state of the bridge port

**Access**
Read-Only

**Data Type**
\<YANG type stp-port-state-enumeration>

**Constraints**
Enumeration with options:
Listening
Learning
Blocking
Discarding
Forwarding

### <font color="#1d50a2">/stp/rstp</font>

**Path**
/stp/rstp

**Node Type**
container

**Description**
Global configuration

**Access**
Read-Write

**Constraints**
When condition: ../global/protocol = 'rstp'

### <font color="#1d50a2">/stp/rstp/config</font>

**Path**
/stp/rstp/config

**Node Type**
container

**Description**
Configuration data for RSTP

**Access**
Read-Write

### <font color="#1d50a2">/stp/rstp/config/forward-delay</font>

**Path**
/stp/rstp/config/forward-delay

**Node Type**
leaf

**Description**
Delay time for device state migration, in seconds, must meet 2\*(forward-delay - 1 second) >= max-age

**Access**
Read-Write

**Data Type**
\<YANG type uint16>

**Constraints**
Valid range: 4 to 30

### <font color="#1d50a2">/stp/rstp/config/hello-time</font>

**Path**
/stp/rstp/config/hello-time

**Node Type**
leaf

**Description**
MSTP hello time, in seconds

**Access**
Read-Write

**Data Type**
\<YANG type uint16>

**Constraints**
Valid range: 1 to 10

### <font color="#1d50a2">/stp/rstp/config/max-age</font>

**Path**
/stp/rstp/config/max-age

**Node Type**
leaf

**Description**
A parameter used to determine whether a configuration message has been stored in the device for an out-of-date period of time, and the device will discard the out-of-date configuration message, in seconds, must meet 2\*(max-age - 1 second) >= forward-delay

**Access**
Read-Write

**Data Type**
\<YANG type uint32>

**Constraints**
Valid range: 6 to 40

### <font color="#1d50a2">/stp/rstp/config/priority</font>

**Path**
/stp/rstp/config/priority

**Node Type**
leaf

**Description**
MSTP Region priority, once mstp is enabled the value is set to 8 by default.

**Access**
Read-Write

**Data Type**
\<YANG type uint8>

**Constraints**
Valid range: 0 to 15

### <font color="#1d50a2">/stp/rstp/interfaces</font>

**Path**
/stp/rstp/interfaces

**Node Type**
container

**Access**
Read-Write

### <font color="#1d50a2">/stp/rstp/interfaces/interface</font>

**Path**
/stp/rstp/interfaces/interface

**Node Type**
list

**Description**
List of MSTP instance ports

**Access**
Read-Write

### <font color="#1d50a2">/stp/rstp/interfaces/interface/name</font>

**Path**
/stp/rstp/interfaces/interface/name

**Node Type**
leaf

**Description**
Port name

**Access**
Read-Write

**Data Type**
\<YANG type union>

### <font color="#1d50a2">/stp/rstp/interfaces/interface/priority</font>

**Path**
/stp/rstp/interfaces/interface/priority

**Node Type**
leaf

**Description**
Set port priority for the MSTI

**Access**
Read-Write

**Data Type**
\<YANG type uint8>

**Constraints**
Valid range: 0 to 15

### <font color="#1d50a2">/stp/rstp/interfaces/interface/state</font>

**Path**
/stp/rstp/interfaces/interface/state

**Node Type**
container

**Description**
Operational state data for STP on each interface

**Access**
Read-Only

### <font color="#1d50a2">/stp/rstp/interfaces/interface/state/role</font>

**Path**
/stp/rstp/interfaces/interface/state/role

**Node Type**
leaf

**Description**
The current role of the bridge port

**Access**
Read-Only

**Data Type**
\<YANG type stp-port-role-enumeration>

**Constraints**
Enumeration with options:
Root
Designated
Alternate
Backup
Master
Disabled

### <font color="#1d50a2">/stp/rstp/interfaces/interface/state/port-state</font>

**Path**
/stp/rstp/interfaces/interface/state/port-state

**Node Type**
leaf

**Description**
The current state of the bridge port

**Access**
Read-Only

**Data Type**
\<YANG type stp-port-state-enumeration>

**Constraints**
Enumeration with options:
Listening
Learning
Blocking
Discarding
Forwarding

### <font color="#1d50a2">/stp/mstp</font>

**Path**
/stp/mstp

**Node Type**
container

**Description**
Global configuration

**Access**
Read-Write

**Constraints**
When condition: ../global/protocol = 'mstp'

### <font color="#1d50a2">/stp/mstp/config</font>

**Path**
/stp/mstp/config

**Node Type**
container

**Description**
Configuration data for MSTP

**Access**
Read-Write

### <font color="#1d50a2">/stp/mstp/config/name</font>

**Path**
/stp/mstp/config/name

**Node Type**
leaf

**Description**
MST Region name

**Access**
Read-Write

**Data Type**
\<YANG type string>

**Constraints**
String with length: 1 to 32

### <font color="#1d50a2">/stp/mstp/config/forward-delay</font>

**Path**
/stp/mstp/config/forward-delay

**Node Type**
leaf

**Description**
Delay time for device state migration, in seconds, must meet 2\*(forward-delay - 1 second) >= max-age

**Access**
Read-Write

**Data Type**
\<YANG type uint16>

**Constraints**
Valid range: 4 to 30

### <font color="#1d50a2">/stp/mstp/config/hello-time</font>

**Path**
/stp/mstp/config/hello-time

**Node Type**
leaf

**Description**
MSTP hello time, in seconds

**Access**
Read-Write

**Data Type**
\<YANG type uint16>

**Constraints**
Valid range: 1 to 10

### <font color="#1d50a2">/stp/mstp/config/max-age</font>

**Path**
/stp/mstp/config/max-age

**Node Type**
leaf

**Description**
A parameter used to determine whether a configuration message has been stored in the device for an out-of-date period of time,and the device will discard the out-of-date configuration message, in seconds, must meet 2\*(max-age - 1 second) >= forward-delay

**Access**
Read-Write

**Data Type**
\<YANG type uint32>

**Constraints**
Valid range: 6 to 40

### <font color="#1d50a2">/stp/mstp/instances</font>

**Path**
/stp/mstp/instances

**Node Type**
container

**Description**
Configuration and operation data for MSTP instances

**Access**
Read-Write

### <font color="#1d50a2">/stp/mstp/instances/instance</font>

**Path**
/stp/mstp/instances/instance

**Node Type**
list

**Description**
List of MSTP instances

**Access**
Read-Write

### <font color="#1d50a2">/stp/mstp/instances/instance/id</font>

**Path**
/stp/mstp/instances/instance/id

**Node Type**
leaf

**Description**
MSTP instance ID

**Access**
Read-Write

**Data Type**
\<YANG type uint16>

**Constraints**
Valid range: 0 to 255

### <font color="#1d50a2">/stp/mstp/instances/instance/priority</font>

**Path**
/stp/mstp/instances/instance/priority

**Node Type**
leaf

**Description**
MSTP Region priority, once mstp is enabled the value is set to 8 by default.

**Access**
Read-Write

**Data Type**
\<YANG type uint8>

**Constraints**
Valid range: 0 to 15

### <font color="#1d50a2">/stp/mstp/instances/instance/vlans</font>

**Path**
/stp/mstp/instances/instance/vlans

**Node Type**
leaf-list

**Description**
VLAN ID

**Access**
Read-Write

**Data Type**
\<YANG type vlan-id>

**Constraints**
Valid range: 1 to 4094

### <font color="#1d50a2">/stp/mstp/instances/instance/interfaces</font>

**Path**
/stp/mstp/instances/instance/interfaces

**Node Type**
container

**Access**
Read-Write

### <font color="#1d50a2">/stp/mstp/instances/instance/interfaces/interface</font>

**Path**
/stp/mstp/instances/instance/interfaces/interface

**Node Type**
list

**Description**
List of MSTP instance ports

**Access**
Read-Write

### <font color="#1d50a2">/stp/mstp/instances/instance/interfaces/interface/name</font>

**Path**
/stp/mstp/instances/instance/interfaces/interface/name

**Node Type**
leaf

**Description**
Port name

**Access**
Read-Write

**Data Type**
\<YANG type union>

### <font color="#1d50a2">/stp/mstp/instances/instance/interfaces/interface/priority</font>

**Path**
/stp/mstp/instances/instance/interfaces/interface/priority

**Node Type**
leaf

**Description**
Set port priority for the MSTI

**Access**
Read-Write

**Data Type**
\<YANG type uint8>

**Constraints**
Valid range: 0 to 15

### <font color="#1d50a2">/stp/mstp/instances/instance/interfaces/interface/state</font>

**Path**
/stp/mstp/instances/instance/interfaces/interface/state

**Node Type**
container

**Description**
Operational state data for STP on each interface

**Access**
Read-Only

### <font color="#1d50a2">/stp/mstp/instances/instance/interfaces/interface/state/role</font>

**Path**
/stp/mstp/instances/instance/interfaces/interface/state/role

**Node Type**
leaf

**Description**
The current role of the bridge port

**Access**
Read-Only

**Data Type**
\<YANG type stp-port-role-enumeration>

**Constraints**
Enumeration with options:
Root
Designated
Alternate
Backup
Master
Disabled

### <font color="#1d50a2">/stp/mstp/instances/instance/interfaces/interface/state/port-state</font>

**Path**
/stp/mstp/instances/instance/interfaces/interface/state/port-state

**Node Type**
leaf

**Description**
The current state of the bridge port

**Access**
Read-Only

**Data Type**
\<YANG type stp-port-state-enumeration>

**Constraints**
Enumeration with options:
Listening
Learning
Blocking
Discarding
Forwarding

### <font color="#1d50a2">/stp/interfaces</font>

**Path**
/stp/interfaces

**Node Type**
container

**Description**
Enclosing container for the list of interface references

**Access**
Read-Write

### <font color="#1d50a2">/stp/interfaces/interface</font>

**Path**
/stp/interfaces/interface

**Node Type**
list

**Description**
List of interfaces on which MSTP is enable

**Access**
Read-Write

### <font color="#1d50a2">/stp/interfaces/interface/name</font>

**Path**
/stp/interfaces/interface/name

**Node Type**
leaf

**Description**
Interface name

**Access**
Read-Write

**Data Type**
\<YANG type union>

### <font color="#1d50a2">/stp/interfaces/interface/bpdu-filter</font>

**Path**
/stp/interfaces/interface/bpdu-filter

**Node Type**
leaf

**Description**
Configure mstp interface bpdu filter

**Access**
Read-Write

**Data Type**
\<YANG type boolean>

**Constraints**
Valid in \[true, false]

### <font color="#1d50a2">/stp/interfaces/interface/bpdu-guard</font>

**Path**
/stp/interfaces/interface/bpdu-guard

**Node Type**
leaf

**Description**
Configure mstp interface bpdu guard

**Access**
Read-Write

**Data Type**
\<YANG type boolean>

**Constraints**
Valid in \[true, false]

