Free tool

CDP and LLDP neighbors to a network map

Updated

Paste show cdp neighbors or show lldp neighbors from one switch or several. You get the topology with the port on each end of every cable, what each device is, and a cable list. It runs in your browser; nothing you paste is uploaded.

Beta The switch output import is new. If your switches' output doesn't come in right, send it to us (hostnames scrubbed is fine) and we'll fix it.

Paste switch output above, or load the example, to see the map.

Turn it into a diagram you can keep

Open in the editor brings this output into NetworkSketch. Check the device types and choose which end devices to keep, and it draws the devices, cables and ports onto a page you can arrange, label with VLANs and IP addresses, and export to PDF.

Try it, no signup

Which commands to run

Run these on each switch and paste everything together, prompts included. Detail output gives models, IP addresses and capabilities; brief output gives names and ports.

PlatformNeighborsExtras that add detail
Cisco IOS / IOS-XEshow cdp neighbors detail
show lldp neighbors detail
show version, show mac address-table, show ip arp
Cisco NX-OSshow cdp neighbors detail
show lldp neighbors detail
show version, show mac address-table, show ip arp
Arista EOSshow lldp neighbors detailshow version, show mac address-table, show arp
Juniper Junosshow lldp neighborsshow ethernet-switching table, show arp
Aruba CXshow lldp neighbor-info detailshow mac-address-table, show arp
HPE ProCurve / Aruba OS-Sshow lldp info remote-device detailshow mac-address, show arp

Tip: turn on session logging in PuTTY or SecureCRT, run the commands on every switch, then use Add log files. Run terminal length 0 first so the output isn't split into pages.

CDP or LLDP?

CDP is Cisco's protocol; Meraki gear and many IP phones speak it too. LLDP (IEEE 802.1AB) is the vendor-neutral one, and LLDP-MED adds what phones need, like the voice VLAN. Most networks run both, so a device can show up once in each. The map merges the two into one device when the names, MAC address or switch port line up.

Questions

Which commands does it read?

show cdp neighbors and show lldp neighbors, brief or detail, from Cisco IOS, IOS-XE and NX-OS, Arista EOS, Juniper Junos, Aruba CX and HPE ProCurve. Add show version for models and serial numbers, and show mac address-table plus show ip arp (or show arp) to find devices that don't speak CDP or LLDP.

Do I need the prompt line?

It helps. A line like CORE-1#show cdp neighbors detail tells the map whose neighbors follow, so the output of several switches can go in one paste. Without it, the output is treated as coming from one switch.

Is my switch output sent anywhere?

No. The map is drawn on this page, in your browser, and the page has no analytics or tracking. Nothing you paste is uploaded, and it isn't saved in the link. If you open it in the editor, the text is handed over inside your browser.

Why are some device types marked Check?

A device's type comes from what it announced: its platform, capabilities and name. When that is only a guess (a capability flag, or a name like AP-3F), the map says so. In the editor you can fix a whole group at once before importing.

Why are identical devices drawn as one box?

Twenty access points on one switch would make the map unreadable, so three or more of the same type and model on one switch become one box with a count. Untick Group identical devices to draw each one.