Build a Network Topology for a Monitoring Tool

AJAY2
Just browsing

Build a Network Topology for a Monitoring Tool

I am planning to build a monitoring tool, and as part of it, I want to automate the creation of a network topology similar to the Meraki dashboard. However, when using the API call below, I noticed that some non-Meraki devices (such as Cisco switches) are not displayed correctly or appear incomplete. From my understanding, Meraki switches support both LLDP and CDP, so why am I unable to see the core/distribution (non-Meraki Cisco) devices in the API response? Any suggestions or workarounds that follow API best practices?
 

GET /networks/{networkId}/topology/linkLayer

13 Replies 13
alemabrahao
Kind of a big deal
Kind of a big deal

Is LLDP enabled on the switches?

 

Try disabling CDP on the non‑Meraki interfaces that face the Meraki MS so the graph converges on LLDP data.

 

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
AJAY2
Just browsing

But i don't want to disturb my existing setup and i don't understand why is that i need to disable CDP if Meraki switches support both LLDP/CDP protocols.

alemabrahao
Kind of a big deal
Kind of a big deal

It's just a test. 😉

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
AJAY2
Just browsing

ok 😉

IvanJukic
Meraki Employee All-Star Meraki Employee All-Star
Meraki Employee All-Star

Hi @AJAY2 ,

@alemabrahao is right. Just test it. CDP can be (sometimes) problematic. LLDP is open standard, which is why Meraki use it.

 

https://community.meraki.com/t5/Switching/Network-Topology-Incorrect/m-p/268482#M20262

 

 


Cheers,

Ivan Jukić,
Meraki APJC

If you found this post helpful, please give it kudos. If it solved your problem, click "accept as solution" so that others can benefit from it.
RaphaelL
Kind of a big deal
Kind of a big deal

I'm able to see all my non-Meraki devices via LLDP and CDP: 

 

{
  "nodes": [
    {
      "derivedId": "x",
      "mac": "x",
      "type": "discovered",
      "root": true,
      "discovered": {
        "lldp": null,
        "cdp": {
          "platform": "Cisco C6816-X-LE",
          "deviceId": "x",
          "address": "x",
          "capabilities": [
            "Router",
            "Switch",
            "IGMP conditional filtering"
          ],
          "managementAddress": "x"
        }
      }
    }

 

"nodes": [
    {
      "derivedId": "x",
      "mac": "x",
      "type": "discovered",
      "root": true,
      "discovered": {
        "lldp": {
          "systemName": "x",
          "chassisId": "x",
          "systemDescription": "Arista Networks EOS version 4.32.5M running on an Arista Networks DCS-7050SX3-48YC8C",
          "systemCapabilities": [
            "S-VLAN Component of a VLAN Bridge"
          ],
          "managementAddress": "x"
        },
        "cdp": null
      }
    }

 

AJAY2
Just browsing

have you disabled CDP on the Non-Meraki interfaces? What API calls are you using?

RaphaelL
Kind of a big deal
Kind of a big deal

No , as you can see I'm receving both cdp and lldp info from 2 vendors.

 

And I'm using the same endpoint that you provided but any cdp/lldp related endpoint should work just fine.

AJAY2
Just browsing

But I see some inconsistency in the data! few switches it does not show the proper LLDP/CDP data for uplinks, Polycom etc.

RaphaelL
Kind of a big deal
Kind of a big deal

And if you take a pcap you see the lldp / cdp packets ? Can you see the info in any other cdp/lldp endpoint such as GET /devices/{serial}/lldpCdp

AJAY2
Just browsing

Link Layer API calls response below,

{
"node": {
"derivedId": "stack3745054670298304029",
"type": "stack"
},
"device": {
"serial": "Q2WW-4455-H7F8",
"name": "XX-XX-XX-XX-MS-02-3"
},
"discovered": {
"lldp": null,
"cdp": {
"portId": "TenGigabitEthernet2/0/15",
"nativeVlan": 100
}

LLDP/CDP API calls response below for respective serial Number-

 

"cdp": {
"sourcePort": "47",
"platform": "cisco C9500-40X",
"deviceId": "XX-XX-XX-XX-SWC-01.ey.net",
"address": "10.165.253.1",
"portId": "TenGigabitEthernet2/0/15",
"nativeVlan": 100,
"version": "Cisco IOS Software [Gibraltar], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.12.1, RELEASE SOFTWARE (fc4)\nTechnical Support: http://www.cisco.com/techsupport\nCopyright (c) 1986-2019 by Cisco Systems, Inc.\nCompiled Tue 30-Jul-19 19:26 by mcpre",
"capabilities": "Router, Switch, IGMP conditional filtering"
},
"deviceMac": "4c:a6:34:55:ee:06",
"device": {
"url": ""
}

 

I am saying on running the Link layer API call i am not getting detailed output but rather unfinished output when compare to CDP/LLDP API output. However limitation of using CDP/LLDP API call is that it is per serial number so if we have multiple switches in a org then it could be challenging with rate limiting Pov.

Mloraditch
Kind of a big deal
Kind of a big deal

are you saying the API doesn't show what the dashboard does or the dashboard (and thus the api) is not showing the info at all?

Either issue is a support case, although at least with the  latter you could do some packet captures to see if the info is being sent. If it's being sent and the dashboard is not displaying it, there's some sort of bug before the API is even involved. If the dashboard has it and the API doesn't, probably an API bug. Either way support probably has to diagnose it.

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
AJAY2
Just browsing

Dashboard displays fine however for API response seem incomplete.

Get notified when there are additional replies to this discussion.