The following is the example for ECS4120 series.
[SNMPSET command format]
snmpset -v 2c -c private {switch ip} { rlPortInputStatus | rlPortOutputStatus | rlPortInputLimitInKilo | rlPortOutputLimitInKilo}.{ rlPortIndex } {integer} {value}
For rlPortInputStatus, OID 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.6
Set OID 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.6 to enabled(1) input rate limit.
Set OID 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.6 to disabled(2) input rate limit.
For rlPortOutputStatus, OID 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.7
Set OID 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.7 to enabled(1) output rate limit.
Set OID 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.7 to disabled(2) output rate limit.
For rlPortInputLimitInKilo, OID 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.10
Value of the input rate limit. (Range: <64-10000000> kilobits per second.)
For rlPortOutputLimitInKilo, OID 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.11
Value of the output rate limit. (Range: <64-10000000> kilobits per second.)
For rlPortIndex: The port interface of the portTable.
The ifIndex value of the port or trunk.
Example:
(1) Enable input rate limit with 100M on port Eth1/1.
C:\>snmpset -v 2c -c private 192.168.1.1 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.6.1 i 1 SNMPv2-SMI::enterprises.259.10.1.45.1.16.1.2.1.6.1 = INTEGER: 1
C:\>snmpset -v 2c -c private 192.168.1.1 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.10.1 i 100000 SNMPv2-SMI::enterprises.259.10.1.45.1.16.1.2.1.10.1 = INTEGER: 100000
(2) Enable output rate limit with 10M on port Eth1/2.
C:\>snmpset -v 2c -c private 192.168.1.1 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.7.2 i 1 SNMPv2-SMI::enterprises.259.10.1.45.1.16.1.2.1.7.2 = INTEGER: 1
C:\>snmpset -v 2c -c private 192.168.1.1 1.3.6.1.4.1.259.10.1.45.1.16.1.2.1.11.2 i 10000 SNMPv2-SMI::enterprises.259.10.1.45.1.16.1.2.1.11.2 = INTEGER: 10000
Result:
Console#show running-config interface ethernet 1/1 interface ethernet 1/1 rate-limit input 100000 !
Console#show interfaces switchport ethernet 1/1 Information of Eth 1/1 Broadcast Threshold : Disabled Multicast Threshold : Disabled Unknown Unicast Threshold : Disabled LACP Status : Disabled Egress Rate Limit : Disabled, 1000000 kbits/second VLAN Membership Mode : Hybrid Ingress Rule : Disabled Acceptable Frame Type : All frames Native VLAN : 1 Priority for Untagged Traffic : 0 GVRP Status : Disabled Allowed VLAN : 1(u) Forbidden VLAN : 802.1Q Tunnel Status : Disabled 802.1Q Tunnel Mode : Normal 802.1Q Tunnel TPID : 8100 (Hex) Layer 2 Protocol Tunnel : None Broadcast Block : Disabled Unknown Multicast Block : Disabled Unknown Unicast Block : Disabled
Console#show running-config interface ethernet 1/2 interface ethernet 1/2 rate-limit output 10000 !
Console#show interfaces switchport ethernet 1/2 Information of Eth 1/2 Broadcast Threshold : Disabled Multicast Threshold : Disabled Unknown Unicast Threshold : Disabled LACP Status : Disabled Ingress Rate Limit : Disabled, 1000000 kbits/second VLAN Membership Mode : Hybrid Ingress Rule : Disabled Acceptable Frame Type : All frames Native VLAN : 1 Priority for Untagged Traffic : 0 GVRP Status : Disabled Allowed VLAN : 1(u) Forbidden VLAN : 802.1Q Tunnel Status : Disabled 802.1Q Tunnel Mode : Normal 802.1Q Tunnel TPID : 8100 (Hex) Layer 2 Protocol Tunnel : None Broadcast Block : Disabled Unknown Multicast Block : Disabled Unknown Unicast Block : Disabled