NETCONF Configuration Guide
...
Mac‑Security
IPSG
7 min
asternos ipsg this chapter provides examples on how to use netconf to manage ipsg configurations on asternos devices get current ipsg configurations request example to get all ipsg configurations via get config with subtree filter \<filter type="subtree"> \<top> \<ipsg/> \</top> \</filter> response example \<data xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0"> \<top> \<ipsg xmlns="http //asterfusion com/ns/yang/asternos ipsg"> \<interfaces> \<interface> \<name>ethernet1\</name> \<ip type>v6\</ip type> \<enable>true\</enable> \</interface> \<interface> \<name>vlan100\</name> \<ip type>v6\</ip type> \<enable>true\</enable> \<trusted interfaces>ethernet2\</trusted interfaces> \<trusted interfaces>ethernet3\</trusted interfaces> \</interface> \<interface> \<name>ethernet1\</name> \<ip type>v4\</ip type> \<enable>true\</enable> \</interface> \<interface> \<name>vlan100\</name> \<ip type>v4\</ip type> \<enable>true\</enable> \<trusted interfaces>ethernet3\</trusted interfaces> \<trusted interfaces>ethernet2\</trusted interfaces> \</interface> \</interfaces> \</ipsg> \</top> \</data> set ipsg configuration of interface note 'enable' and 'trust enable' cannot be configured as true at the same time ipsg configuration of interface must specify ip type request example to set ipsg configuration of interface to enabled via edit config \<config> \<top> \<ipsg> \<interfaces> \<interface> \<name>ethernet1\</name> \<ip type>v4\</ip type> \<enable>true\</enable> \</interface> \<interface> \<name>vlan100\</name> \<ip type>v4\</ip type> \<enable>true\</enable> \<trusted interfaces>ethernet2\</trusted interfaces> \<trusted interfaces>ethernet3\</trusted interfaces> \</interface> \<interface> \<name>ethernet1\</name> \<ip type>v6\</ip type> \<enable>true\</enable> \</interface> \<interface> \<name>vlan100\</name> \<ip type>v6\</ip type> \<enable>true\</enable> \<trusted interfaces>ethernet2\</trusted interfaces> \<trusted interfaces>ethernet3\</trusted interfaces> \</interface> \</interfaces> \</ipsg> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ b40b1881 532f 44e9 9db5 27ad280454b2"> \<ok/> \</rpc reply> request example to set ipsg configuration of interface to trust enabled via edit config \<config> \<top> \<ipsg> \<interfaces> \<interface> \<name>ethernet1\</name> \<ip type>v6\</ip type> \<trust enable>true\</trust enable> \</interface> \<interface> \<name>ethernet1\</name> \<ip type>v4\</ip type> \<trust enable>true\</trust enable> \</interface> \</interfaces> \</ipsg> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 98421788 dd19 4dfa a6cd 651a5a14fe6c"> \<ok/> \</rpc reply> delete ipsg configuration request example to delete ipsg configuration of interface via edit config \<config> \<top> \<ipsg> \<interfaces> \<interface operation="delete"> \<name>ethernet1\</name> \<ip type>v4\</ip type> \</interface> \<interface operation="delete"> \<name>ethernet1\</name> \<ip type>v6\</ip type> \</interface> \</interfaces> \</ipsg> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ d76fc07a 6f40 442c 8748 543754dac541"> \<ok/> \</rpc reply>
