跳转到内容
Ask AI

User‑Bind

此内容尚不支持你的语言。

This chapter provides examples on how to use Netconf to manage User-Bind configurations on AsterNOS devices.

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>

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>

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>

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>

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>