mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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>
This commit is contained in:
33
doc/Support/Device-Notes/Routeros.md
Normal file
33
doc/Support/Device-Notes/Routeros.md
Normal file
@@ -0,0 +1,33 @@
|
||||
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 <cr>
|
||||
|
||||
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
|
Reference in New Issue
Block a user