-
Notifications
You must be signed in to change notification settings - Fork 99
MNDP
Claude edited this page Jul 13, 2026
·
6 revisions
- https://help.mikrotik.com/docs/display/ROS/Neighbor+discovery
- http://wirelessconnect.eu/articles/mndp
- https://hadler.me/cc/mikrotik-neighbor-discovery-mndp/
- https://github.com/xmegz/MndpTray/
Supported by tik4net (no open connection needed) via MndpHelper in the tik4net.Mndp namespace.
using tik4net.Mndp;
var items = MndpHelper.Discover(); // waits up to 60 s
foreach (var item in items)
{
Console.WriteLine($"{item.IPv4} {item.Mac} {item.Identity} {item.Version}");
}You can control the timeout and stop as soon as the first router is found:
var items = MndpHelper.Discover(
timeout: TimeSpan.FromSeconds(5),
encoding: System.Text.Encoding.GetEncoding("iso-8859-1"),
stopWhenFirstFound: true);FindMacByHost is a convenience helper used internally by MacTelnetConnection to resolve the router MAC needed for Layer-2 transport. It returns the MAC as a 6-byte array, or null if the router is not found within the timeout (default 5 s).
using tik4net.Mndp;
byte[] mac = MndpHelper.FindMacByHost("192.168.4.1");
if (mac != null)
Console.WriteLine(string.Join(":", mac.Select(b => b.ToString("X2"))));
else
Console.WriteLine("Router not found via MNDP");Custom timeout:
byte[] mac = MndpHelper.FindMacByHost("192.168.4.1", TimeSpan.FromSeconds(10));| Property | Description |
|---|---|
Identity |
Router identity string |
IPv4 |
IPv4 address (IPAddress) |
Mac |
MAC address as "AA:BB:CC:DD:EE:FF"
|
Version |
RouterOS version string |
Platform |
Platform/board type |
BoardName |
Board name |
SoftwareId |
RouterOS software ID |
IPv6 |
IPv6 address string (when announced) |
Unpack |
Unpack/compression flag announced by the router |
InterfaceName |
Interface from which the MNDP reply was sent |
Uptime |
Router uptime (TimeSpan) |