Skip to content

SNMP

The Simple Network Management Protocol (SNMP) in RouterOS allows remote monitoring and management of the router. RouterOS supports SNMPv2c (community-based) and SNMPv3 (with authentication and encryption).

The SNMP configuration is located at:

  • SNMP Settings: /snmp
  • SNMP Community: /snmp community
  • SNMP Traps: /snmp (trap-target, trap-community, trap-version properties)

SNMPv2c uses community strings for authentication. It’s simple but provides no encryption.

/snmp set enabled=yes
/snmp community set name=public

SNMPv3 provides authentication and optional encryption. It’s recommended for production environments.

SNMPv3 defines three security levels, each providing different levels of security:

1. noAuthNoPriv (No Authentication, No Privacy)

Section titled “1. noAuthNoPriv (No Authentication, No Privacy)”
  • Authentication: None
  • Encryption: None
  • Use case: Testing or trusted networks only
/snmp set enabled=yes
/snmp community set name=mycommunity security=none

This security level sends data in plain text and provides no verification of the sender’s identity.

2. authNoPriv (Authentication, No Privacy)

Section titled “2. authNoPriv (Authentication, No Privacy)”
  • Authentication: MD5 or SHA1
  • Encryption: None
  • Use case: Environments where authentication is needed but encryption is not required
/snmp set enabled=yes
/snmp community set name=mycommunity security=private authentication-protocol=sha1 authentication-password=authpass123

This level verifies the identity of the sender using a hash-based authentication protocol but does not encrypt the data payload.

Authentication Protocols:

  • MD5: Faster but less secure (128-bit hash)
  • SHA1: More secure but slower (160-bit hash)

3. authPriv (Authentication and Privacy/Encryption)

Section titled “3. authPriv (Authentication and Privacy/Encryption)”
  • Authentication: MD5 or SHA1
  • Encryption: AES or DES
  • Use case: Production environments requiring maximum security
/snmp set enabled=yes
/snmp community set name=mycommunity security=private authentication-protocol=sha1 authentication-password=authpass123 encryption-protocol=aes encryption-password=encpass123

This level provides both authentication and encryption, ensuring that data is both verified and protected from eavesdropping.

Encryption Protocols:

  • AES: Recommended (128-bit, 192-bit, or 256-bit)
  • DES: Legacy option (56-bit, less secure)
/snmp set enabled=yes contact="[email protected]" location="Data Center"
/snmp community set name=public
/snmp set enabled=yes
/snmp community add name=mycommunity security=private authentication-protocol=sha1 authentication-password=MyAuthPass123
/snmp set enabled=yes
/snmp community add name=mycommunity security=private authentication-protocol=sha1 authentication-password=MyAuthPass123 encryption-protocol=aes encryption-password=MyEncPass123
/snmp set trap-community=public trap-version=2
/snmp set trap-target=192.168.88.100
PropertyTypeDescription
enabledyes | noEnable or disable SNMP
contactstringSystem contact information
locationstringSystem location
engine-idstringSNMP engine ID
trap-communitystringCommunity string for traps
trap-version1 | 2 | 3SNMP version for traps
PropertyTypeDescription
namestringCommunity name
securitynone | authorized | privateSecurity level
read-accessyes | noAllow read operations
write-accessyes | noAllow write operations
authentication-protocolMD5 | SHA1Authentication protocol (SNMPv3)
authentication-passwordstringAuthentication password (SNMPv3)
encryption-protocolDES | AESEncryption protocol (SNMPv3)
encryption-passwordstringEncryption password (SNMPv3)
  • Verify SNMP is enabled: /snmp print
  • Check firewall rules allow SNMP (UDP port 161)
  • Verify community name matches
  • For SNMPv3, verify security level and passwords are correct
  • Verify username exists in /snmp community
  • Check authentication protocol matches (MD5 or SHA1)
  • Ensure password is correct and meets minimum length requirements
  • For authPriv, verify encryption settings are correct
  • Verify trap destination is reachable
  • Check trap community matches
  • Ensure firewall allows UDP port 162 outbound