{"id":169293,"date":"2026-06-20T20:11:40","date_gmt":"2026-06-20T17:11:40","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=169293"},"modified":"2026-06-20T20:11:40","modified_gmt":"2026-06-20T17:11:40","slug":"cisco-cdp-lldp-network-discovery","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/cisco-cdp-lldp-network-discovery\/","title":{"rendered":"CDP and LLDP Network Discovery on Cisco Switches"},"content":{"rendered":"<p>On an undocumented network, the fastest way to learn what is connected to a switch is to ask the switch. CDP and LLDP are the two protocols that answer. Each device announces itself to its directly connected neighbors, so from one switch you can read the hostname, the port, the platform, and often the IP address of everything one hop away, without touching a cable or opening a diagram.<\/p>\n\n<p>The two protocols do the same job from opposite philosophies. CDP is Cisco&#8217;s own, runs by default, and only talks to other Cisco gear. LLDP is the open IEEE standard that works across vendors but stays off until you switch it on. This guide explains what each one reveals, how to read the output, how they differ, and where you should turn discovery off. The timers and output here were captured on two Cisco IOS 15.2 switches in June 2026.<\/p>\n\n<h2>What CDP tells you about your neighbors<\/h2>\n\n<p>CDP, the Cisco Discovery Protocol, is a Layer 2 protocol that runs by default on Cisco routers and switches. Every device sends a small advertisement out each interface every 60 seconds describing itself: its hostname, the local and remote port, what kind of device it is, its hardware platform, its IOS version, and its management IP. A neighbor stores that information for a holdtime of 180 seconds, so if three advertisements in a row go missing the entry ages out. The key insight is that this happens with no configuration at all. Connect two Cisco switches and each one already knows the other.<\/p>\n\n<p>Because it is Cisco-proprietary, CDP only ever shows you Cisco devices. That is both its strength, since it carries Cisco-specific detail like the native VLAN and VTP domain, and its limit, since a Juniper or Aruba switch is invisible to it. If you want a refresher on the device types it reports, the <a href=\"https:\/\/computingforgeeks.com\/network-devices-routers-switches-firewalls-explained\/\">network devices overview<\/a> covers what a router, switch, and host each are.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"600\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-discovery-topology.png\" alt=\"Topology of SW1 and SW2 discovering each other over a Gi0\/0 link with CDP and LLDP\" class=\"wp-image-169286\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-discovery-topology.png 1460w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-discovery-topology-300x123.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-discovery-topology-1024x421.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-discovery-topology-768x316.png 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><\/figure>\n\n\n<p>The lab is two switches, SW1 and SW2, joined on Gi0\/0. The same topology, running in GNS3, produced every capture in this guide:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1100\" height=\"520\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-gns3-canvas.png\" alt=\"GNS3 canvas showing SW1 and SW2 IOSvL2 switches running CDP and LLDP over Gi0\/0\" class=\"wp-image-169287\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-gns3-canvas.png 1100w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-gns3-canvas-300x142.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-gns3-canvas-1024x484.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cdp-lldp-gns3-canvas-768x363.png 768w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/figure>\n\n\n<p>Both switches have CDP on by default and a management IP on a Vlan1 interface, so the detailed output later has an address to show. This is the same Layer 2 link that the <a href=\"https:\/\/computingforgeeks.com\/how-switches-work-mac-address-table\/\">MAC address table<\/a> is built on; discovery just adds a description of who is on the other end.<\/p>\n\n<h2>Reading the CDP tables<\/h2>\n\n<p>Start with the summary. <code>show cdp neighbors<\/code> lists every directly connected Cisco device, one line each:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>show cdp neighbors<\/code><\/pre>\n\n\n<p>SW1 sees exactly one neighbor, SW2, reached through Gi0\/0:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"550\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors.png\" alt=\"show cdp neighbors on SW1 listing SW2 on Gi0\/0 with capability R S I\" class=\"wp-image-169288\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-300x75.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-1024x256.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-768x192.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-1536x384.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-2048x512.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>The columns are worth learning. Device ID is the neighbor&#8217;s hostname. Local Intrfce is your port, and Port ID is the neighbor&#8217;s port, so you can trace a cable in both directions. Holdtme counts down from 180. Capability uses the codes printed in the legend at the top: R for router, S for switch, I for IGMP, so the <code>R S I<\/code> here is a multilayer switch. Platform is the hardware model; on these lab IOSvL2 images it shows a generic <code>Cisco<\/code> or stays blank, while on real gear it reads something like <code>WS-C2960<\/code>.<\/p>\n\n<p>The summary tells you what is connected where. For the details that matter while troubleshooting, add the keyword <code>detail<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>show cdp neighbors detail<\/code><\/pre>\n\n\n<p>Now each neighbor gets a full block:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"1012\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-detail.png\" alt=\"show cdp neighbors detail on SW1 showing SW2 IP 10.10.10.2, IOS version, and native VLAN 1\" class=\"wp-image-169289\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-detail.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-detail-300x138.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-detail-1024x471.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-detail-768x353.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-detail-1536x707.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-cdp-neighbors-detail-2048x942.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>This is where CDP earns its place. What you are actually reading is the neighbor telling you its management IP (10.10.10.2), its full IOS version, its VTP domain, the native VLAN on the link (VLAN 1), and the duplex. That native VLAN field is the same one a trunk depends on, which is why CDP is the protocol that flags a native VLAN mismatch. If you are building an <a href=\"https:\/\/computingforgeeks.com\/cisco-trunking-802-1q-configuration\/\">802.1Q trunk<\/a>, CDP is what warns you when the two ends disagree.<\/p>\n\n<h2>Why LLDP exists<\/h2>\n\n<p>CDP works beautifully right up to the moment you add a switch from another vendor. Because it is Cisco-only, it cannot describe a mixed network, and most real networks are mixed. That is the problem LLDP solves. LLDP, the Link Layer Discovery Protocol, is the IEEE 802.1AB standard: the same idea as CDP, but published openly so that Cisco, Juniper, Aruba, and anyone else can speak it.<\/p>\n\n<p>The trade-off is that Cisco leaves LLDP off by default. You turn it on globally with one command, which fits naturally into a switch&#8217;s <a href=\"https:\/\/computingforgeeks.com\/cisco-device-base-configuration\/\">base configuration<\/a>:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>configure terminal\nlldp run\nend<\/code><\/pre>\n\n\n<p>Run it on both ends of a link. Until you do, <code>show lldp neighbors<\/code> stays empty even though the link is up and CDP is already showing the neighbor. LLDP advertises every 30 seconds with a 120-second holdtime, so it reacts a little faster than CDP when a neighbor disappears.<\/p>\n\n<h2>Reading the LLDP tables<\/h2>\n\n<p>The LLDP commands mirror the CDP ones. <code>show lldp neighbors<\/code> gives the summary, and adding <code>detail<\/code> gives the full record:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>show lldp neighbors\nshow lldp neighbors detail<\/code><\/pre>\n\n\n<p>The summary shows SW2 with capability R, and the detail block adds its system name, description, capabilities, and management address:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"1244\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-lldp-neighbors-detail.png\" alt=\"show lldp neighbors and detail on SW1 showing SW2 system name, capabilities, and management IP after lldp run\" class=\"wp-image-169290\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-lldp-neighbors-detail.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-lldp-neighbors-detail-300x170.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-lldp-neighbors-detail-1024x579.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-lldp-neighbors-detail-768x434.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-lldp-neighbors-detail-1536x869.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-show-lldp-neighbors-detail-2048x1158.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>Notice that LLDP uses its own capability letters, listed in its own legend: here SW2 advertises B and R (bridge and router) and has R enabled. The summary column shows only the enabled capability (R), while the detail block separates what is advertised (B,R) from what is enabled (R). The detail block also carries a chassis ID and a system description string. On a real multi-vendor link, that system description is how you identify a non-Cisco neighbor that CDP could never have shown you at all.<\/p>\n\n<h2>CDP and LLDP compared<\/h2>\n\n<p>Side by side, the two protocols line up cleanly:<\/p>\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Property<\/th><th>CDP<\/th><th>LLDP<\/th><\/tr><\/thead><tbody>\n<tr><td>Origin<\/td><td>Cisco-proprietary<\/td><td>IEEE 802.1AB (open standard)<\/td><\/tr>\n<tr><td>Default state<\/td><td>Enabled<\/td><td>Disabled (needs lldp run)<\/td><\/tr>\n<tr><td>Works with other vendors<\/td><td>No<\/td><td>Yes<\/td><\/tr>\n<tr><td>Advertisement interval<\/td><td>60 seconds<\/td><td>30 seconds<\/td><\/tr>\n<tr><td>Holdtime<\/td><td>180 seconds<\/td><td>120 seconds<\/td><\/tr>\n<tr><td>Enable command<\/td><td>on by default (cdp run)<\/td><td>lldp run<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n\n<p>The timers are visible globally with <code>show cdp<\/code> and <code>show lldp<\/code>:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"736\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-cdp-lldp-timers.png\" alt=\"show cdp and show lldp on SW2 confirming CDP 60s\/180s and LLDP 30s\/120s timers\" class=\"wp-image-169291\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-cdp-lldp-timers.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-cdp-lldp-timers-300x100.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-cdp-lldp-timers-1024x343.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-cdp-lldp-timers-768x257.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-cdp-lldp-timers-1536x514.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/cisco-cdp-lldp-timers-2048x685.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>The practical rule is simple. On an all-Cisco network, CDP is already on and tells you more. The moment another vendor sits in the path, enable LLDP so the whole topology is visible. Plenty of networks run both at once, and the two do not conflict.<\/p>\n\n<h2>Turning discovery off where it should not run<\/h2>\n\n<p>Discovery is a convenience for you and a gift to an attacker. Every advertisement broadcasts the device model, IOS version, port, native VLAN, and management IP to whatever is on the wire. On an uplink between your own switches that is fine. On a port facing a user, a guest, or a customer, it is information you should not hand out. The same caution applies when you are chasing a problem with <a href=\"https:\/\/computingforgeeks.com\/cisco-interface-troubleshooting-show-interfaces\/\">interface counters<\/a>: discovery is for trusted links, not edge ports.<\/p>\n\n<p>Turn CDP off on a single interface without disabling it across the switch:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>interface GigabitEthernet0\/1\n no cdp enable<\/code><\/pre>\n\n\n<p>LLDP is controlled per direction, so you can stop advertising while still listening, or both:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>interface GigabitEthernet0\/1\n no lldp transmit\n no lldp receive<\/code><\/pre>\n\n\n<p>One caution before you reach for <code>no cdp run<\/code>: do not disable CDP globally if you run Cisco IP phones. What is actually happening there is the phone uses CDP to learn which voice VLAN to tag its traffic into, so a blanket disable breaks voice. Switch discovery off on the ports that face untrusted devices, not on the whole switch.<\/p>\n\n<h2>Practice CDP and LLDP<\/h2>\n\n<p>This topic sits in the Network Access section of the <a href=\"https:\/\/computingforgeeks.com\/quickly-prepare-for-ccna-200-301-exam\/\">CCNA 200-301 study roadmap<\/a>. The two-switch lab, paste-ready for GNS3, Cisco Packet Tracer, or real gear, is in the companion repo: <a href=\"https:\/\/github.com\/c4geeks\/ccna-labs\/tree\/main\/cdp-lldp\" target=\"_blank\" rel=\"noreferrer noopener\">c4geeks\/ccna-labs<\/a>. Build SW1 and SW2, connect Gi0\/0 to Gi0\/0, paste the configs, and the neighbor tables fill in on their own.<\/p>\n\n<p>Check that the defaults, timers, and commands have stuck with the quiz:<\/p>\n\n<div class=\"cfg-quiz\" data-quiz=\"{\n  &quot;id&quot;: &quot;cdp-lldp&quot;,\n  &quot;title&quot;: &quot;CDP and LLDP discovery quiz&quot;,\n  &quot;objective&quot;: &quot;2.3 Configure and verify Layer 2 discovery protocols (CDP and LLDP)&quot;,\n  &quot;intro&quot;: &quot;Ten questions on Layer 2 discovery: what CDP and LLDP reveal, their defaults and timers, the commands that read and control them, and where to turn discovery off. Every answer is doc-checked or verified on two Cisco IOS 15.2 switches in a lab.&quot;,\n  &quot;questions&quot;: [\n    {&quot;q&quot;: &quot;What is the main difference between CDP and LLDP?&quot;, &quot;options&quot;: [&quot;CDP is Cisco-proprietary and on by default; LLDP is an open standard and off by default&quot;, &quot;CDP is the open standard; LLDP is Cisco-only&quot;, &quot;Both are Cisco-proprietary&quot;, &quot;LLDP works only on routers&quot;], &quot;answer&quot;: 0, &quot;explanation&quot;: &quot;CDP is Cisco&#039;s own protocol and runs by default on Cisco gear. LLDP is the vendor-neutral IEEE standard and must be switched on with lldp run. In a mixed-vendor network you reach for LLDP.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;type&quot;: &quot;numeric&quot;, &quot;q&quot;: &quot;How often does CDP send advertisements, in seconds, by default? Type the number.&quot;, &quot;answer&quot;: &quot;60&quot;, &quot;hint&quot;: &quot;Holdtime is three times this.&quot;, &quot;placeholder&quot;: &quot;e.g. 30&quot;, &quot;explanation&quot;: &quot;CDP advertises every 60 seconds with a 180-second holdtime (three missed advertisements). show cdp confirms both values.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;q&quot;: &quot;Which standard defines LLDP?&quot;, &quot;options&quot;: [&quot;IEEE 802.1Q&quot;, &quot;IEEE 802.1AB&quot;, &quot;IEEE 802.3af&quot;, &quot;RFC 1918&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;LLDP is IEEE 802.1AB. That vendor-neutral standardisation is the whole point: any compliant device, not just Cisco, can advertise and learn neighbors.&quot;, &quot;validated&quot;: &quot;doc&quot;},\n    {&quot;q&quot;: &quot;LLDP is not showing any neighbors on a Cisco switch. What is the most likely cause?&quot;, &quot;options&quot;: [&quot;The cable is faulty&quot;, &quot;LLDP has not been enabled with lldp run&quot;, &quot;CDP is blocking it&quot;, &quot;The switch needs a reload&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;LLDP is disabled by default on Cisco. Until you enter lldp run globally on both ends, show lldp neighbors stays empty even though the link is up and CDP works.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;q&quot;: &quot;What does show cdp neighbors detail add over show cdp neighbors?&quot;, &quot;options&quot;: [&quot;Nothing, the output is identical&quot;, &quot;The neighbor&#039;s management IP address, IOS version, and native VLAN&quot;, &quot;The switch&#039;s MAC address table&quot;, &quot;The running configuration&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;The summary gives device ID, local and remote port, capability, and platform. detail adds the neighbor&#039;s IP address, full IOS version string, VTP domain, native VLAN, and duplex.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;type&quot;: &quot;numeric&quot;, &quot;q&quot;: &quot;What is the default LLDP holdtime in seconds? Type the number.&quot;, &quot;answer&quot;: &quot;120&quot;, &quot;hint&quot;: &quot;LLDP advertises every 30 seconds.&quot;, &quot;placeholder&quot;: &quot;e.g. 180&quot;, &quot;explanation&quot;: &quot;LLDP advertises every 30 seconds and holds an entry for 120 seconds. show lldp confirms 30s timer, 120s holdtime, and a 2-second reinit delay.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;type&quot;: &quot;multi&quot;, &quot;q&quot;: &quot;Which two are valid reasons to disable discovery on a port?&quot;, &quot;options&quot;: [&quot;The port faces an untrusted or customer device&quot;, &quot;You want to stop leaking topology details to whatever is plugged in&quot;, &quot;It speeds up the link&quot;, &quot;It frees up VLAN IDs&quot;], &quot;answers&quot;: [0, 1], &quot;explanation&quot;: &quot;CDP and LLDP advertise device and topology details to anything on the wire. On edge or untrusted ports, turn them off with no cdp enable and no lldp transmit \/ no lldp receive. They do not affect link speed or VLANs.&quot;, &quot;validated&quot;: &quot;doc&quot;},\n    {&quot;q&quot;: &quot;In show cdp neighbors, what does the capability code R mean?&quot;, &quot;options&quot;: [&quot;Repeater&quot;, &quot;Router&quot;, &quot;Remote&quot;, &quot;Reserved&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;R is Router. The legend at the top of the output lists them: R router, S switch, H host, I IGMP, P phone, B\/T bridge. A device can show more than one, such as R S I.&quot;, &quot;validated&quot;: &quot;lab&quot;},\n    {&quot;q&quot;: &quot;You manage a network with Cisco and Juniper switches. Which protocol discovers neighbors across both?&quot;, &quot;options&quot;: [&quot;CDP&quot;, &quot;LLDP&quot;, &quot;VTP&quot;, &quot;DTP&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;LLDP (802.1AB) is vendor-neutral, so it works across Cisco, Juniper, Aruba, and others. CDP only runs between Cisco devices.&quot;, &quot;validated&quot;: &quot;doc&quot;},\n    {&quot;q&quot;: &quot;Why should you not blanket-disable CDP on a switch with Cisco IP phones?&quot;, &quot;options&quot;: [&quot;The phones lose power&quot;, &quot;Cisco IP phones use CDP to learn their voice VLAN&quot;, &quot;CDP is required for spanning tree&quot;, &quot;The phones cannot get an IP without it&quot;], &quot;answer&quot;: 1, &quot;explanation&quot;: &quot;Cisco IP phones rely on CDP to learn the voice VLAN the switch advertises. Disabling CDP globally breaks that, so disable discovery selectively on data and untrusted ports, not everywhere.&quot;, &quot;validated&quot;: &quot;doc&quot;},\n    {&quot;type&quot;: &quot;match&quot;, &quot;q&quot;: &quot;Match each command to what it does.&quot;, &quot;pairs&quot;: [{&quot;left&quot;: &quot;lldp run&quot;, &quot;right&quot;: &quot;Enable LLDP globally (off by default)&quot;}, {&quot;left&quot;: &quot;show cdp neighbors detail&quot;, &quot;right&quot;: &quot;Show a neighbor&#039;s IP and IOS version&quot;}, {&quot;left&quot;: &quot;show cdp&quot;, &quot;right&quot;: &quot;Show the global CDP timer and holdtime&quot;}, {&quot;left&quot;: &quot;no cdp enable&quot;, &quot;right&quot;: &quot;Turn off CDP on one interface&quot;}], &quot;explanation&quot;: &quot;lldp run enables LLDP, show cdp neighbors detail adds per-neighbor IP and version, show cdp shows the 60\/180 timers, and no cdp enable disables CDP on a single interface.&quot;, &quot;validated&quot;: &quot;lab&quot;}\n  ]\n}\n\"><div class=\"cfg-quiz-loading\">Loading quiz...<\/div><\/div>\n\n\n<p>Then drill the facts with the flashcards, or take the deck into Anki:<\/p>\n\n<div class=\"cfg-fc\" data-fc=\"{\n  &quot;id&quot;: &quot;cdp-lldp&quot;,\n  &quot;title&quot;: &quot;CDP and LLDP Discovery Flashcards&quot;,\n  &quot;objective&quot;: &quot;2.3 Configure and verify Layer 2 discovery protocols (CDP and LLDP)&quot;,\n  &quot;intro&quot;: &quot;The discovery facts worth knowing cold: what CDP and LLDP are, their defaults and timers, what each reveals, the commands to read and control them, and the security trade-off. Tap a card to flip it, then mark whether you knew it.&quot;,\n  &quot;cards&quot;: [\n    {&quot;front&quot;: &quot;What is CDP?&quot;, &quot;back&quot;: &quot;Cisco Discovery Protocol. A Cisco-proprietary Layer 2 protocol, on by default, that lets directly connected Cisco devices learn each other&#039;s identity, ports, platform, and IP.&quot;},\n    {&quot;front&quot;: &quot;What is LLDP?&quot;, &quot;back&quot;: &quot;Link Layer Discovery Protocol, IEEE 802.1AB. The vendor-neutral equivalent of CDP. It works across Cisco, Juniper, Aruba, and others, but is off by default on Cisco.&quot;},\n    {&quot;front&quot;: &quot;CDP default state and timers&quot;, &quot;back&quot;: &quot;Enabled by default. Advertises every 60 seconds, holdtime 180 seconds (three missed advertisements). Confirm with show cdp.&quot;},\n    {&quot;front&quot;: &quot;LLDP default state and timers&quot;, &quot;back&quot;: &quot;Disabled by default on Cisco; enable with lldp run. Advertises every 30 seconds, holdtime 120 seconds, reinit delay 2 seconds. Confirm with show lldp.&quot;},\n    {&quot;front&quot;: &quot;Which standard defines LLDP?&quot;, &quot;back&quot;: &quot;IEEE 802.1AB. Being a published standard is the point: any compliant vendor can speak it, unlike Cisco-only CDP.&quot;},\n    {&quot;front&quot;: &quot;Enable LLDP&quot;, &quot;back&quot;: &quot;lldp run in global configuration mode, on both ends of the link. Until then show lldp neighbors stays empty even though the link is up and CDP works.&quot;},\n    {&quot;front&quot;: &quot;show cdp neighbors columns&quot;, &quot;back&quot;: &quot;Device ID, Local Intrfce, Holdtme, Capability, Platform, Port ID. The capability codes legend prints above the table.&quot;},\n    {&quot;front&quot;: &quot;What does show cdp neighbors detail add?&quot;, &quot;back&quot;: &quot;The neighbor&#039;s management IP address, full IOS version string, VTP domain, native VLAN, and duplex, on top of the summary fields.&quot;},\n    {&quot;front&quot;: &quot;CDP capability codes&quot;, &quot;back&quot;: &quot;R router, S switch, H host, I IGMP, P phone, B\/T bridge, r repeater. A device can show several at once, such as R S I for a multilayer switch.&quot;},\n    {&quot;front&quot;: &quot;Read LLDP neighbors&quot;, &quot;back&quot;: &quot;show lldp neighbors for the summary (Device ID, Local Intf, Hold-time, Capability, Port ID) and show lldp neighbors detail for the IP, system description, and capabilities.&quot;},\n    {&quot;front&quot;: &quot;Disable CDP on one interface&quot;, &quot;back&quot;: &quot;no cdp enable under the interface. no cdp run turns CDP off globally. Use the per-interface form on edge or untrusted ports.&quot;},\n    {&quot;front&quot;: &quot;Disable LLDP on one interface&quot;, &quot;back&quot;: &quot;no lldp transmit and no lldp receive under the interface control each direction independently. lldp run \/ no lldp run is the global switch.&quot;},\n    {&quot;front&quot;: &quot;Why is discovery a security concern?&quot;, &quot;back&quot;: &quot;CDP and LLDP advertise device model, IOS version, port, native VLAN, and IP to anything on the wire. On untrusted or customer-facing ports, turn discovery off.&quot;},\n    {&quot;front&quot;: &quot;Why keep CDP on with Cisco IP phones?&quot;, &quot;back&quot;: &quot;Cisco IP phones use CDP to learn the voice VLAN the switch advertises. Blanket-disabling CDP breaks that, so disable discovery selectively, not everywhere.&quot;},\n    {&quot;front&quot;: &quot;When do you need LLDP instead of CDP?&quot;, &quot;back&quot;: &quot;In a multi-vendor network. CDP only runs between Cisco devices, so to discover a Juniper, Aruba, or third-party neighbor you enable LLDP on both ends.&quot;},\n    {&quot;front&quot;: &quot;How fast does a dead neighbor disappear?&quot;, &quot;back&quot;: &quot;When advertisements stop, the entry is held for the holdtime, then removed: up to 180 seconds for CDP, up to 120 seconds for LLDP. A neighbor can linger briefly after it goes down.&quot;}\n  ]\n}\n\" data-fc-anki=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ccna-cdp-lldp-flashcards.apkg\"><div class=\"cfg-fc-loading\">Loading flashcards...<\/div><\/div>\n\n\n<h2>Common misconceptions about CDP and LLDP<\/h2>\n\n<p>A few ideas trip people up, and clearing them is the fastest way to actually understand these protocols:<\/p>\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Discovery does not give you connectivity.<\/strong> CDP and LLDP are pure information. They never forward user traffic or change how a link behaves. A neighbor can sit in the table while the VLANs on the link are completely misconfigured.<\/li>\n<li><strong>LLDP does not replace CDP.<\/strong> On a Cisco switch the two coexist happily. Running both is normal, and is exactly what you want on a network that mixes Cisco with other vendors.<\/li>\n<li><strong>A neighbor in the table does not prove the link is healthy.<\/strong> An entry lingers for the holdtime after the neighbor goes down, up to 180 seconds for CDP. A stale entry is not live confirmation.<\/li>\n<li><strong>Discovery is not harmless.<\/strong> It advertises precisely the details an attacker wants. Treat it as something to scope to trusted links and disable toward anything you do not control.<\/li>\n<\/ul>\n\n\n<p>Keep that mental model and the two protocols become what they are meant to be: a fast, honest map of what is one hop away, switched on for the links where you want a map and switched off on the ones where you do not.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configure and read CDP and LLDP on Cisco switches: see what is on each port, run show cdp neighbors and show lldp neighbors, and compare the two.<\/p>\n","protected":false},"author":3,"featured_media":169292,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299,55],"tags":[524,525],"cfg_series":[39888],"class_list":["post-169293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-networking","tag-ccna","tag-cisco","cfg_series-ccna-200-301"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=169293"}],"version-history":[{"count":1,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169293\/revisions"}],"predecessor-version":[{"id":169294,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169293\/revisions\/169294"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/169292"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=169293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=169293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=169293"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=169293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}