This article uses ECS4100-28T for the example.
Setting the static MAC address (40-16-7e-66-a4-36) on port 7.
snmpset -v 2c -c private 192.168.1.1 .22.214.171.124.126.96.36.199.188.8.131.52.184.108.40.206.220.127.116.11.0 x 02
18.104.22.168.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.
"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.
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.
Setting the static MAC address type.
snmpset -v 2c -c private 192.168.1.1 .22.214.171.124.126.96.36.199.188.8.131.52.184.108.40.206.220.127.116.11.0 i 3
"i" means integer32.
"3" means type 3.
- There are five types for this value, Edgecore switch supported two types.
Here's the Result:
We can see the MAC address which be configured to MAC table via SNMP successfully.