SNMP
此内容尚不支持你的语言。
Enable Feature SNMP
Section titled “Enable Feature SNMP”Request example to enable SNMP service via edit-config
<config> <top> <snmp> <global operation="create"> <enabled>true</enabled> </global> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7585073b-5463-434e-926f-368243ff7983"> <ok/></rpc-reply>Disable Feature SNMP
Section titled “Disable Feature SNMP”Request example to disable SNMP service via edit-config
<config> <top> <snmp> <global operation="delete"/> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b7207c0e-17c2-4e13-99bc-f2c2eaa6108b"> <ok/></rpc-reply>Get SNMP Gloabl Configurations
Section titled “Get SNMP Gloabl Configurations”Request example to get SNMP global configurations via edit-config
<filter type="subtree"> <top xmlns="http://asterfusion.com/ns/yang/asternos-interfaces"> <snmp> <global/> </snmp> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:8e0d19dd-780c-4ee9-b469-b5bc771669e7"> <data> <top> <snmp xmlns="http://asterfusion.com/ns/yang/asternos-snmp"> <global> <enabled>false</enabled> </global> </snmp> </top> </data></rpc-reply>Create SNMP Community
Section titled “Create SNMP Community”Request example to create SNMP community via edit-config
<config> <top> <snmp> <snmp-communities> <snmp-community> <community-name>test</community-name> <community-permission>RO</community-permission> </snmp-community> </snmp-communities> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ab57b60c-92da-4959-8232-278e60114589"> <ok/></rpc-reply>Get SNMP Community
Section titled “Get SNMP Community”Request example to create SNMP community via edit-config
<filter type="subtree"> <top> <snmp> <snmp-communities/> </snmp> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9da7fdfc-2faa-41ac-bd2b-e551583fbf24"> <data> <top> <snmp xmlns="http://asterfusion.com/ns/yang/asternos-snmp"> <snmp-communities> <snmp-community> <community-name>test</community-name> <community-permission>RO</community-permission> </snmp-community> </snmp-communities> </snmp> </top> </data></rpc-reply>Delete SNMP Community
Section titled “Delete SNMP Community”Request example to delete SNMP community via edit-config
<config> <top> <snmp> <snmp-communities> <snmp-community operation="delete"> <community-name>test</community-name> </snmp-community> </snmp-communities> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:36e810cd-d456-4c3f-a142-a827c0feb642"> <ok/></rpc-reply>Create SNMP User
Section titled “Create SNMP User”Request example to create SNMP user via edit-config
<config> <top> <snmp> <snmp-users> <snmp-user operation="create"> <user-name>test1</user-name> <authen-mode>MD5</authen-mode> <authen-key>12345678</authen-key> <privacy-mode>DES</privacy-mode> <privacy-key>87654321</privacy-key> <user-type>Priv</user-type> <permission>RW</permission> </snmp-user> </snmp-users> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7f77db16-1780-403e-8aa7-02af36849a18"> <ok/></rpc-reply>Get SNMP User
Section titled “Get SNMP User”Request example to get SNMP user via get-config
<filter type="subtree"> <top> <snmp> <snmp-users/> </snmp> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:11dc90c3-74dc-4fb2-bf1b-ddf4b77d9d1e"> <data> <top> <snmp xmlns="http://asterfusion.com/ns/yang/asternos-snmp"> <snmp-users> <snmp-user> <user-name>test1</user-name> <authen-mode>MD5</authen-mode> <authen-key>12345678</authen-key> <privacy-mode>DES</privacy-mode> <privacy-key>87654321</privacy-key> <user-type>Priv</user-type> <permission>RW</permission> </snmp-user> </snmp-users> </snmp> </top> </data></rpc-reply>Delete SNMP user
Section titled “Delete SNMP user”Request example to delete specified SNMP user via edit-config
<config><top> <snmp> <snmp-users> <snmp-user operation="delete"> <user-name>test1</user-name> </snmp-user> </snmp-users> </snmp></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:570036c1-7e0a-4bd9-9ece-25f720f46464"> <ok/></rpc-reply>Create SNMP Source
Section titled “Create SNMP Source”Request example to create SNMP source configurations via edit-config
<config> <top> <snmp> <snmp-sources> <snmp-source operation="create"> <source-ip>192.168.18.148</source-ip> <udp-port>165</udp-port> <vrf-name>default</vrf-name> </snmp-source> </snmp-sources> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ee179679-8b00-4fb0-9cc1-85db9969428f"> <ok/></rpc-reply>Get SNMP Source
Section titled “Get SNMP Source”Request example to get SNMP source configurations via get-config
<filter type="subtree"> <top xmlns="http://asterfusion.com/ns/yang/asternos-interfaces"> <snmp> <snmp-sources/> </snmp> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7d19a01e-80f0-4092-9ff3-0f2bc0371dfb"> <data> <top> <snmp xmlns="http://asterfusion.com/ns/yang/asternos-snmp"> <snmp-sources> <snmp-source> <source-ip>192.168.18.148</source-ip> <udp-port>165</udp-port> <vrf-name>default</vrf-name> </snmp-source> </snmp-sources> </snmp> </top> </data></rpc-reply>Delete SNMP Source
Section titled “Delete SNMP Source”Request example to delete specified SNMP source configurations via edit-config
<config> <top> <snmp> <snmp-sources> <snmp-source operation="delete"> <source-ip>192.168.18.148</source-ip> <udp-port>165</udp-port> <vrf-name>default</vrf-name> </snmp-source> </snmp-sources> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:da88117c-7f15-4eef-a427-19c123a2efd2"> <ok/></rpc-reply>Create SNMP Trap
Section titled “Create SNMP Trap”Request example to create SNMP trap via edit-config
<config> <top> <snmp> <snmp-traps> <snmp-trap operation="create"> <trap-type>v2c</trap-type> <trap-ip>192.168.18.148</trap-ip> <community-name>test</community-name> </snmp-trap> </snmp-traps> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:60161aa1-60e3-4fb8-9451-37bd228a5c00"> <ok/></rpc-reply>Get SNMP Trap
Section titled “Get SNMP Trap”Request example to get SNMP trap via get-config
<filter type="subtree"> <top> <snmp> <snmp-traps/> </snmp> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:60a4b0f8-9387-42ba-863a-86fa7ad61916"> <data> <top> <snmp xmlns="http://asterfusion.com/ns/yang/asternos-snmp"> <snmp-traps> <snmp-trap> <trap-type>v2c</trap-type> <trap-ip>192.168.18.148</trap-ip> <udp-port>162</udp-port> <community-name>test</community-name> </snmp-trap> </snmp-traps> </snmp> </top> </data></rpc-reply>Delete SNMP Trap
Section titled “Delete SNMP Trap”Request example to delete SNMP trap via edit-config
<config> <top> <snmp> <snmp-traps> <snmp-trap operation="delete"> <trap-type>v2c</trap-type> </snmp-trap> </snmp-traps> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b43a9004-f6aa-481b-b935-a4053fca7f38"> <ok/></rpc-reply>Create SNMP Threshold
Section titled “Create SNMP Threshold”Request example to create SNMP threshold via edit-config
<config> <top> <snmp> <system-usage-threshold operation="create"> <cpu-usage>66</cpu-usage> <memory-usage>77</memory-usage> </system-usage-threshold> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2f4a2114-666d-4d56-a8b4-88cefc9cea4b"> <ok/></rpc-reply>Get SNMP Threshold
Section titled “Get SNMP Threshold”Request example to get SNMP threshold via get-config
<filter type="subtree"> <top> <snmp> <system-usage-threshold/> </snmp> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:e66cf9e8-79ee-460d-8d45-6cb2fb3fb647"> <data> <top> <snmp xmlns="http://asterfusion.com/ns/yang/asternos-snmp"> <system-usage-threshold> <cpu-usage>66</cpu-usage> <memory-usage>77</memory-usage> </system-usage-threshold> </snmp> </top> </data></rpc-reply>Delete SNMP Threshold
Section titled “Delete SNMP Threshold”Request example to delete SNMP threshold via edit-config
<config> <top> <snmp> <system-usage-threshold operation="delete"/> </snmp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:81d1167a-6253-490e-b583-0c9f64ad09ad"> <ok/></rpc-reply>