Neighbor Discovery protocols allow us to find devices compatible with MNDP (MikroTik Neighbor Discovery Protocol), CDP (Cisco Discovery Protocol), or LLDP (Link Layer Discovery Protocol) in the Layer2 broadcast domain. It can be used to map out your network.
The neighbor list shows all discovered neighbors in the Layer2 broadcast domain. It shows to which interface neighbor is connected, its IP/MAC addresses, and other related parameters. The list is read-only, an example of a neighbor list is provided below:
|address (IP)||The highest IP address configured on a discovered device|
|address6 (IPv6)||IPv6 address configured on a discovered device|
|age (time)||Time interval since last discovery packet|
|board (string)||RouterBoard model. Displayed only to devices with installed RouterOS|
|identity (string)||Configured system identity|
|interface (string)||Interface name to which discovered device is connected|
|interface-name (string)||Interface name on the neighbor device connected to the L2 broadcast domain. Applies to CDP.|
|ipv6 (yes | no)||Shows whether the device has IPv6 enabled.|
|mac-address (MAC)||Mac address of the remote device. Can be used to connect with mac-telnet.|
|platform (string)||Name of the platform. For example "MikroTik", "cisco", etc.|
|software-id (string)||RouterOS software ID on a remote device. Applies only to devices installed with RouterOS.|
|system-caps (string)||System capabilities reported by the Link-Layer Discovery Protocol (LLDP).|
|system-caps-enabled (string)||Enabled system capabilities reported by the Link-Layer Discovery Protocol (LLDP).|
|unpack (none|simple|uncompressed-headers|uncompressed-all)||Shows the discovery packet compression type.|
|uptime (time)||Uptime of remote device. Shown only to devices installed with RouterOS.|
|version (string)||Version number of installed software on a remote device|
Starting from RouterOS v6.45, the number of neighbor entries are limited to (total RAM in megabytes)*16 per interface to avoid memory exhaustion.
It is possible to change whether an interface participates in neighbor discovery or not using an Interface list. If the interface is included in the discovery interface list, it will send out basic information about the system and process received discovery packets broadcasted in the Layer2 network. Removing an interface from the interface list will disable both the discovery of neighbors on this interface and also the possibility of discovering this device itself on that interface.
|discover-interface-list (string; Default: static)||Interface list on which members the discovery protocol will run on|
|lldp-med-net-policy-vlan (integer 0..4094; Default: disabled)|
Advertised VLAN ID for LLDP-MED Network Policy TLV. This allows assigning a VLAN ID for LLDP-MED capable devices, such as VoIP phones. The TLV will only be added to interfaces where LLDP-MED capable devices are discovered. Other TLV values are predefined and cannot be changed:
|protocol (cdp | lldp | mndp; Default: cdp,lldp,mndp)||List of used discovery protocols|
Since RouterOS v6.44, 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.
Now the neighbor list shows a master interface and actual slave interface on which a discovery message was received.
Depending on RouterOS configuration, different type-length-value (TLV) can be sent in the LLDP message, this includes: