OC STP

Packages:

  • openconfig-spanning-treel.yang
  • openconfig-spanning-tree-types.yang
  • cisco-nx-openconfig-spanning-tree-deviations.yang

Configuring Spanning Tree MST Mode

Configuring Spanning Tree MST Mode
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <global>
          <config>
            <enabled-protocol xmlns:oc-stp-types="http://openconfig.net/yang/spanning-tree/types">oc-stp-types:MSTP</enabled-protocol>
          </config>
        </global>
      </stp>
    </config>
  </edit-config>
</rpc>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>

Container: STP Global

Types: Config Data


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree mode mst

Configuring Spanning Tree Mode RAPID-PVST

Configuring Spanning Tree Mode RAPID-PVST
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <global>
          <config>
            <enabled-protocol xmlns:oc-stp-types="http://openconfig.net/yang/spanning-tree/types">oc-stp-types:RAPID_PVST</enabled-protocol>
          </config>
        </global>
      </stp>
    </config>
  </edit-config>
</rpc>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree mode rapid-pvst

Configuring Spanning Tree Bridge-Assurance

Configuring Spanning Tree Bridge-Assurance
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <global>
          <config>
            <bridge-assurance>true</bridge-assurance>
          </config>
        </global>
      </stp>
    </config>
  </edit-config>
</rpc>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree bridge assurance

Configuring Spanning Tree Loop-Guard

Configuring Spanning Tree Loop-Guard
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <global>
          <config>
            <loop-guard>true</loop-guard>
          </config>
        </global>
      </stp>
    </config>
  </edit-config>
</rpc>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree loopguard default

Configuring Spanning Tree BPDU Guard

Configuring Spanning Tree BPDU Guard
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <global>
          <config>
            <bpdu-guard>true</bpdu-guard>
          </config>
        </global>
      </stp>
    </config>
  </edit-config>
</rpc>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree port type edge bpduguard default

Configuring Spanning Tree BPDU Filter

Configuring Spanning Tree BPDU Filter
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <global>
          <config>
            <bpdu-filter>true</bpdu-filter>
          </config>
        </global>
      </stp>
    </config>
  </edit-config>
</rpc>  


Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree port type edge bpdufilter default

Configuring Spanning Tree MST Configuration

Configuring Spanning Tree MST Configuration
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <mstp>
          <config>
            <name>cisco</name>
            <revision>2</revision>
            <max-hop>3</max-hop>
            <hello-time>4</hello-time>
            <max-age>7</max-age>
            <forwarding-delay>8</forwarding-delay>
          </config>
        </mstp>
      </stp>
    </config>
  </edit-config>
</rpc>


Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>

Container: STP MST
Data Type: Config Data


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree mst hello-time 4
spanning-tree mst forward-time 8
spanning-tree mst max-age 7
spanning-tree mst max-hops 3
panning-tree mst configuration
 name cisco
 revision 2

Configuring Spanning Tree MST instance config

Configuring Spanning Tree MST instance config
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <mstp>
          <mst-instances>
            <mst-instance>
              <mst-id>3</mst-id>
              <config>
                <mst-id>3</mst-id>
                <vlan>5-7</vlan>
                <vlan>9</vlan>
                <bridge-priority>36864</bridge-priority>
              </config>
            </mst-instance>
          </mst-instances>
        </mstp>
      </stp>
    </config>
  </edit-config>
</rpc>


Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>
<br><font color="00ace6"><b>CLI Commands</b></font>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree mst 3 priority 36864
spanning-tree mst configuration
 instance 3 vlan 5-7,9

Configuring Spanning Tree MST instance interfaces

Configuring Spanning Tree MST instance config
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <mstp>
          <mst-instances>
            <mst-instance>
              <mst-id>5</mst-id>
              <interfaces>
                <interface>
                  <name>eth3/5</name>
                  <config>
                    <name>eth3/5</name>
                    <cost>12345</cost>
                    <port-priority>64</port-priority>
                  </config>
                </interface>
              </interfaces>
            </mst-instance>
          </mst-instances>
        </mstp>
      </stp>
    </config>
  </edit-config>
</rpc>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

interface Ethernet3/5
 spanning-tree mst 5 port-priority 64
 spanning-tree mst 5 cost 12345

Configuring Spanning Tree RAPID-PVST vlan config

Configuring Spanning Tree RAPID-PVST vlan config
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <rapid-pvst>
          <vlan>
            <vlan-id>5</vlan-id>
            <config>
              <vlan-id>5</vlan-id>
              <hello-time>6</hello-time>
              <max-age>7</max-age>
              <forwarding-delay>8</forwarding-delay>
              <bridge-priority>36864</bridge-priority>
            </config>
          </vlan>
        </rapid-pvst>
      </stp>
    </config>
  </edit-config>
</rpc>


Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>

Container: STP RAPID-PVST
Data Type: Config Data


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

spanning-tree vlan 5 priority 36864
spanning-tree vlan 5 hello-time 6
spanning-tree vlan 5 forward-time 8
spanning-tree vlan 5 max-age 7

Configuring Spanning Tree RAPID-PVST vlan interfaces

Configuring Spanning Tree RAPID-PVST vlan interfaces
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <rapid-pvst>
          <vlan>
            <vlan-id>5</vlan-id>
            <interfaces>
              <interface>
                <name>eth3/5</name>
                <config>
                  <name>eth3/5</name>
                  <cost>12345</cost>
                  <port-priority>64</port-priority>
                </config>
              </interface>
            </interfaces>
          </vlan>
        </rapid-pvst>
      </stp>
    </config>
  </edit-config>
</rpc>


Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

interface Ethernet3/5
 spanning-tree vlan 5 port-priority 64
 spanning-tree vlan 5 cost 12345

Configuring Spanning Tree Interfaces

Configuring Spanning Tree Interfaces
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <stp xmlns="http://openconfig.net/yang/spanning-tree">
        <interfaces>
          <interface>
            <name>eth3/5</name>
            <config>
              <name>eth3/5</name>
              <edge-port xmlns:oc-stp-types="http://openconfig.net/yang/spanning-tree/types">oc-stp-types:EDGE_ENABLE</edge-port>
              <link-type>P2P</link-type>
              <guard>LOOP</guard>
              <bpdu-guard>true</bpdu-guard>
              <bpdu-filter>true</bpdu-filter>
            </config>
          </interface>
        </interfaces>
      </stp>
    </config>
  </edit-config>
</rpc>



Response:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="135">
  <ok/>
</rpc-reply>

Container: STP Interfaces
Data Type: Config Data


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

interface Ethernet3/5
 spanning-tree link-type point-to-point
 spanning-tree port type edge
 spanning-tree bpduguard enable
 spanning-tree guard loop
 spanning-tree bpdufilter enable