Community discussions

MikroTik App
 
BuGless
just joined
Topic Author
Posts: 12
Joined: Wed Jul 20, 2022 6:54 pm
Location: The Netherlands

MNDP and LLDP (Mikrotik Network Discovery Protocol)

Thu Jul 21, 2022 9:31 am

I have MNDP enabled on all SwOS devices.
I do not have any ROS devices.

Inquiring minds would like to know:
- How can I see what MNDP actually discovers (I'm trying to get a switch topology map out of this)?
- How hard would it be to support LLDP as well?
- Is it somehow possible to see what RSTP tree the Mikrotik has calculated?
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: MNDP and LLDP (Mikrotik Network Discovery Protocol)

Thu Jul 21, 2022 4:24 pm

-A topology map ?
You don't have a topology map of your network?
If you want to see the devices discovered you can use ip neighbor print

-LLDP-MED is supported after 6.48
*) discovery - added "lldp-med-net-policy-vlan" property for assigning VLAN ID;

- What exactly is that you want to see ?
 
BuGless
just joined
Topic Author
Posts: 12
Joined: Wed Jul 20, 2022 6:54 pm
Location: The Netherlands

Re: MNDP and LLDP (Mikrotik Network Discovery Protocol)

Thu Jul 21, 2022 5:41 pm

First, let me repeat part of what I said, in case some readers might have missed it:
I have MNDP enabled on all SwOS devices.
I do not have any ROS devices.
Which means: I do not have RouterOS, on some devices by choice, on most devices because they are of the CSS variety which is not capable of running anything other than SwOS.
One other random datapoint: I'm explicitly posting this in the SwOS forum to focus on answers involving SwOS and to avoid answers that drag in RouterOS needlessly.
-A topology map ?
You don't have a topology map of your network?
Actually, I do, but the problem is, the number of switches in the network exceeds 50 devices (of which 48 are CSS, 2 are CRS, all running SwOS).
Even though I have a topology map, I cannot be certain if the map is up to date, because we have multiple engineers fixing network issues, and regularly adhoc solutions are performed by adding/replacing/removing switch devices, or rearranging the interconnections between the switches in order to route around cabling issues.
So I need a way to verify the topology in real time, and be certain which switch connects on which port with which other switch (even if it was temporarily changed a few seconds ago).
This mostly is needed to verify that anything that is changed in the network is changed as intended and not accidentally plugged in the wrong port.
If you want to see the devices discovered you can use ip neighbor print

-LLDP-MED is supported after 6.48
*) discovery - added "lldp-med-net-policy-vlan" property for assigning VLAN ID;
I'll go out on a limb here and guess that you are referring to ROS/RouterOS, which I do not have.
- What exactly is that you want to see ?
A small TAB in the SwOS menu called LLDP which displays a very simple list with in column one the name of the port, and in column two the LLDP advertised name and IP address of the device attached to that port (as reported by the LLDP packet received on that port).
 
tdw
Forum Guru
Forum Guru
Posts: 1841
Joined: Sat May 05, 2018 11:55 am

Re: MNDP and LLDP (Mikrotik Network Discovery Protocol)

Sat Jul 23, 2022 5:10 am

MNDP is broadcast so visible to everything within the layer 2 network, it doesn't provide information as to where it is within the network. LLDP requires special handling as each port on a device has to transmit different information, as it includes the port identity, and the device must not forward received information.

I suspect that SWOS mainly relies on functionality and storage within the switch chip itself, such as various counters, host and VLAN tables, hence no neighbours display as this is an unknown number of variable sized items.

As SWOS has SNMP and supposedly implements BRIDGE-MIB you should be able to retrieve the host table showing which MAC addresses have been learned on each port, although this appears to be missing in the original RB260s running v1.x.
 
BuGless
just joined
Topic Author
Posts: 12
Joined: Wed Jul 20, 2022 6:54 pm
Location: The Netherlands

Re: MNDP and LLDP (Mikrotik Network Discovery Protocol)

Sat Jul 23, 2022 11:18 am

MNDP is broadcast so visible to everything within the layer 2 network, it doesn't provide information as to where it is within the network.
I see. If I'd want to see these packets using tcpdump, which filter would I need to apply? Or, put differently, where can I read the network definition of MNDP so that I can construct that filter myself?
LLDP requires special handling as each port on a device has to transmit different information, as it includes the port identity, and the device must not forward received information.
Correct. Then again, the switch must already be capable of NOT forwarding LLDP, so that part should not be complicated.
I suspect that SWOS mainly relies on functionality and storage within the switch chip itself, such as various counters, host and VLAN tables, hence no neighbours display as this is an unknown number of variable sized items.
I agree that SwOS mainly leans on the basic functionality of the switch chip (as it should).
Then again, if the LLDP/direct neighbours display would be implemented as a fixed-size array (per Port store only a single neighbour (the last one seen)) that would be perfectly fine.
As SWOS has SNMP and supposedly implements BRIDGE-MIB you should be able to retrieve the host table showing which MAC addresses have been learned on each port, although this appears to be missing in the original RB260s running v1.x.
There might be a way around this using the native link.b SwOS API.
 
tdw
Forum Guru
Forum Guru
Posts: 1841
Joined: Sat May 05, 2018 11:55 am

Re: MNDP and LLDP (Mikrotik Network Discovery Protocol)

Sat Jul 23, 2022 1:03 pm

MNDP is broadcast to UDP port 5678, so tcpdump -i myinterfacename -s 0 -X broadcast and udp and dst port 5678

It consists of a number of TLVs, type and length are both 16-bit network byte order, i.e. big endian. I'm not aware of any official documentation, the Wireshark dissector code https://gitlab.com/wireshark/wireshark/ ... ket-mndp.c lists the known types.

Who is online

Users browsing this forum: No registered users and 19 guests