User‑Bind
10 min
\<font color="#1d50a2">asternos user bind\</font> this chapter provides examples on how to use netconf to manage user bind configurations on asternos devices \<font color="#1d50a2">get current user bind configurations\</font> request example to get all user bind configurations via get config with subtree filter \<filter type="subtree"> \<top> \<user bind/> \</top> \</filter> response example \<data xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0"> \<top> \<user bind xmlns="http //asterfusion com/ns/yang/asternos user bind"> \<user bind entries> \<user bind entry> \<vlan name>vlan100\</vlan name> \<mac address>00 01 11 12 13 14\</mac address> \<ip address>10 1 1 1\</ip address> \<if name>ethernet1\</if name> \</user bind entry> \<user bind entry> \<vlan name>vlan100\</vlan name> \<mac address>00 01 21 22 23 24\</mac address> \<ip address>10 1 1 2\</ip address> \<if name>ethernet1\</if name> \</user bind entry> \</user bind entries> \<alarms> \<alarm> \<if name>ethernet1\</if name> \<enable>true\</enable> \<threshold>100\</threshold> \</alarm> \<alarm> \<if name>vlan100\</if name> \<enable>true\</enable> \<threshold>200\</threshold> \</alarm> \</alarms> \</user bind> \</top> \</data> \<font color="#1d50a2">set user bind configurations\</font> request example to set user bind entry via edit config \<config> \<top> \<user bind> \<user bind entries> \<user bind entry> \<vlan name>vlan100\</vlan name> \<mac address>00 01 11 12 13 14\</mac address> \<ip address>10 1 1 1\</ip address> \<if name>ethernet1\</if name> \</user bind entry> \<user bind entry> \<vlan name>vlan100\</vlan name> \<mac address>00 01 21 22 23 24\</mac address> \<ip address>10 1 1 2\</ip address> \<if name>ethernet1\</if name> \</user bind entry> \</user bind entries> \</user bind> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ a0d4d344 be40 42e7 bc2f 4de7cd4558b6"> \<ok/> \</rpc reply> request example to set user bind alarms via edit config \<config> \<top> \<user bind> \<alarms> \<alarm> \<if name>ethernet1\</if name> \<enable>true\</enable> \<threshold>100\</threshold> \</alarm> \<alarm> \<if name>vlan100\</if name> \<enable>true\</enable> \<threshold>200\</threshold> \</alarm> \</alarms> \</user bind> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ e4718dbd 1557 4971 a7c8 51bc0a70e926"> \<ok/> \</rpc reply> \<font color="#1d50a2">delete user bind configurations\</font> request example to delete user bind entry via edit config \<config> \<top> \<user bind> \<user bind entries> \<user bind entry operation="delete"> \<vlan name>vlan100\</vlan name> \<mac address>00 01 11 12 13 14\</mac address> \<ip address>10 1 1 1\</ip address> \<if name>ethernet1\</if name> \</user bind entry> \</user bind entries> \</user bind> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 509b1938 af5d 47f3 b5e3 b2dc63dfabd4"> \<ok/> \</rpc reply> request example to delete user bind alarms via edit config \<config> \<top> \<user bind> \<alarms> \<alarm operation="delete"> \<if name>ethernet1\</if name> \<enable>true\</enable> \<threshold>10000\</threshold> \</alarm> \</alarms> \</user bind> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 7f636610 dbcc 4450 8d74 d38caee90da3"> \<ok/> \</rpc reply> \<font color="#1d50a2">show user bind counter\</font> rpc example to show counters of interface for user bind via rpc show user bind counter \<show user bind counter/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ c7e0ae8e 5e7e 4ff0 88af 790094fc1473"> \<data xmlns="http //asterfusion com/ns/yang/asternos user bind"> \<counter> \<if name>vlan100\</if name> \<packets>156\</packets> \</counter> \<counter> \<if name>vlan200\</if name> \<packets>0\</packets> \</counter> \</data> \</rpc reply> \<font color="#1d50a2">clear user bind counter\</font> rpc example to clear counters of interface for user bind via rpc clear user bind counter \<clear user bind counter/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 8d934bf5 6adf 47b7 8772 dfcd29ca4287"> \<data xmlns="http //asterfusion com/ns/yang/asternos user bind">\</data> \</rpc reply>
