---
title: MSTP
slug: aidc/mstp
createdAt: 2025-12-29T10:28:22.794Z
---

Multiple Spanning Tree Protocol.

## <font color="#1d50a2">URLs Summary</font>

| **URL**                                                     | **GET** | **POST** | **PATCH** | **PUT** | **DELETE** |
| ----------------------------------------------------------- | ------- | -------- | --------- | ------- | ---------- |
| /rest/v1/running/mstp                                       | Y       | N        | Y         | N       | N          |
| /rest/v1/running/mstp/global                                | Y       | Y        | Y         | Y       | Y          |
| /rest/v1/running/mstp/instances/&#x7B;id}                   | Y       | Y        | Y         | Y       | Y          |
| /rest/v1/running/mstp/instances/&#x7B;id}/ports/&#x7B;name} | Y       | Y        | Y         | Y       | Y          |
| /rest/v1/running/mstp/ports/&#x7B;name}                     | Y       | Y        | Y         | Y       | Y          |
| /rest/v1/rpc/show-mstp-bridge                               | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-mstp-brief                                | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-mstp-interface                            | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-mstp-mstconfid                            | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-mstp-status                               | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-mstp-tree                                 | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-mstp-treeport                             | N       | Y        | N         | N       | N          |

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

### <font color="#1d50a2">Show mstp bridge</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-mstp-bridge
```

### <font color="#1d50a2">Show mstp brief</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-mstp-brief
{
    "name": "Ethernet12"
}
```

### <font color="#1d50a2">Show mstp interface</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-mstp-interface
{
    "name": "Ethernet12"
}
```

### <font color="#1d50a2">Show mstp mstconfid</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-mstp-mstconfid
```

### <font color="#1d50a2">Show mstp status</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-mstp-status
```

### <font color="#1d50a2">Show mstp tree</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-mstp-tree
{
    "instance": "10"
}
```

### <font color="#1d50a2">Show mstp treeport</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-mstp-treeport
{
    "name": "Ethernet12",
    "instance": "10"
}
```

### <font color="#1d50a2">Get all MSTP information.</font>

```json
GET HTTPS://{switch IP}/rest/v1/running/mstp
```

### <font color="#1d50a2">Create a global MSTP.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/mstp/global
{
     "name": "112233445566",
     "enabled": "false",
     "forward-delay": 20,
     "hello-time": 10,
     "max-age": 30
}
```

### <font color="#1d50a2">Create an MSTP instance.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/mstp/instances/1/ports
{
    "name": "Ethernet12",
    "internal-cost": 200,
    "priority": 10
}
```

### <font color="#1d50a2">Create a port for MSTP instance.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/mstp/instances/1/ports
{
    "name": "Ethernet12",
    "internal-cost": 200,
    "priority": 10
}
```

### <font color="#1d50a2">Create an MSTP port.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/mstp/ports
{
    "name": "Ethernet12",
    "external-cost": 10,
    "edge-port": "true",
    "auto-edge-port": "false",
    "bpdu-filter": "false",
    "bpdu-guard": "false"
}
```

## <font color="#1d50a2">Properties Descriptions</font>

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

**Tree Diagrams**

```plaintext
  +--rw mstp
     +--rw global
     |  +--rw name?
     |  +--ro mode?
     |  +--rw enabled?
     |  +--rw forward-delay?
     |  +--rw hello-time?
     |  +--rw max-age?
     +--rw instances
     |  +--rw instance* [id]
     |     +--rw id
     |     +--rw priority?
     |     +--rw vlans*
     |     +--rw ports
     |        +--rw port* [name]
     |           +--rw name
     |           +--rw internal-cost?
     |           +--rw priority?
     +--rw ports
        +--rw port* [name]
           +--rw name
           +--rw external-cost?
           +--rw edge-port?
           +--rw auto-edge-port?
           +--rw bpdu-filter?
           +--rw bpdu-guard?
```

### <font color="#1d50a2">Table of Properties</font>

| **Name**      | **Required** | **Type/Range**      | **Description**                                                                                                                                                                                                                                                   |
| ------------- | ------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mstp          | M            |                     | Path-only node, has no configurable value.<br />Multi Spanning-tree protocol configuration                                                                                                                                                                        |
| global        | M            |                     | (sub-property of mstp)<br />Path-only node, has no configurable value.<br />Global configuration                                                                                                                                                                  |
| name          | O            | string              | (sub-property of global)<br />MST Region name                                                                                                                                                                                                                     |
| mode          | RO           | string              | (sub-property of global)<br />Currently only mstp mode is supported, not configurable<br />Default value: "mstp"                                                                                                                                                  |
| enabled       | O            | "true"<br />"false" | (sub-property of global)<br />MSTP status, true means MSTP is enabled, false means MSTP is disabled<br />Default value: "false"                                                                                                                                   |
| forward-delay | O            | 4..30               | (sub-property of global)<br />Delay time for device state migration, in seconds<br />Default value: 15                                                                                                                                                            |
| hello-time    | O            | 1..10               | (sub-property of global)<br />MSTP hello time, in seconds<br />Default value: 2                                                                                                                                                                                   |
| max-age       | O            | 10..1000000         | (sub-property of global)<br />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<br />Default value: 20 |

### <font color="#1d50a2">MSTP instances</font>

**Tree Diagrams**

```plaintext
  +--rw mstp
     +--rw instances
     |  +--rw instance* [id]
     |     +--rw id
     |     +--rw priority?
     |     +--rw vlans*
     |     +--rw ports
     |        +--rw port* [name]
     |           +--rw name
     |           +--rw internal-cost?
     |           +--rw priority?
```

**Table of Properties**

| **Name**      | **Required** | **Type/Range**                | **Description**                                                                                                                     |
| ------------- | ------------ | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| mstp          | M            |                               | Path-only node, has no configurable value.<br />Multi Spanning-tree protocol configuration                                          |
| instances     | M            |                               | (sub-property of mstp)<br />Path-only node, has no configurable value.<br />Multi Spanning-tree protocol configuration              |
| id            | M            | 0..63                         | (sub-property of instances)<br />MSTP instance ID                                                                                   |
| priority      | O            | 0..15                         | (sub-property of instances)<br />MSTP Region priority, once mstp is enabled the value is set to 8 by default.<br />Default value: 8 |
| vlans         | O            | 1..4094                       | (sub-property of instances)<br />VLAN ID                                                                                            |
| ports         | M            |                               | (sub-property of instances)<br />Path-only node, has no configurable value.                                                         |
| name          | M            | Ethernet name<br />Lag1..9999 | (sub-property of ports)<br />Port name                                                                                              |
| internal-cost | O            | 0..4294967295                 | (sub-property of ports)<br />The port internal path cost for the MSTI<br />Default value: 200000000                                 |
| priority      | O            | 0..15                         | (sub-property of ports)<br />The port priority for the MSTI<br />Default value: 8                                                   |

### <font color="#1d50a2">MSTP Ports</font>

\#**Tree Diagrams**

```plaintext
  +--rw mstp
     +--rw ports
        +--rw port* [name]
           +--rw name
           +--rw external-cost?
           +--rw edge-port?
           +--rw auto-edge-port?
           +--rw bpdu-filter?
           +--rw bpdu-guard?
```

**Table of Properties**

| **Name**       | **Required** | **Type/Range**                | **Description**                                                                                                                                                                                                                                                                           |
| -------------- | ------------ | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mstp           | M            |                               | Path-only node, has no configurable value.<br />Multi Spanning-tree protocol configuration                                                                                                                                                                                                |
| ports          | M            |                               | (sub-property of mstp)<br />Path-only node, has no configurable value.<br />Enclosing container for the list of interface references                                                                                                                                                      |
| name           | M            | Ethernet name<br />Lag1..9999 | (sub-property of ports)<br />Interface name                                                                                                                                                                                                                                               |
| external-cost  | O            | 0..4294967295                 | (sub-property of ports)<br />The port external path cost for the CIST<br />Default value: 200000000                                                                                                                                                                                       |
| edge-port      | O            | "true"<br />"false"           | (sub-property of ports)<br />Indicates that the interface is configured as an edge port. Edge ports are characterized by the fact that they connect directly to end devices and not to other network devices<br />Default value: "false"                                                  |
| auto-edge-port | O            | "true"<br />"false"           | (sub-property of ports)<br />Automatic selection of edge-port<br />Default value: "true"                                                                                                                                                                                                  |
| bpdu-filter    | O            | "true"<br />"false"           | (sub-property of ports)<br />When set true, this feature can prevent the transmission of BPDU (Bridge Protocol Data Unit) packets on the interface, which is typically used to optimize network performance or enhance network security in specific scenarios<br />Default value: "false" |
| bpdu-guard     | O            | "true"<br />"false"           | (sub-property of ports)<br />When a port receives a BPDU message, if BPDU protection is enabled The port will be forced to set to the non-forwarding state to prevent potential loop problems.<br />Default value: "false"                                                                |

### <font color="#1d50a2">Show mstp status</font>

\#**Tree Diagrams**

```plaintext
    +---x show-mstp-status
    |  +--ro output
    |     +--ro data?
```

**Table of Properties**

| **Name**         | **Required** | **Type/Range** | **Description**                                                                 |
| ---------------- | ------------ | -------------- | ------------------------------------------------------------------------------- |
| show-mstp-status | M            |                | Path-only node, has no configurable value.<br />Show MSTP instance port status. |
| data             | RO           | \<anydata>     | (sub-property of output)                                                        |

### <font color="#1d50a2">Show mstp interface</font>

**Tree Diagrams**

```plaintext
    +---x show-mstp-interface
    |  +---w input
    |  |  +---w name?
    |  +--ro output
    |     +--ro data?
```

### <font color="#1d50a2">Table of Properties</font>

| **Name**            | **Required** | **Type/Range**                | **Description**                                                                               |
| ------------------- | ------------ | ----------------------------- | --------------------------------------------------------------------------------------------- |
| show-mstp-interface | M            |                               | Path-only node, has no configurable value.<br />Show MSTP interface configuration and status. |
| name                | O            | Ethernet name<br />Lag1..9999 | (sub-property of input)<br />                                                                 |
| data                | RO           | \<anydata>                    | (sub-property of output)                                                                      |

### <font color="#1d50a2">Show mstp brief</font>

**Tree Diagrams**

```plaintext
    +---x show-mstp-brief
    |  +---w input
    |  |  +---w name?
    |  +--ro output
    |     +--ro data?
```

### <font color="#1d50a2">Table of Properties</font>

| **Name**        | **Required** | **Type/Range**                | **Description**                                                               |
| --------------- | ------------ | ----------------------------- | ----------------------------------------------------------------------------- |
| show-mstp-brief | M            |                               | Path-only node, has no configurable value.<br />Show port state for the CIST. |
| name            | O            | Ethernet name<br />Lag1..9999 | (sub-property of input)<br />                                                 |
| data            | RO           | \<anydata>                    | (sub-property of output)                                                      |

### <font color="#1d50a2">Show mstp bridge</font>

**Tree Diagrams**

```plaintext
    +---x show-mstp-bridge
    |  +--ro output
    |     +--ro data?
```

### <font color="#1d50a2">Table of Properties</font>

| **Name**         | **Required** | **Type/Range** | **Description**                                                                 |
| ---------------- | ------------ | -------------- | ------------------------------------------------------------------------------- |
| show-mstp-bridge | M            |                | Path-only node, has no configurable value.<br />Show bridge state for the CIST. |
| data             | RO           | \<anydata>     | (sub-property of output)                                                        |

### <font color="#1d50a2">MSTP Ports</font>

**Tree Diagrams**

```plaintext
    +---x show-mstp-tree
    |  +---w input
    |  |  +---w instance?
    |  +--ro output
    |     +--ro data?
```

### <font color="#1d50a2">Table of Properties</font>

| **Name**       | **Required** | **Type/Range** | **Description**                                                                       |
| -------------- | ------------ | -------------- | ------------------------------------------------------------------------------------- |
| show-mstp-tree | M            |                | Path-only node, has no configurable value.<br />Show bridge state for the given MSTI. |
| instance       | O            | 0..63          | (sub-property of input)                                                               |
| data           | RO           | \<anydata>     | (sub-property of output)                                                              |

### <font color="#1d50a2">Show mstp mstconfid</font>

**Tree Diagrams**

```plaintext
    +---x show-mstp-mstconfid
    |  +--ro output
    |     +--ro data?
```

### <font color="#1d50a2">Table of Properties</font>

| **Name**            | **Required** | **Type/Range** | **Description**                                                      |
| ------------------- | ------------ | -------------- | -------------------------------------------------------------------- |
| show-mstp-mstconfid | M            |                | Path-only node, has no configurable value.<br />Show MSTP mstconfid. |
| data                | RO           | \<anydata>     | (sub-property of output)                                             |

### <font color="#1d50a2">Show mstp treeport</font>

**Tree Diagrams**

```plaintext
    +---x show-mstp-treeport
       +---w input
       |  +---w name?
       |  +---w instance?
       +--ro output
          +--ro data?
```

### <font color="#1d50a2">Table of Properties</font>

| **Name**           | **Required** | **Type/Range**                | **Description**                                                                              |
| ------------------ | ------------ | ----------------------------- | -------------------------------------------------------------------------------------------- |
| show-mstp-treeport | M            |                               | Path-only node, has no configurable value.<br />Show port detailed state for the given MSTI. |
| name               | O            | Ethernet name<br />Lag1..9999 | (sub-property of input)<br />                                                                |
| instance           | O            | 0..63                         | (sub-property of input)                                                                      |
| data               | RO           | \<anydata>                    | (sub-property of output)                                                                     |

