< Home

Configuring the Maximum Size of SNMP Packets Received and Sent by the Switch

This section provides a sample of configuring the maximum size of SNMP packets received and sent by the switch using the rpc method.

Table 1 Configuring the maximum size of SNMP packets received and sent by the switch

Operation

XPATH

rpc

/ietf-snmp:snmp/huawei-snmp:mms

Data Requirements

Item

Data

Description

Maximum size of SNMP packets received and sent by the switch

484

Set the maximum size of SNMP packets received and sent by the switch to 484 bytes.

Request Example

<?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:mms xmlns:hw-snmp="urn:huawei:params:xml:ns:yang:huawei-snmp">484</hw-snmp:mms>
      </snmp:snmp>
    </config>
  </edit-config>
</rpc>

Response Example

# Sample of successful response
<?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>
# Sample of failed response
<?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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >