SNMP - snmpset ifAlias or ifAdminStatus - no effect, can't change

Hi,

it’s posible change interface description or disable interface via SNMP?


snmpwalk -c kancel -v2c ip.lan .1.3.6.1.2.1.31.1.1.1.18.8
IF-MIB::ifAlias.8 = STRING: STB

snmpset -c kancel -v2c ip.lan .1.3.6.1.2.1.31.1.1.1.18.8 s test
IF-MIB::ifAlias.8 = STRING: test

Return value looks OK, but no change

snmpwalk -c kancel -v2c ip.lan .1.3.6.1.2.1.31.1.1.1.18.8
IF-MIB::ifAlias.8 = STRING: STB

Same with OID .1.3.6.1.2.1.2.2.1.7 when i want disable interface.

RB2011, RB493AH, CCR1036
v6.49.1

Thnx

Did not work on my hEX router. SNMP string is set to write ok.
Not sure what you can and can not with SNMP.

What is your goal? Can you use oter tools: API SSH HTTP Script etc

Interface numbering can also be strange, so two router can have different number. Needs to be tested before changeing.

Eks:

IF-MIB::ifName.1 = STRING: ether1
IF-MIB::ifName.2 = STRING: Bridge1
IF-MIB::ifName.3 = STRING: ether3
IF-MIB::ifName.4 = STRING: ether4
IF-MIB::ifName.5 = STRING: ether5
IF-MIB::ifName.6 = STRING: pptp-in1
IF-MIB::ifName.8 = STRING: ether2
IF-MIB::ifName.12 = STRING: VLAN20

I use uniform SNMP management

  • set description when device/customer/service is connect to port


  • disable port when i need

99% other devices can set description with this IF-MIB OID.
I dont want to use API for simple things

Thnx

The Mikrotik SNMP implementation is mostly read-only

From the manual:

Since RouterOS v3, SNMP write is supported for some functions

Seems that not much has changed in many years :slight_smile: