This section provides a sample of configuring the source IP address of Trap messages sent from the switch to the NMS using the rpc method.
Operation |
XPATH |
|---|---|
rpc |
/ietf-snmp:snmp/huawei-snmp:source-interface |
Item |
Data |
Description |
|---|---|---|
Source IP address of Trap messages sent from the switch to the NMS |
Vlanif5 |
Specify the IP address of VLANIF interface 5 as the source IP address of the Trap messages sent to the NMS. |
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="15" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<snmp:snmp xmlns:snmp="urn:ietf:params:xml:ns:yang:ietf-snmp">
<snmp:engine>
<snmp:enabled>true</snmp:enabled>
</snmp:engine>
<hw-snmp:source-interface xmlns:hw-snmp="urn:huawei:params:xml:ns:yang:huawei-snmp">Vlanif5</hw-snmp:source-interface>
</snmp:snmp>
</config>
</edit-config>
</rpc>
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="15"> <ok/> </rpc-reply>
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="15">
<rpc-error>
<error-app-tag>-1</error-app-tag>
<error-message>Service process failed.</error-message>
<error-info>Error on node/ietf-snmp:snmp/engine/enabled</error-info>
</rpc-error>
</rpc-reply>