Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Discovery & Device Management

Direct answer

CDP (Cisco) and LLDP (standard) let directly connected devices announce themselves — name, port, model, address — so you can map what is plugged in where. Device management is reaching the device securely: SSH to a management address, with local or central accounts.

When to use this

Use it to find what is at the other end of a cable, document a network, or set up and check remote access to a device.

First 30 seconds

1. show cdp neighbors — is the expected device on the expected port?

2. Nothing → show cdp interface: CDP off, or the neighbour speaks LLDP only (lldp run).

3. Cannot SSH → show ip ssh: enabled? Keys generated?

4. show running-config | section line vty — transport input ssh and login local?

5. Reachable only from its own subnet → the default gateway on the switch.

Operational verification

link up → CDP or LLDP enabled on both ends → neighbour listed with port and address → management address reachable → SSH enabled with keys → vty lines accept SSH → login authenticated

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE · IOS/IOS XE
Key commandshow ip interface brief
Scope / prerequisiteUse it to find what is at the other end of a cable, document a network, or set up and check remote access to a device.
Show · 3
What next?3 suggested next steps
Catalog command links3
Evidence0
On this pageJump to a specific section
Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Commands & verification Verify boundary
CommandShows
show cdp neighborsOne line per neighbour: name, local port, hold time, capability, platform, remote port
show cdp neighbors detailAlso the neighbour's address, software version and native VLAN
show lldp neighbors / show lldp neighbors detailThe same from LLDP
show cdp interfaceWhere CDP is enabled, with timers
show ip sshWhether SSH is enabled, and the version
show line vty 0 4The vty lines and their settings
show usersCurrent sessions
show ip interface briefThe management address and its state
Step 2 Troubleshooting workflow Narrow the fault

A neighbour is missing.

1. show cdp interface — is CDP running on that interface? Globally (cdp run)?

2. The neighbour is not Cisco, or has CDP off → use LLDP: lldp run on both.

3. Is the link up at all? An entry lingers for the hold time after a link fails, then disappears.

4. A device in between — an unmanaged switch, a media converter — may pass or swallow the advertisements; what you see is then not the directly connected device.

Cannot connect with SSH.

1. Can the management address be pinged? If only from its own subnet: the switch lacks ip default-gateway.

2. show ip ssh — enabled? "Disabled" usually means no RSA key: set hostname and domain name, generate the key.

3. show running-config | section line vty — transport input ssh and login local present? Is an access-class limiting the source addresses?

4. Does a local user exist — or, with AAA, is the server reachable?

5. Connection opens and is refused at login → credentials or the authentication method.

Step 3 Common mistakes Narrow the fault
  • "CDP shows the whole network." Only the directly connected neighbours.
  • "LLDP is on by default like CDP." On Cisco IOS it must be enabled.
  • "Discovery protocols are harmless." They reveal model, software version and addresses; disable them on untrusted ports.
  • "SSH is enabled once a password is set." It also needs a hostname, a domain name and an RSA key.
  • "transport input all is fine." It leaves Telnet open, sending passwords in clear text.
  • "A Layer 2 switch needs no gateway." It needs one to be managed from another network.
  • "The neighbour entry is still there, so the link is up." Entries remain for the hold time after the last advertisement.
Command lookup Jump straight to Cisco syntax
Key points

CDP and LLDP see only the direct neighbour and run per interface; LLDP is often off by default on Cisco. Both reveal information — disable them on ports facing outside. SSH needs a hostname, a domain name, an RSA key, a local user and transport input ssh on the vty lines. A Layer 2 switch needs a management SVI and a default gateway.

Key checks
  • show cdp neighbors / show cdp neighbors detail — neighbour, local port, remote port, platform, address.
  • show lldp neighbors / show lldp neighbors detail — the same by LLDP.
  • show cdp interface — where CDP runs.
  • show ip ssh — SSH enabled and version.
  • show line vty 0 4 and show running-config | section line vty — allowed protocols and login method.
  • show users — who is logged on.
ReferenceWhat it is1 section · depth on demand

Concept overview

Discovery protocols let directly connected network devices tell each other who they are: CDP is Cisco's, LLDP the vendor-neutral standard. Device management is how an administrator reaches a device to configure it — today SSH to a management address, with the console port as the fallback.

ReferenceWhy it matters1 section · depth on demand

Why it matters

Neighbour information is the quickest way to learn or confirm how a network is cabled — which device and port is at the other end of each link — without tracing cables. Secure remote access is what makes a device manageable at all; the handful of commands it requires are among the first configured on any switch or router.

ReferenceHow it works1 section · depth on demand

How it works

Discovery. Each device periodically sends an advertisement out of every enabled interface. The neighbour stores it and does not forward it, so only directly connected devices are seen.

CDPLLDP
StandardCisco proprietaryIEEE 802.1AB
Default on Cisco IOSEnabledDisabled
Advertisement interval60 seconds30 seconds
Hold time180 seconds120 seconds
Enable globallycdp runlldp run
Per interfacecdp enablelldp transmit, lldp receive

An advertisement carries the device name, the sending port, the platform, capabilities (router, switch, phone), the software version, a management address and — in CDP — the native VLAN and duplex, which is how mismatches get reported in the log.

IP phones and access points use these protocols to learn their voice VLAN and negotiate power.

Security. The same information is useful to an attacker. Turn the protocols off on interfaces facing users you do not trust, providers and the internet: no cdp enable, no lldp transmit.

Management access.

MethodNotes
ConsolePhysical port; works without any network configuration
SSHEncrypted remote access; the standard
TelnetClear text; should be disabled
HTTPSWeb interface or API

Enabling SSH takes a name, a key and an account:

hostname SW1
ip domain name example.com
crypto key generate rsa modulus 2048
ip ssh version 2
username admin secret <password>
line vty 0 15
 transport input ssh
 login local

The management address. A router is reached on any of its interface addresses, preferably a loopback. A Layer 2 switch needs an address on a VLAN interface and a default gateway to be reachable from other networks:

interface Vlan99
 ip address 10.0.99.11 255.255.255.0
 no shutdown
ip default-gateway 10.0.99.1
ReferenceImportant terms & boundaries3 sections · depth on demand

Important terms & boundaries

TermMeaning
Device IDThe neighbour's hostname
Local interfaceThe port on this device
Port IDThe port on the neighbour
Hold timeSeconds until the entry expires without a new advertisement
CapabilityR router, S switch, T bridge, P phone, H host
vty linesThe virtual lines that remote sessions use
SVIA VLAN interface; holds a switch's management address

In depth

Discovery and device management

Managing a network starts with knowing what is connected where and being able to reach each device safely. Cisco's IOS XE system management guide describes the main discovery tool, CDP:

  • Each device advertises its device ID, addresses, port, capabilities, software version and platform.
  • Advertisements go to a multicast address every 60 seconds by default.
  • Neighbours keep the information for 180 seconds.
  • show cdp neighbors [detail] lists them.
  • show cdp traffic shows packet and checksum-error counts.

Discovery and management building blocks

NeedTools
Who is connected to this port?CDP, LLDP
Where is a MAC or IP address?MAC address table, ARP, DHCP snooping bindings
Reach the deviceSSH (in-band), console or out-of-band network
Know what's installedshow inventory, show version
Keep it consistentTemplates, configuration archive, Catalyst Center
Find devices at scaleCatalyst Center discovery (CDP/LLDP and IP ranges)

Tracing a host to its switch port

StepCommand
1. Find the MAC for the IP on the gatewayshow ip arp 10.110.0.64
2. Find where that MAC is learnedshow mac address-table address <mac>
3. If it is learned on an uplink, find the neighbourshow cdp neighbors <uplink>
4. Repeat on the next switchUntil the MAC appears on an access port
dist1# show ip arp 10.110.0.64
Internet  10.110.0.64   2   a4bb.6d55.0164  ARPA   Vlan110
dist1# show mac address-table address a4bb.6d55.0164
 110    a4bb.6d55.0164    DYNAMIC     Te1/0/5
dist1# show cdp neighbors TenGigabitEthernet1/0/5 | include acc
acc-2f-01        Ten 1/0/5         151    S I   C9300-48P  Ten 1/1/1
acc-2f-01# show mac address-table address a4bb.6d55.0164
 110    a4bb.6d55.0164    DYNAMIC     Gi1/0/14
acc-2f-01# show interfaces GigabitEthernet1/0/14 description

Device management essentials

ItemPractice
Management accessSSH v2 only, AAA, management ACLs
TimeNTP everywhere
LogsCentral syslog
BackupsAutomatic configuration archives
InventorySerial numbers and software versions recorded centrally

The guide notes that a neighbour without an IP address on the link may report another interface's address. Check the detail output before using that address for management.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

Discovery protocols let devices tell their directly connected neighbours who they are. CDP (Cisco) and LLDP (standard) advertise the device name, model, port and management address, which engineers use to trace cabling and management systems use to build inventories and topology maps. Because the same information is useful to attackers, discovery should be turned off on ports facing untrusted networks.

Device discovery and management basics: CDP (Cisco) and LLDP (IEEE 802.1AB) advertise device name, platform, port and management address to neighbours; NMS and Catalyst Center use them plus IP ranges to build inventory.

show cdp neighbors detail
show lldp neighbors detail
lldp run
no cdp enable              ! on untrusted/edge ports

Disable CDP/LLDP towards the internet and untrusted ports (information disclosure), but keep LLDP-MED on access ports for IP phones (voice VLAN, PoE negotiation).

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Network Access → Discovery & Device Management. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Confirmation

Confirm action

Continue?