This section describes how to configure storm control using the config method.
Operation |
XPATH |
---|---|
edit-config:config |
/huawei-storm-control:storm-controls/storm-control/packet-type /huawei-storm-control:storm-controls/storm-control/rate-type/packet/min-rate /huawei-storm-control:storm-controls/storm-control/rate-type/packet/max-rate |
Item |
Data |
Description |
---|---|---|
Interface number |
GigabitEthernet0/0/1 |
Configure storm control in packet rate limit mode for broadcast packets on GE0/0/1. The lower threshold is 3000 pps, and the upper threshold is 6000 pps. |
Interface type |
ethernetCsmacd |
|
Type of packets for which storm control is enabled |
broadcast |
|
Lower threshold in packet rate limit mode |
3000 |
|
Upper threshold in packet rate limit mode |
6000 |
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>GigabitEthernet0/0/1</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
<storm-control:storm-controls xmlns:storm-control="urn:huawei:yang:huawei-storm-control">
<storm-control:storm-control>
<storm-control:packet-type>broadcast</storm-control:packet-type>
<storm-control:packet>
<storm-control:min-rate>3000</storm-control:min-rate>
<storm-control:max-rate>6000</storm-control:max-rate>
</storm-control:packet>
</storm-control:storm-control>
</storm-control:storm-controls>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
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="3"> <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="3"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-path>/</error-path> <error-message>parse rpc config error.(Unknown element "interfaces".).</error-message> </rpc-error> </rpc-reply>