show lldp neighbors
Displays information about directly connected LLDP-capable devices, including device ID, local interface, hold time, capability, and port ID, used to verify LLDP neighbor discovery and troubleshoot Layer 2 connectivity.
Definition: show lldp neighbors is a Cisco IOS privileged exec command. Displays information about directly connected LLDP-capable devices, including device ID, local interface, hold time, capability, and port ID, used to verify LLDP neighbor discovery and troubleshoot Layer 2 connectivity.
Overview
The `show lldp neighbors` command is a fundamental tool in the Cisco IOS toolkit for discovering and verifying directly connected devices that support the Link Layer Discovery Protocol (LLDP). LLDP is an IEEE 802.1AB standard, vendor-neutral protocol that allows network devices to advertise their identity, capabilities, and neighbors on a local area network. Unlike Cisco's proprietary CDP (Cisco Discovery Protocol), LLDP is interoperable across multi-vendor environments, making it essential for network engineers managing heterogeneous networks. This command displays a summary table of LLDP neighbors, including the device ID (typically the hostname), local interface, hold time (time-to-live for the neighbor entry), capability codes (e.g., router, switch, bridge), and port ID (the remote port to which the local device is connected).
Network engineers reach for `show lldp neighbors` when they need to verify Layer 2 connectivity after provisioning new links, troubleshoot connectivity issues where CDP is disabled or not supported, or audit the network for unauthorized devices. It is often the first step in a troubleshooting workflow for physical or data-link layer problems, as it confirms that two devices can exchange LLDP frames. If the command returns no output, it may indicate a cabling issue, disabled LLDP on one or both ends, or a VLAN mismatch. The command is also useful for documenting the network topology, as it provides a quick snapshot of adjacent devices without requiring SNMP or a network management system.
In terms of IOS behavior, `show lldp neighbors` is a privileged EXEC command (requires enable mode) and does not affect the running configuration. The output is buffered; if the neighbor table is large, the command may display a '--More--' prompt. The command relies on LLDP being globally enabled (via `lldp run`) and on the specific interfaces (via `lldp enable`). By default, LLDP is disabled on most Cisco IOS platforms; it must be explicitly enabled. The command also supports optional parameters like `detail` for verbose output, which includes system description, management addresses, and capabilities. For CCNA and CCNP candidates, mastering this command is crucial for understanding Layer 2 discovery protocols and preparing for exam scenarios that involve multi-vendor interoperability.
show lldp neighborsWhen to Use This Command
- Verify that LLDP is enabled and discovering neighboring Cisco or third-party devices on a network segment.
- Troubleshoot missing or incorrect neighbor information when devices are not appearing in the LLDP table.
- Identify the remote device type and capabilities (e.g., router, switch, bridge) connected to a specific local interface.
- Check the hold time to determine if neighbor entries are aging out prematurely due to network issues.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| detail | detail | Displays detailed information about each LLDP neighbor, including system description, management IP addresses, port description, and capabilities. Use this parameter when you need more than the summary table, such as for inventory or troubleshooting specific device attributes. |
| interface | interface-type interface-number | Limits the output to neighbors discovered on a specific interface, e.g., GigabitEthernet0/1. Useful for focusing on a particular link when many neighbors are present. |
Command Examples
Basic LLDP Neighbor Display
show lldp neighborsCapability codes: (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other Device ID Local Intf Hold-time Capability Port ID Switch-A Gi0/0 120 B Gi0/1 Router-B Gi0/1 90 R Gi0/0 Phone-C Gi0/2 60 T Port 1
Line 1-2: Capability codes legend explaining the letters used in the Capability column. Line 3: Blank line. Line 4: Column headers: Device ID (hostname of neighbor), Local Intf (local interface where neighbor is heard), Hold-time (remaining seconds before entry expires), Capability (device type using codes), Port ID (remote interface of neighbor). Line 5: Switch-A is a Bridge (B) connected to local Gi0/0, with 120 seconds hold time, remote port Gi0/1. Line 6: Router-B is a Router (R) on local Gi0/1, hold time 90 seconds, remote port Gi0/0. Line 7: Phone-C is a Telephone (T) on local Gi0/2, hold time 60 seconds, remote port Port 1.
Detailed LLDP Neighbor with Interface
show lldp neighbors GigabitEthernet0/1 detailLocal Intf: Gi0/1
Chassis id: 0011.2233.4455
Port id: Gi0/0
Port Description: GigabitEthernet0/0
System Name: Router-B
System Description: Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9-M), Version 15.7(3)M, RELEASE SOFTWARE (fc2)
Time remaining: 87 seconds
System Capabilities: Router
Enabled Capabilities: Router
Management Addresses:
IP: 192.168.1.1
Auto Negotiation - supported, enabled
Physical media capabilities:
1000baseT(FD)
100baseT(FD)
100baseT(HD)
10baseT(FD)
10baseT(HD)
Media Attachment Unit type: 16
Vlan id: 1Local Intf: The local interface on which the LLDP frame was received. Chassis id: MAC address of the neighbor device. Port id: Remote interface identifier. Port Description: Description of the remote interface. System Name: Hostname of the neighbor. System Description: Full software version and platform of the neighbor. Time remaining: Seconds until this entry is removed from the LLDP table. System Capabilities: All capabilities the device supports. Enabled Capabilities: Capabilities currently active. Management Addresses: IP addresses used for SNMP or other management. Auto Negotiation: Whether auto-negotiation is supported and enabled. Physical media capabilities: Supported media types and speeds. Media Attachment Unit type: MAU type code. Vlan id: The native VLAN of the interface.
Understanding the Output
The 'show lldp neighbors' command output lists all LLDP neighbors discovered on the device. The first section shows capability codes that map letters to device types (R=Router, B=Bridge, T=Telephone, etc.). The main table has five columns: Device ID (the hostname of the neighbor), Local Intf (the local interface where the neighbor is heard), Hold-time (the remaining time in seconds before the entry expires; a value near 0 indicates the neighbor may be unreachable), Capability (one or more letters indicating device type), and Port ID (the remote interface identifier).
A healthy network should show neighbors with hold times typically between 60-120 seconds (default TTL is 120 seconds). If hold times are consistently low or entries disappear, check LLDP timers or connectivity. The detailed version (with 'detail' keyword) provides additional information such as chassis ID, system description, management addresses, and VLAN ID, which is useful for verifying device identity and configuration.
Configuration Scenarios
Verify LLDP Neighbors on a Newly Provisioned Link Between Two Routers
A network engineer has connected two routers (R1 and R2) via GigabitEthernet0/0 and enabled LLDP on both. They need to confirm that the devices see each other as LLDP neighbors before configuring a routing protocol.
Topology
R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2Steps
- 1.Step 1: On R1, enter privileged EXEC mode: enable
- 2.Step 2: Verify LLDP is globally enabled: show lldp
- 3.Step 3: If LLDP is not enabled, configure it: configure terminal, lldp run, end
- 4.Step 4: Ensure LLDP is enabled on the interface: show running-config interface GigabitEthernet0/0 (look for 'lldp enable')
- 5.Step 5: If not present, configure: configure terminal, interface GigabitEthernet0/0, lldp enable, end
- 6.Step 6: Display LLDP neighbors: show lldp neighbors
! Enable LLDP globally lldp run ! Enable LLDP on interface interface GigabitEthernet0/0 lldp enable
Verify: Command: show lldp neighbors Expected output: Device ID: R2, Local Intf: Gi0/0, Holdtime: 120 sec, Capability: R, Port ID: Gi0/0
Watch out: LLDP is disabled by default on most IOS versions. Forgetting to enable it globally or on the interface will result in no neighbors being displayed.
Troubleshoot Missing LLDP Neighbor on a Switch Port Connected to a Third-Party Device
A switch (SW1) is connected to a non-Cisco IP phone via FastEthernet0/1. The phone should be discovered via LLDP, but 'show lldp neighbors' shows no entry. The engineer needs to verify LLDP configuration and check for potential issues.
Topology
SW1(Fa0/1)---IP Phone (Vendor X)Steps
- 1.Step 1: On SW1, enter privileged EXEC mode: enable
- 2.Step 2: Check LLDP status: show lldp
- 3.Step 3: Verify LLDP is enabled on the interface: show lldp interface FastEthernet0/1
- 4.Step 4: If LLDP is not enabled on the interface, configure it: configure terminal, interface FastEthernet0/1, lldp enable, end
- 5.Step 5: Check if the phone is sending LLDP frames: debug lldp packets (caution: CPU intensive)
- 6.Step 6: Verify the port is not in err-disabled state: show interfaces FastEthernet0/1 status
! Enable LLDP globally (if not already) lldp run ! Enable LLDP on the interface interface FastEthernet0/1 lldp enable
Verify: Command: show lldp neighbors Expected output: Device ID: IP-Phone-123, Local Intf: Fa0/1, Holdtime: 120 sec, Capability: T (Telephone), Port ID: Port 1 If still missing, check 'show lldp neighbors detail' for more info.
Watch out: Some third-party devices may not support LLDP or may have it disabled by default. Also, ensure the switch port is in access or trunk mode appropriate for the phone; a VLAN mismatch can prevent LLDP frames from being received.
Troubleshooting with This Command
When using `show lldp neighbors` for troubleshooting, the first step is to understand what healthy output looks like. A typical healthy output shows a table with at least one entry, where the Device ID is the hostname of the neighbor, Local Intf is the local interface, Holdtime is a positive number (usually 120 seconds), Capability shows the device type (e.g., 'R' for router, 'B' for bridge/switch), and Port ID is the remote interface. If the output is empty, it indicates that no LLDP neighbors have been discovered.
This could be due to LLDP being disabled globally or on the interface, a physical layer issue (cable fault, wrong cable type, port down), or the neighbor not supporting LLDP. Check the LLDP status with `show lldp` to confirm it is running. If LLDP is running but no neighbors appear, verify interface status with `show interfaces` and ensure the interface is up/up.
Also, check if the neighbor is a Cisco device; if so, CDP might be used instead. Use `show cdp neighbors` to compare. If the neighbor is non-Cisco, ensure it has LLDP enabled.
Another common issue is that the neighbor's LLDP frames are being filtered by a VLAN access map or ACL. Use `debug lldp packets` cautiously to see if LLDP frames are received. If the output shows a neighbor but with a holdtime of 0 or expiring quickly, it indicates that LLDP advertisements are not being refreshed, possibly due to high CPU or network congestion.
Focus on the Capability field: if a switch is expected but shows 'R' (router), it might be a router-on-a-stick or a Layer 3 switch. The Port ID helps identify which remote port is connected; if it shows a different interface than expected, there may be a cabling error. Correlate `show lldp neighbors` with `show interfaces` to verify speed and duplex settings match.
For example, if the neighbor shows a port ID of Gi0/1 but the local interface is Fa0/0, a speed mismatch could cause intermittent connectivity. Also, use `show lldp neighbors detail` to get management IP addresses, which can be used to ping the neighbor for Layer 3 testing. In a troubleshooting flow, start with `show lldp neighbors` to quickly assess Layer 2 adjacency.
If no neighbors, check physical and LLDP configuration. If neighbors appear but with issues, drill down with `show lldp neighbors detail` and `show interfaces`. Combine with `show logging` to see if LLDP errors are reported.
Remember that LLDP is a one-shot protocol; if a neighbor goes down, the entry remains until the holdtime expires. So a stale entry might indicate a recent failure. Always clear the LLDP table with `clear lldp table` before retesting after configuration changes.
CCNA Exam Tips
Remember that LLDP is a vendor-neutral protocol (IEEE 802.1AB), unlike CDP which is Cisco proprietary; CCNA may ask which protocol to use in a multivendor environment.
The default LLDP hold time multiplier is 4, and the default transmit interval is 30 seconds, resulting in a TTL of 120 seconds; know these values for timer-related questions.
LLDP must be enabled globally with 'lldp run' and per interface with 'lldp transmit' and 'lldp receive'; the exam may test that both are needed for full operation.
The 'Capability' column uses single-letter codes; be able to identify that 'B' stands for Bridge (switch) and 'R' for Router.
Common Mistakes
Forgetting to enable LLDP globally with 'lldp run' before expecting neighbors to appear; the command will show no output if LLDP is disabled.
Confusing LLDP with CDP; both have similar commands but different protocols — CDP uses 'show cdp neighbors' and is Cisco-only.
Assuming that enabling LLDP on one interface is enough; both 'lldp transmit' and 'lldp receive' must be enabled on the interface for two-way discovery.
show lldp neighbors vs show lldp neighbors detail
Both commands display LLDP neighbor information but differ in detail level. show lldp neighbors provides a concise table, while show lldp neighbors detail reveals comprehensive per-neighbor data including management addresses and capabilities. This distinction often leads to confusion about which command to use for specific troubleshooting scenarios.
| Aspect | show lldp neighbors | show lldp neighbors detail |
|---|---|---|
| Scope | Brief neighbor summary | Full neighbor details |
| Output size | Compact per neighbor | Extensive per neighbor |
| Information covered | Device ID, local int, hold time, capability, port ID | All previous plus capabilities list, management addresses, port descriptions, system name/description |
| CPU/Memory impact | Low | Higher due to more data |
| Typical use | Quick connectivity check | Detailed topology analysis |
| Command length | Short | Longer |
Use show lldp neighbors when you need a quick overview of directly connected LLDP-capable devices.
Use show lldp neighbors detail when you require in-depth information such as management addresses or port descriptions for detailed Layer 2 topology verification.
Platform Notes
In IOS-XE (e.g., Catalyst 9000 switches), the `show lldp neighbors` command syntax and output are nearly identical to classic IOS. However, IOS-XE may support additional parameters like `show lldp neighbors detail | include Management Address` for parsing. On NX-OS (e.g., Nexus switches), the equivalent command is `show lldp neighbors`.
The output format is similar but includes additional fields like 'Chassis ID' and 'System Name'. NX-OS also supports `show lldp neighbors interface ethernet 1/1` for interface-specific output. On ASA firewalls, LLDP is not supported; instead, CDP is used.
For IOS-XR (e.g., ASR 9000), the command is `show lldp neighbors` as well, but the output is more verbose and includes 'System Description' by default. In older IOS versions (12.x), LLDP might not be available or may require an advanced IP services license. In 15.x and 16.x, LLDP is included in the IP Base license.
Some platforms require `lldp run` to be configured globally, while others may have it enabled by default. Always verify with `show lldp` to see the global status. On IOS-XE, the command `show lldp traffic` provides statistics on LLDP packets sent and received, which can be useful for troubleshooting.
For CCNA and CCNP candidates, it's important to know that the exam simulators typically use IOS 15.x or 16.x, so the command behavior is consistent. However, be aware that in some IOS versions, the `detail` parameter may show 'System Name' and 'System Description' fields that are not present in the summary output.
Related Commands
show cdp neighbors
Displays information about directly connected Cisco devices discovered via CDP (Cisco Discovery Protocol) including device IDs, local and remote interfaces, holdtime, device capabilities, and platform model.
show lldp neighbors detail
Displays detailed information about LLDP neighbors, including device capabilities, management addresses, and port descriptions, used for verifying Layer 2 topology and device discovery.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions