How to discover all the devices within your LAN using Layer2 Discovery?

Layer 2, also known as the Data Link Layer, is the second level in the seven-layer OSI model of a network design. Layer 2 devices make a forwarding decision based on the physical addresses of the connected devices. Most commonly, these devices are switches, hubs, bridges, etc. and are very important in the design of a Local Area Network (LAN).

Discovering a LAN is relatively simple, if you can identify the Layer 2 devices in your network. This is because, OpManager features a dedicated Layer 2 discovery tool that can automatically discover, map and report the complete set of devices present in your LAN. This tool can fully map your servers, virtual machines, firewalls, routers, firewalls, and other network infrastructure, along with the nodes, the interconnected layers, the port-to-port connectivity along with the interfaces.

To learn more about Layer2 Discovery, check the video given below:

Layer 2 discovery to discover all devices inside LAN in OpManager: Video

To start with, OpManager first checks whether the given seed device is a Router or an L3 Switch based on the following criteria:

  1. The device must have two or more interfaces.
  2. The "ipForwarding" attribute of the device must be set to 1.

OpManager queries the OIDs in the following order: a) the CDP/LLDP OIDs first, b) next, the IP routing table, c) and if there is any switch connection, it queries the Bridge MIB, and lastly, d) the ARP cache table. If OpManager fails to get any device connection to the seed router or the L3 switch, this error message "Device Mapping does not exist for this Map name" will be displayed.

List of OIDs used for Layer2 Discovery :

BRIDGE-MIB :

  • .1.3.6.1.2.1.17.4.3.1.1 
  • .1.3.6.1.2.1.17.4.3.1.2 
  • .1.3.6.1.2.1.17.4.3.1.3 
  • .1.3.6.1.2.1.17.1.4.1.1
  • .1.3.6.1.2.1.17.1.4.1.2 

RFC1213.MIB (NetToMediaTable) 

  • .1.3.6.1.2.1.4.22.1.1 
  • .1.3.6.1.2.1.4.22.1.2 
  • .1.3.6.1.2.1.4.22.1.3 
  • .1.3.6.1.2.1.4.22.1.4

RFC1213 (IPRouteTable)

  • .1.3.6.1.2.1.4.21.1.1 
  • .1.3.6.1.2.1.4.21.1.2 
  • .1.3.6.1.2.1.4.21.1.7 
  • .1.3.6.1.2.1.4.21.1.8 
  • .1.3.6.1.2.1.4.21.1.11

CISCO-CDP.MIB 

  • .1.3.6.1.4.1.9.9.23.1.2.1.1.4 
  • .1.3.6.1.4.1.9.9.23.1.2.1.1.7 
  • .1.3.6.1.4.1.9.9.23.1.2.1.1.9 

LLDP.MIB

  • .1.0.8802.1.1.2.1.4.1.1.4
  • .1.0.8802.1.1.2.1.4.1.1.5
  • .1.0.8802.1.1.2.1.4.1.1.8
  • .1.0.8802.1.1.2.1.4.1.1.9
  • .1.0.8802.1.1.2.1.4.1.1.12

IF-MIB

  • ifIndex - .1.3.6.1.2.1.2.2.1.1
  • ifName - .1.3.6.1.2.1.31.1.1.1.1

Router Discovery Algorithm:

 WebNms algorithm used:

  • "ipForwarding" of the device must be set to 1 - .1.3.6.1.2.1.4.1.0
  • Object must have two or more interfaces. - .1.3.6.1.2.1.4.20.1.1

To learn more about Layer 2 discovery mechanism, check this page.

 
 Pricing  Get Quote