System information
Manual:SNMP
73
Object identifiers (OID)
Each OID identifies a variable that can be read via SNMP. Although the MIB file contains all the needed OID
values, you can also print individual OID information in the console with the print oid command at any menu level:
[admin@MikroTik] /interface> print oid
Flags: D - dynamic, X - disabled, R - running, S - slave
0 R name=.1.3.6.1.2.1.2.2.1.2.1 mtu=.1.3.6.1.2.1.2.2.1.4.1
mac-address=.1.3.6.1.2.1.2.2.1.6.1 admin-status=.1.3.6.1.2.1.2.2.1.7.1
oper-status=.1.3.6.1.2.1.2.2.1.8.1 bytes-in=.1.3.6.1.2.1.2.2.1.10.1
packets-in=.1.3.6.1.2.1.2.2.1.11.1 discards-in=.1.3.6.1.2.1.2.2.1.13.1
errors-in=.1.3.6.1.2.1.2.2.1.14.1 bytes-out=.1.3.6.1.2.1.2.2.1.16.1
packets-out=.1.3.6.1.2.1.2.2.1.17.1 discards-out=.1.3.6.1.2.1.2.2.1.19.1
errors-out=.1.3.6.1.2.1.2.2.1.20.1
Traps
SNMP traps enable router to notify data collector of interface changes and SNMP service status changes by sending
traps. It is possible to send out traps with security features to support SNMPv1 (no security). SNMPv2 and variants
and SNMPv3 with encryption and authorization.
For SNMPv2 and v3 you have to set up appropriately configured community as a trap-community to enable required
features (password or encryption/authorization)
SNMP write
Since RouterOS v3, SNMP write is supported for some functions. SNMP write allows to change router configuration
with SNMP requests. Consider to secure access to router or to router's SNMP, when SNMP and write-access are
enabled.
To change settings by SNMP requests, use the command below to allow SNMP write for the selected community,
Write-access option for SNMP is available from v3.14,
/snmp community set <number> write-access=yes
System Identity
It's possible to change router system identity by SNMP set command,
snmpset -c public -v 1 192.168.0.0 1.3.6.1.2.1.1.5.0 s New_Identity
• snmpset - SNMP application used for SNMP SET requests to set information on a network entity;
• public - router's community name;
• 192.168.0.0 - IP address of the router;
• 1.3.6.1.2.1.1.5.0 - SNMP value for router's identity;
SNMPset command above is equal to the RouterOS command,
/system identity set identity=New_Identity