Neighbors
MikroTik Neighbor Discovery protocol (MNDP) allows us to "find" devices compatible with MNDP or CDP (Cisco Discovery Protocol) or LLDP in Layer2 broadcast domain. It can be used to map out your network.
It can be configured under: /ip neighbor
This sub-menu lists all discovered neighbors in the Layer-2 broadcast domain. It shows to which interface neighbor is connected, shows its IP/MAC addresses, and several MikroTik related parameters. The list is read-only.
Starting from ROS v6.45 amount of neighbor entries are limited to (total RAM in megabytes)*16 per interface to avoid memory exhaustion.
As an example, you can see several RouterBoards and two Cisco routers:
[admin@MikroTik] /ip neighbor> print # INTERFACE ADDRESS MAC-ADDRESS IDENTITY VERSION BOARD 0 ether13 192.168.33.2 00:0C:42:00:38:9F MikroTik 5.99 RB1100AHx2 1 ether11 1.1.1.4 00:0C:42:40:94:25 test-host 5.8 RB1000 2 Local 10.0.11.203 00:02:B9:3E:AD:E0 c2611-r1 Cisco I... 3 Local 10.0.11.47 00:0C:42:84:25:BA 11.47-750 5.7 RB750 4 Local 10.0.11.254 00:0C:42:70:04:83 tsys-sw1 5.8 RB750G 5 Local 10.0.11.202 00:17:5A:90:66:08 c7200 Cisco I...
Discovery configuration
Sub-menu: /ip neighbor discovery-settings
In this menu, it is possible to change the state of the interface whether it participates in neighbor discovery or not. If it does, it will send out basic information about system and process received discovery packets broadcasted in Layer-2 network. List of interfaces is automatically managed by RouterOS. Items in the list cannot be removed nor added. Default settings depend on interface type and current state.
Removing an interface from this menu configuration will disable both the discovery of neighbors on this interface and also the possibility of discovering this device itself on that interface.
Since RouterOS v6.44 a neighbor discovery is working on individual slave interfaces. Whenever a master interface (e.g. bonding or bridge) is included in the discovery interface list, all its slave interfaces will automatically participate in neighbor discovery. It is possible to allow neighbor discovery only to some slave interfaces. To do that, include the particular slave interface in the list and make sure that the master interface is not included.
/interface bonding add name=bond1 slaves=ether5,ether6 /interface list add name=only-ether5 /interface list member add interface=ether5 list=only-ether5 /ip neighbor discovery-settings set discover-interface-list=only-ether5
The neighbor list now shows a master interface and actual slave interface on which a discovery message was received.
[admin@R2] > ip neighbor print # INTERFACE ADDRESS MAC-ADDRESS IDENTITY VERSION BOARD 0 ether5 192.168.88.1 CC:2D:E0:11:22:33 R1 6.45.4 ... CCR1036-8G-2S+ bond1
LLDP
RouterOS sends out:
Chassis subtype (MAC)
- Port subtype (interface name)
- TTL
- System name (system identity)
- Sys description ({platform} RouterOS {osvers} {boardName})
- All IP addresses configured on the port
RouterOS accepts and processes:
- identity (LLDP_TYPE_SYS_NAME)
- interfaceName (depending on the priority, if one is empty checks the next: LLDP_TYPE_CHASSIS_ID, LLDP_TYPE_PORT_ID, LLDP_TYPE_PORT_DESC)
- ip4 (first entry of IPv4 LLDP_TYPE_MANAGEMENT_ADDR)
- ip6 (first entry of IPv6 LLDP_TYPE_MANAGEMENT_ADDR)
- TTL (LLDP_TYPE_TTL)
- MAC (Source - 6-11 byte)