Files
librenms-librenms/doc/Support/Device-Notes/Routeros.md
Peca Nesovanovic 08dd8a07db Mikrotik vlans discovery, v2 (#13427)
* Mikrotik vlans discovery, v2

* styleci cleanup

* added Routeros entry in mkdocs.yml

* fixed typo in mkdocs.yml

* Better Vlan Eloquent Model

* Missed one

* Use new SnmpQuery code

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-10-26 18:31:44 -05:00

1.2 KiB

source: doc/Support/Device-Notes/Routeros.md path: blob/master/doc/

This is attempt to get vlans information from Mikrotik RouterOS.

Installation

Installation is very simple. On mikrotik we need:

  1. one script, named "LNMS_vlans"
  2. snmp community with write permission

Copy the scripts from librenms-agent/snmp/Routeros and place in /system/scripts Set snmp community to have WRITE permission in /snmp/community

It is strongly recomended that snmp allowed address is narrowed down to /32 because write permission could allow attack on device

Theory of operation:

Mikrotik vlan discovery plugin using ability of ROS to "fire up" a script trough SNMP At first, LibreNMS check for existence of script, and if it present, it will be started Sript try to gather information from: a. /interface/bridge/vlan for tagged ports inside bridge b. /interface/bridge/vlan for currently untagged ports inside bridge c. /interface/bridge/port for ports PVID (untagged) inside bridge d. /interface/vlan for plain (old style) vlans

after information is gathered, it is transmitted to LibreNMS over SNMP protocol is: type,vlanId,ifName

i.e: T,254,ether1 is translated to Tagged vlan 254 on port ether1 U,100,wlan2 is translated to Untagged vlan 100 on port wlan2