NETCONF Configuration Guide
...
Layer2
Stp
21 min
asternos stp this chapter provides examples on how to use netconf to manage stp configurations on asternos devices create stp request example to create stp instance 3 via edit config \<config> \<top> \<stp> \<global> \<enabled>true\</enabled> \<protocol>mstp\</protocol> \</global> \<mstp> \<config> \<forward delay>16\</forward delay> \</config> \<instances> \<instance> \<id>3\</id> \<priority>5\</priority> \<vlans>100\</vlans> \<interfaces> \<interface> \<name>ethernet1\</name> \<priority>11\</priority> \</interface> \</interfaces> \</instance> \</instances> \</mstp> \<interfaces> \<interface> \<name>ethernet1\</name> \<bpdu filter>true\</bpdu filter> \<bpdu guard>true\</bpdu guard> \</interface> \</interfaces> \</stp> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ c5b484e2 f2ae 48b4 8261 fbd31dc35674"> \<ok/> \</rpc reply> get all stp configurations request example to get all stp configurations via get config \<filter type="subtree"> \<top> \<stp/> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 61ceaab6 5af0 4461 8cd2 e0924f9dab69"> \<data> \<top> \<stp xmlns="http //asterfusion com/ns/yang/asternos stp"> \<global> \<enabled>true\</enabled> \<protocol>mstp\</protocol> \</global> \<stp/> \<rstp/> \<mstp> \<config> \<forward delay>16\</forward delay> \<hello time>2\</hello time> \<max age>20\</max age> \</config> \<instances> \<instance> \<id>0\</id> \<priority>8\</priority> \</instance> \<instance> \<id>3\</id> \<priority>5\</priority> \<vlans>100\</vlans> \<vlans>30\</vlans> \<interfaces> \<interface> \<name>ethernet1\</name> \<priority>11\</priority> \</interface> \</interfaces> \</instance> \</instances> \</mstp> \<interfaces> \<interface> \<name>ethernet1\</name> \<bpdu filter>true\</bpdu filter> \<bpdu guard>true\</bpdu guard> \</interface> \</interfaces> \</stp> \</top> \</data> \</rpc reply> replace stp mode request example to replace stp mode to stp via edit config \<config> \<top> \<stp operation="replace"> \<global> \<enabled>true\</enabled> \<protocol>stp\</protocol> \</global> \<stp> \<config> \<forward delay>16\</forward delay> \</config> \<interfaces> \<interface> \<name>ethernet1\</name> \<priority>3\</priority> \</interface> \</interfaces> \</stp> \<interfaces> \<interface> \<name>ethernet1\</name> \<bpdu filter>true\</bpdu filter> \<bpdu guard>true\</bpdu guard> \</interface> \</interfaces> \</stp> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ dc4b64f2 8e74 42db b34d fec5be9f97b6"> \<ok/> \</rpc reply> disable stp service request example to disable stp via edit config \<config> \<top> \<stp> \<global operation="merge"> \<enabled>false\</enabled> \</global> \</stp> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ d93c885b eb49 45e3 9755 a99279840c57"> \<ok/> \</rpc reply> create stp instances request example to create stp instances via edit config \<config> \<top> \<stp> \<mstp> \<config> \<forward delay>16\</forward delay> \</config> \<instances> \<instance> \<id>1\</id> \<priority>4\</priority> \<vlans>101\</vlans> \</instance> \</instances> \</mstp> \</stp> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ aa560eb6 5868 49e4 9fa3 10820603983c"> \<ok/> \</rpc reply> get all stp instances request example to get all stp instances via get config \<filter type="subtree"> \<top> \<stp> \<mstp> \<instances/> \</mstp> \</stp> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 9d08a754 1179 4193 a030 741936d47914"> \<data> \<top> \<stp xmlns="http //asterfusion com/ns/yang/asternos stp"> \<mstp> \<instances> \<instance> \<id>0\</id> \<priority>8\</priority> \</instance> \<instance> \<id>1\</id> \<priority>4\</priority> \<vlans>101\</vlans> \</instance> \<instance> \<id>3\</id> \<priority>5\</priority> \<vlans>100\</vlans> \<interfaces> \<interface> \<name>ethernet1\</name> \<priority>11\</priority> \</interface> \</interfaces> \</instance> \</instances> \</mstp> \</stp> \</top> \</data> \</rpc reply> delete stp instances request example to delete specified stp instances 1 via edit config \<config> \<top> \<stp> \<mstp> \<instances> \<instance operation="delete"> \<id>1\</id> \</instance> \</instances> \</mstp> \</stp> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 58cae6ce bd38 4003 8ad9 e210ce6b130f"> \<ok/> \</rpc reply> change stp port priority request example to modify specified stp port priority via edit config \<config> \<top> \<stp> \<mstp> \<instances> \<instance> \<id>1\</id> \<interfaces> \<interface> \<name>ethernet1\</name> \<priority>7\</priority> \</interface> \</interfaces> \</instance> \</instances> \</mstp> \</stp> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ e4f15f44 18dd 4db5 87f0 8a321920f841"> \<ok/> \</rpc reply> set stp interface bpdu request example to set specified stp interface bpdu via edit config \<config> \<top> \<stp> \<interfaces> \<interface> \<name>ethernet1\</name> \<bpdu filter>true\</bpdu filter> \<bpdu guard>false\</bpdu guard> \</interface> \</interfaces> \</stp> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ b3badfb8 e55e 439e 88bc e99bc41117de"> \<ok/> \</rpc reply> shows stp information of all stp instance request example to show status of all stp instance via rpc show stp \<show stp> \<status/> \</show stp> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 1babb2d8 a371 49f4 8857 1c765c12d914"> \<data xmlns="http //asterfusion com/ns/yang/asternos stp"> spanning tree mode mstp mst instance port port role stp state \ 3 ethernet1 disabled discarding 3 ethernet3 designated forwarding 3 ethernet7 backup discarding mstpid \['1'] do not bind any vlans \</data> \</rpc reply> shows stp information of specified stp instance request example to show status of stp instance via rpc show stp \<show stp> \<stp info> \<stpid>1\</stpid> \</stp info> \</show stp> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ be3ccbb3 38d6 49e6 98e7 68d3fb8514fc"> \<data xmlns="http //asterfusion com/ns/yang/asternos stp"> spanning tree mode mstp mst instance port port role stp state \ 3 ethernet1 disabled discarding 3 ethernet3 designated forwarding 3 ethernet7 backup discarding \</data> \</rpc reply> shows stp interface information of specified stp instance request example to show status of stp interface via rpc show stp \<show stp> \<stp info> \<stpid>1\</stpid> \<interface name>ethernet1\</interface name> \</stp info> \</show stp> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ cfa844e5 3e4e 4ca2 91e2 e0029d6bcae7"> \<data xmlns="http //asterfusion com/ns/yang/asternos stp"> spanning tree mode mstp mst instance port port role stp state \ 3 ethernet1 disabled discarding \</data> \</rpc reply> shows stp instances bind info request example to show stp bind info via rpc show stp \<show stp> \<bind/> \</show stp> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 2365ac63 6ba2 4bc6 bbbc 5bb2c671c7b5"> \<data> \<vlan id>100\</vlan id> \<stp id>3\</stp id> \</data> \</rpc reply>
