Community discussions

MikroTik App
 
namespace
just joined
Topic Author
Posts: 2
Joined: Mon Nov 29, 2021 12:46 pm

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

Mon Nov 29, 2021 1:28 pm

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
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

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

Mon Nov 29, 2021 3:18 pm

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
 
namespace
just joined
Topic Author
Posts: 2
Joined: Mon Nov 29, 2021 12:46 pm

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

Mon Nov 29, 2021 3:32 pm

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
 
tdw
Forum Guru
Forum Guru
Posts: 1843
Joined: Sat May 05, 2018 11:55 am

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

Mon Nov 29, 2021 4:18 pm

The Mikrotik SNMP implementation is mostly read-only
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

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

Mon Nov 29, 2021 5:47 pm

From the manual:
Since RouterOS v3, SNMP write is supported for some functions
Seems that not much has changed in many years :)

Who is online

Users browsing this forum: Amazon [Bot] and 82 guests