User-Bind-Netconf
此内容尚不支持你的语言。
User Bind
Section titled “User Bind”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /user-bind | Y | merge, replace, create, delete | — |
| /user-bind/alarms/{if-name} | Y | merge, replace, create, delete | — |
| /user-bind/user-bind-entries/{vlan-name}/{mac-address}/{ip-address}/{if-name} | Y | replace, create, delete | — |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage User-Bind configurations on AsterNOS devices.
Get Current User-Bind Configurations
Section titled “Get Current User-Bind Configurations”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>Set User-Bind Configurations
Section titled “Set User-Bind Configurations”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>Delete User-Bind Configurations
Section titled “Delete User-Bind Configurations”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>Show User-Bind Counter
Section titled “Show User-Bind Counter”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>Clear User-Bind Counter
Section titled “Clear User-Bind Counter”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>Properties Descriptions
Section titled “Properties Descriptions”Container for user-bind configurations
Section titled “Container for user-bind configurations”Tree Diagram
module: asternos-user-bind +--rw user-bind +--rw user-bind-entries | +--rw user-bind-entry* [ip-address mac-address if-name vlan-name] | +--rw vlan-name cmn:vlan-name | +--rw mac-address yang:mac-address | +--rw ip-address inet:ip-address-no-zone | +--rw if-name cmn:ethernet-port-name +--rw alarms +--rw alarm* [if-name] +--rw if-name union +--rw enable? boolean +--rw threshold? uint32Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| user-bind | M | Path-only node, has no configurable value. Container for user-bind configurations. | |
| user-bind-entries | M | Path-only node, has no configurable value. Container for static user binding entries. | |
| user-bind-entry | M | Path-only node, has no configurable value. | |
| vlan-name | O | cmn:vlan-name | VLAN name associated with the static user binding. |
| mac-address | O | yang:mac-address | MAC address of the static user binding. |
| ip-address | O | inet:ip-address-no-zone | IP address of the static user binding. |
| if-name | O | cmn:ethernet-port-name | Interface name associated with the static user binding. |
| alarms | M | Path-only node, has no configurable value. Container for security-related alarms. | |
| alarm | M | Path-only node, has no configurable value. | |
| if-name | O | Ethernet name | Interface, sub-ethernet interface or VLAN name associated with the alarm. |
| enable | O | ”true" "false” | Enable or disable the alarm. |
| threshold | O | 10..65536 | Threshold value for the alarm. Alarms will be triggered when this value is exceeded. |
Container for security-related alarms
Section titled “Container for security-related alarms”Tree Diagram
module: asternos-user-bind +--rw user-bind +--rw alarms +--rw alarm* [if-name] +--rw if-name union +--rw enable? boolean +--rw threshold? uint32Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| alarms | M | Path-only node, has no configurable value. Container for security-related alarms. | |
| alarm | M | Path-only node, has no configurable value. | |
| if-name | O | Ethernet name | Interface, sub-ethernet interface or VLAN name associated with the alarm. |
| enable | O | ”true" "false” | Enable or disable the alarm. |
| threshold | O | 10..65536 | Threshold value for the alarm. Alarms will be triggered when this value is exceeded. |
Container for static user binding entries
Section titled “Container for static user binding entries”Tree Diagram
module: asternos-user-bind +--rw user-bind +--rw user-bind-entries +--rw user-bind-entry* [ip-address mac-address if-name vlan-name] +--rw vlan-name cmn:vlan-name +--rw mac-address yang:mac-address +--rw ip-address inet:ip-address-no-zone +--rw if-name cmn:ethernet-port-nameTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| user-bind-entries | M | Path-only node, has no configurable value. Container for static user binding entries. | |
| user-bind-entry | M | Path-only node, has no configurable value. | |
| vlan-name | O | cmn:vlan-name | VLAN name associated with the static user binding. |
| mac-address | O | yang:mac-address | MAC address of the static user binding. |
| ip-address | O | inet:ip-address-no-zone | IP address of the static user binding. |
| if-name | O | cmn:ethernet-port-name | Interface name associated with the static user binding. |