Manual:IP/Neighbor discovery: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
No edit summary
 
(19 intermediate revisions by 8 users not shown)
Line 1: Line 1:
==Overview==
{{Versions| v5 +}}


MikroTik Neighbor Discovery protocol (MNDP) allows to "find" other devices compatible with MNDP or CDP (Cisco Discovery Protocol)  in Layer2 broadcast domain.
{{Warning|This manual is moved to https://help.mikrotik.com/docs/display/ROS/Neighbor+discovery}}


==Neigbors==
__TOC__


'''Menu: ''/ip neigbor'''''
==Summary==


In this menu is read-only and displays discovery information from routers in same Layer-2 area where interface is set to participate in neighbour discovery.
MikroTik Neighbor Discovery protocol (MNDP) and LLDP allows to "find" other devices compatible with MNDP or CDP (Cisco Discovery Protocol) or LLDP  in Layer2 broadcast domain.


{| cellpadding="2"
==Neigbours==
!width="300px" style="background:#cccccc; border-bottom:1px solid gray;"| Property
 
!width="450px" style="background:#cccccc; border-bottom:1px solid gray;"| Desciption
<p id="shbox"><b>Sub-menu:</b> <code>/ip neighbor</code></p>
|-
|style="border-bottom:1px solid gray;" valign="top"|interface (<em>interface name</em>)
|style="border-bottom:1px solid gray;" valign="top"|interface that received discovery packet from other hosts in Layer-2 area
|-
|style="border-bottom:1px solid gray;" valign="top"|address (<em>IP address</em>)
|style="border-bottom:1px solid gray;" valign="top"|IP address of the neighbour interface discovery packet originated from
|-
|style="border-bottom:1px solid gray;" valign="top"|address6 (<em>IPv6 address</em>)
|style="border-bottom:1px solid gray;" valign="top"|IPv6 address of the neighbour interface discovery packet originated from
|-
|style="border-bottom:1px solid gray;" valign="top"|interface-name (<em>interface name</em>)
|style="border-bottom:1px solid gray;" valign="top"|interface that sent discovery packet from the neighbor.
|-
|style="border-bottom:1px solid gray;" valign="top"|ipv6 (<em>yes {{!}} no</em>)
|style="border-bottom:1px solid gray;" valign="top"|Neighbor has IPv6 enabled.
|-
|style="border-bottom:1px solid gray;" valign="top"|mac-address (<em>MAC address</em>)
|style="border-bottom:1px solid gray;" valign="top"|mac address of the neighbour interface discovery packet originated from
|-
|style="border-bottom:1px solid gray;" valign="top"|identity (<em>text</em>)
|style="border-bottom:1px solid gray;" valign="top"|set identification tag of system sending out discovery information
|-
|style="border-bottom:1px solid gray;" valign="top"|platform (<em>text</em>)
|style="border-bottom:1px solid gray;" valign="top"|platform of system sending out discovery information
|-
|style="border-bottom:1px solid gray;" valign="top"|version (<em>text</em>)
|style="border-bottom:1px solid gray;" valign="top"|version of software of system sending out discovery information
|-
|style="border-bottom:1px solid gray;" valign="top"|unpack (<em>none|simple|uncompressed-headers|uncompressed-all</em>)
|style="border-bottom:1px solid gray;" valign="top"|what packet compression is used by neighbour system
|-
|style="border-bottom:1px solid gray;" valign="top"|age (<em>time</em>)
|style="border-bottom:1px solid gray;" valign="top"|time that has passed since last discovery packet was received from neighbour
|-
|style="border-bottom:1px solid gray;" valign="top"|uptime (<em>time</em>)
|style="border-bottom:1px solid gray;" valign="top"|uptime of system sending discovery information
|-
|style="border-bottom:1px solid gray;" valign="top"|software-id (<em>text</em>)
|style="border-bottom:1px solid gray;" valign="top"|Software id of neighbour system that sends out discovery information
|}


==Discovery configuration==


<p id="shbox"><b>Sub-menu:</b> <code>/ip neighbor discovery</code></p>
This sub-menu lists all discovered neighbours in Layer-2 broadcast domain. It shows to which interface neighbour is connected, shows its IP/MAC addresses and several MikroTik related parameters. List is read-only.


Starting from ROS v6.45 amount of neighbour entries are limited to (total RAM in megabytes)*16 per interface to avoid memory exhaustion.


In this menu is possible to change 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.
As an example, you can see several RouterBoards and two Cisco routers:
<pre>
[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...
</pre>




'''Properties'''
{{Mr-arg-table-h
{{Mr-arg-table-h
|prop=Property
|prop=Property
Line 66: Line 37:
}}
}}


{{Mr-arg-table
{{Mr-arg-ro-table
|arg=comment
|arg=address
|type=IP
|desc=Highest IP address configured on a discovered device
}}
 
{{Mr-arg-ro-table
|arg=address6
|type=IPv6
|desc=IPv6 address configured on a discovered device
}}
 
{{Mr-arg-ro-table
|arg=age
|type=time
|desc=Time interval since last discovery packet
}}
 
{{Mr-arg-ro-table
|arg=board
|type=string
|desc=RouterBoard model. Displayed only to devices with installed RouterOS
}}
 
{{Mr-arg-ro-table
|arg=identity
|type=string
|desc=Configured system identity
}}
 
{{Mr-arg-ro-table
|arg=interface
|type=string
|desc=Interface name to which discovered device is connected
}}
 
{{Mr-arg-ro-table
|arg=interface-name
|type=string
|type=string
|default=
|desc=Interface name on the neighbor device connected to the L2 broadcast domain. Applies to CDP.
|desc=Short description of an entry
}}
}}


{{Mr-arg-table
{{Mr-arg-ro-table
|arg=disabled
|arg=ipv6
|type=yes {{!}} no
|type=yes {{!}} no
|default=
|desc=Shows whether device has IPv6 enabled.
|desc=Whether item is disabled and do not participate in sending/receiving of discovery information. Added in v5.x
}}
 
{{Mr-arg-ro-table
|arg=mac-address
|type=MAC
|desc=Mac address of remote device. Can be used to connect with mac-telnet.
}}
 
{{Mr-arg-ro-table
|arg=platform
|type=string
|desc=Name of the platform. For example "MikroTik", "cisco" ... etc.
}}
 
{{Mr-arg-ro-table
|arg=software-id
|type=string
|desc=RouterOS software ID on a remote device. Applies only to devices installed with RouterOS.
}}
 
 
{{Mr-arg-ro-table
|arg=system-caps
|type=string
|desc=System capabilities reported by the Link-Layer Discovery Protocol (LLDP).
}}
 
{{Mr-arg-ro-table
|arg=system-caps-enabled
|type=string
|desc=Enabled system capabilities reported by the Link-Layer Discovery Protocol (LLDP).
}}
 
{{Mr-arg-ro-table
|arg=unpack
|type=none{{!}}simple{{!}}uncompressed-headers{{!}}uncompressed-all
|desc=Shows discovery packet compression type.
}}
 
{{Mr-arg-ro-table
|arg=uptime
|type=time
|desc=Uptime of remote device. Shown only to devices installed with RouterOS.
}}
 
 
{{Mr-arg-ro-table-end
|arg=version
|type=string
|desc=Version number of installed software on a remote device
}}
 
==Discovery configuration==
 
<p id="shbox"><b>Sub-menu:</b> <code>/ip neighbor discovery-settings</code></p>
 
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 neighbours 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 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.
 
<pre>
/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
</pre>
 
The neighbor list now shows a master interface and actual slave interface on which a discovery message was received.
<pre>
[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   
</pre>
 
'''Properties'''
{{Mr-arg-table-h
|prop=Property
|desc=Description
}}
}}


{{Mr-arg-table-end
{{Mr-arg-table-end
|arg=discover
|arg=discover-interface-list
|type=yes {{!}} no
|type=string
|default=
|default=!dynamic
|desc=Whether to participate in sending/receiving of discovery information. Since v5.x left for compatibility with older scripts.
|desc=Interface list on which members the discovery protocol will run on
}}
}}


==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)


{{cont}}
{{cont}}

Latest revision as of 15:40, 7 September 2020

Applies to RouterOS: v5 +


Summary

MikroTik Neighbor Discovery protocol (MNDP) and LLDP allows to "find" other devices compatible with MNDP or CDP (Cisco Discovery Protocol) or LLDP in Layer2 broadcast domain.

Neigbours

Sub-menu: /ip neighbor


This sub-menu lists all discovered neighbours in Layer-2 broadcast domain. It shows to which interface neighbour is connected, shows its IP/MAC addresses and several MikroTik related parameters. List is read-only.

Starting from ROS v6.45 amount of neighbour 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...


Properties

Property Description
address (IP) 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 device has IPv6 enabled.
mac-address (MAC) Mac address of 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 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

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 neighbours 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 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    

Properties

Property Description
discover-interface-list (string; Default: !dynamic) Interface list on which members the discovery protocol will run on

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)

[ Top | Back to Content ]