Not able to reboot device via SNMP

Hi,

I’m not able to reboot a CRS317 unit using SNMP set.

I’m following SNMP - RouterOS - MikroTik Documentation

Set seems to be accepted:

/ # snmpset -c mywrite -v 1 10.10.132.10 1.3.6.1.4.1.14988.1.1.7.1.0 s 1
SNMPv2-SMI::enterprises.14988.1.1.7.1.0 = INTEGER: 0

But it does not reboot.

SNMP config:

[anur@SW-SUI-CRS317-1] /snmp/community> /snmp/export
# 2025-11-20 14:19:46 by RouterOS 7.20
# software id = 1GEK-VBAA
#
# model = CRS317-1G-16S+
# serial number = HGK09V31N1N
/snmp community
add addresses=10.0.0.0/8 name=mywrite write-access=yes
/snmp
set enabled=yes
[anur@SW-SUI-CRS317-1] /snmp/community>

Switch resources:

[anura@SW-SUI-CRS317-1] /snmp> /system/resource/ print
                   uptime: 1w21h16m46s
                  version: 7.20 (stable)
               build-time: 2025-09-29 09:33:57
         factory-software: 6.44.6
              free-memory: 912.9MiB
             total-memory: 1024.0MiB
                      cpu: ARM
                cpu-count: 2
            cpu-frequency: 800MHz
                 cpu-load: 2%
           free-hdd-space: 3084.0KiB
          total-hdd-space: 16.0MiB
  write-sect-since-reboot: 26255
         write-sect-total: 139861
        architecture-name: arm
               board-name: CRS317-1G-16S+
                 platform: MikroTik
[anura@SW-SUI-CRS317-1] /snmp>

Thanks for the help!

Just guessing here, but could be worth a quick try. The “s 1” in the snmpset command means “set value to string value ‘1’”.

The current value is INTEGER: 0

Maybe try the snmpset with “i 1” to set an INTEGER?

EDIT:

Just tried this out on a test router and your original command worked. It’s on version 7.19.2

snmpset -c xxxxxxxx -v 1 192.168.x.x 1.3.6.1.4.1.14988.1.1.7.1.0 s 1

Interestingly it seems the reason that “s 1” works is that snmp interprets string 1 as integer 49, its ascii representation. Learned something new.

1 Like

It didn't work:

/ # snmpset -c mywrite -v 1 10.10.132.10 1.3.6.1.4.1.14988.1.1.7.1.0 i 1
SNMPv2-SMI::enterprises.14988.1.1.7.1.0 = INTEGER: 0
/ #

Thanks!

What routeros version on you on? Perhaps something changed

1 Like

it worked @ 7.20.4

/ # snmpset -c mywrite -v 1 10.10.132.12 1.3.6.1.4.1.14988.1.1.7.1.0 s 1
SNMPv2-SMI::enterprises.14988.1.1.7.1.0 = INTEGER: 49
/ #

thanks for the help

Just tried this out on a test router and your original command worked. It’s on version 7.19.2

checked changelog and found

*) snmp - fixed SNMP SET operation (introduced in v7.20);

will test w/new ver

we're @ 7.20

Yeah, that will do it. The last couple major releases have been pretty hard. Think im staying with 19. 7.20.3 seems to be factory only and 7.20.4 broke webfig.

1 Like