This article uses ECS4100-28T for the example.
Step 1:
Setting the static MAC address (40-16-7e-66-a4-36) on port 7.
snmpset -v 2c -c private 192.168.1.1 .1.3.6.1.2.1.17.7.1.3.1.1.3.1.64.22.126.102.164.53.0 x 02
64.22.126.102.164.53 = 40-16-7e-66-a4-36
Those value means the MAC address which you want to set and MAC address need be converted from Hexadecimal to Decimal.
Hexadecimal | -> | Decimal |
40 | -> | 64 |
16 | -> | 22 |
7e | -> | 126 |
"x" means octets.
"02" means port 7.
- Here's the way to calculate the value.
Please see this form to understand how to specify the value for port number.
- If you want to set the port 1, then the value is 80.
Note:
You cannot use single digit, ex: "x 8" in the end, it will fail.
The correct value of port 1 should be double digits, ex: "x 80".
Here's another example.
- If you want to set the port 10, the value is 0040.
Step 2:
Setting the static MAC address type.
snmpset -v 2c -c private 192.168.1.1 .1.3.6.1.2.1.17.7.1.3.1.1.4.1.64.22.126.102.164.53.0 i 3
"i" means integer32.
"3" means type 3.
- There are five types for this value, Edgecore switch supported two types.
permanent(3)
deleteOnReset(4)
Here's the Result:
We can see the MAC address which be configured to MAC table via SNMP successfully.
Prev Page How to configure the input/output rate limit per port via SNMP ?