NETCONF Configuration Guide
...
Layer2
L2PT
14 min
asternos l2pt this chapter provides examples on how to use netconf to manage layer 2 protocol tunnel (l2pt) configurations on asternos devices create l2pt entry for interface request example to create l2pt entry for interface via edit config \<config>\<top> \<l2pts> \<l2pt operation="create"> \<ifname>ethernet1\</ifname> \<protocol type>stp\</protocol type> \<enable>true\</enable> \</l2pt> \</l2pts> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 036830c9 afc0 4904 9d11 b02ebd51c138"> \<ok/> \</rpc reply> modify l2pt entry for interface request example to modify l2pt entry for interface via edit config \<config>\<top> \<l2pts> \<l2pt operation="merge"> \<ifname>ethernet1\</ifname> \<protocol type>stp\</protocol type> \<enable>false\</enable> \</l2pt> \</l2pts> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 42a9d7c5 0e19 491d 99a1 7c94369cd558"> \<ok/> \</rpc reply> get l2pt entry for interface request example to get l2pt entry for interface via get config with subtree filter \<filter type="subtree"> \<top> \<l2pts> \<l2pt> \<ifname>ethernet1\</ifname> \</l2pt> \</l2pts> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 797de41f d313 4f94 8268 dd5990123f1d"> \<data> \<top> \<l2pts xmlns="http //asterfusion com/ns/yang/asternos l2pt"> \<l2pt> \<ifname>ethernet1\</ifname> \<protocol type>stp\</protocol type> \<enable>false\</enable> \</l2pt> \</l2pts> \</top> \</data> \</rpc reply> delete l2pt entry for interface request example to delete l2pt entry for interface via edit config \<config>\<top> \<l2pts> \<l2pt operation="delete"> \<ifname>ethernet1\</ifname> \</l2pt> \</l2pts> \</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 09755838 8d10 4c48 be5e c3888006b665"> \<ok/> \</rpc reply> create l2 protocol packet entry note manage the actions of layer 2 protocol packet request example to create l2 protocol packet entry via edit config \<config>\<top>\<interfaces> \<interface> \<name>ethernet1\</name> \<l2 protocol control operation="create"> \<l2 protocol> \<protocol type>stp\</protocol type> \<disable>true\</disable> \</l2 protocol> \<l2 protocol> \<protocol type>lacp\</protocol type> \<disable>true\</disable> \</l2 protocol> \</l2 protocol control> \</interface> \</interfaces>\</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ f0a6ff2a 686a 466d 8fe6 7285b5c3ee46"> \<ok/> \</rpc reply> modify l2 protocol packet entry request example to modify specific l2 protocol packet entry via edit config with merge operation \<config>\<top>\<interfaces> \<interface> \<name>ethernet1\</name> \<l2 protocol control operation="merge"> \<l2 protocol> \<protocol type>stp\</protocol type> \<disable>false\</disable> \</l2 protocol> \</l2 protocol control> \</interface> \</interfaces>\</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ fb358c67 c37f 4201 893f f6acea6cc05b"> \<ok/> \</rpc reply> delete l2 protocol packet entry request example to delete specific l2 protocol packet entry via edit config with delete operation \<config>\<top>\<interfaces> \<interface> \<name>ethernet1\</name> \<l2 protocol control operation="delete"> \</l2 protocol control> \</interface> \</interfaces>\</top>\</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ b728bb87 93df 4df5 bd5b 1f31542e8596"> \<ok/> \</rpc reply> get l2 protocol packet entry request example to get l2 protocol packet entry via get config with subtree filter \<filter type="subtree"> \<top> \<interfaces> \<interface> \<name>ethernet1\</name> \<l2 protocol control> \</l2 protocol control> \</interface> \</interfaces> \</top> \</filter> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 6222211c 8ba4 4d8c a2d2 e3429a770be9"> \<data> \<top> \<interfaces xmlns="http //asterfusion com/ns/yang/asternos interfaces"> \<interface> \<name>ethernet1\</name> \<l2 protocol control xmlns="http //asterfusion com/ns/yang/asternos ports"> \<l2 protocol> \<protocol type>stp\</protocol type> \<disable>false\</disable> \</l2 protocol> \</l2 protocol control> \</interface> \</interfaces> \</top> \</data> \</rpc reply>
