πLink Layer Discovery Protocol ( LLDP ) Explained with Commands & Practical Examples

π§ What is LLDP?
Link Layer Discovery Protocol (LLDP) is a vendor-neutral Layer 2 protocol (IEEE 802.1AB) that allows network devices to advertise their identity and capabilities to directly connected neighbors.
π In simple terms:
LLDP helps devices automatically identify neighboring devices, regardless of vendor.

LLDP provides detailed neighbor information that helps in troubleshooting and network mapping:
- System Name (Hostname)
- Management IP Address
- Port ID and Interface
- Device Capabilities (Switch, Router, etc.)
- VLAN Information
- Duplex and Speed
- PoE Capabilities
π This makes LLDP extremely useful in multi-vendor environments
βοΈ How LLDP Works
- Operates at Layer 2 (Data Link Layer)
- Sends updates every 30 seconds (default)
- Uses TLV (Type-Length-Value) format
- Stores data in a neighbor table
- Works only with directly connected devices
π» LLDP Configuration & Commands (Proper Structure)
Below is a clean and professional breakdown of LLDP commands, exactly how you should present in a technical blog.
π§ 1. Enable / Disable LLDP Globally
Enable LLDP
(config)# lldp run
π Activates LLDP on the device.
Disable LLDP
(config)# no lldp run
π Completely disables LLDP (recommended in secure environments).
π§ 2. Enable LLDP on Interface
(config)# interface g0/1
(config-if)# lldp transmit
(config-if)# lldp receive
π Allows the interface to:
- Send LLDP packets
- Receive LLDP packets
π§ 3. Disable LLDP on Interface
(config)# interface g0/1
(config-if)# no lldp transmit
(config-if)# no lldp receive
π Best practice for:
- User-facing ports
- External connections
π§ 4. Verify LLDP Status
show lldp
π Displays global LLDP information and status.
π§ 5. View LLDP Neighbors
show lldp neighbors
π Shows:
- Neighbor devices
- Local interfaces
- Port IDs
π§ 6. View Detailed Neighbor Information
show lldp neighbors detail
π Provides:
- IP address
- System description
- Capabilities
π Most useful command for troubleshooting
π§ 7. Check LLDP Interface Status
show lldp interface
π Displays interfaces where LLDP is enabled.
π§ 8. View Local Device Information
show lldp local-information
π Shows what your device is advertising to neighbors.
π§ 9. LLDP Timer Configuration (Optional)
(config)# lldp timer 30
(config)# lldp holdtime 120
π Controls:
- Advertisement interval
- Neighbor information retention
π’ Real-World Use Case
Scenario: Mixed Vendor Network
You connect to a switch and:
- No documentation available
- Devices from different vendors
- Unknown topology
π Run:
show lldp neighbors detail
β Instantly discover devices
β Identify IP addresses
β Understand topology
π This saves significant troubleshooting time
β οΈ Limitations of LLDP
- Works only with directly connected devices
- Requires LLDP enabled on both ends
- Cannot map entire network topology
π Security Considerations
LLDP exposes:
- Device identity
- IP address
- Network structure
π Best practice:
- Disable LLDP on user-facing ports
- Enable only on infrastructure links
π LLDP vs CDP
Here is a detailed comparison of LLDP vs CDP or Link Layer Discovery Protocol vs Cisco Discovery Protocol.
In real-world networking, LLDP is essential for multi-vendor environments, while CDP provides deeper visibility in Cisco-based infrastructures.
| Feature | LLDP (Link Layer Discovery Protocol) | CDP (Cisco Discovery Protocol) |
|---|---|---|
| Standard | IEEE 802.1AB (Open Standard) | Cisco Proprietary |
| Vendor Support | Multi-vendor (Cisco, HP, Juniper, etc.) | Cisco devices only |
| Default Status | Usually disabled by default on many devices | Enabled by default on Cisco devices |
| Layer | Layer 2 (Data Link Layer) | Layer 2 (Data Link Layer) |
| Discovery Scope | Direct neighbors only | Direct neighbors only |
| Packet Structure | Uses TLV (Type-Length-Value) | Uses TLV (Type-Length-Value) |
| Default Timer | 30 seconds | 60 seconds |
| Holdtime | 120 seconds (default) | 180 seconds (default) |
| Information Detail | Standardized, moderate detail | More detailed (Cisco-specific) |
| VLAN Mismatch Detection | Limited support | Detects VLAN mismatches,Supported (CDPv2) |
| Duplex Mismatch Detection | Limited support | Supported (CDPv2) |
| Security Risk | Moderate (exposes device info) | Higher (more detailed exposure) |
| Configuration | Requires manual enabling | Enabled by default |
| Use Case | Multi-vendor enterprise networks | Cisco-only environments |
π‘ Pro Tips (From Experience)
- Use LLDP in multi-vendor networks
- Combine LLDP with CDP for full visibility
- Always check detailed neighbor output
- Disable LLDP on untrusted interfaces
β Frequently Asked Questions (FAQ)
Q1: What is LLDP used for?
LLDP is used to discover directly connected network devices in multi-vendor environments.
Q2: What is the default LLDP timer?
Default LLDP update interval is 30 seconds.
Q3: Can LLDP replace CDP?
LLDP is preferred in multi-vendor networks, but CDP is still useful in Cisco-only environments.
π Next Steps in Networking
π To strengthen your networking skills, explore our Cisco Discovery Protocol (CDP) and Basic Switch Configuration guides for deeper understanding and practical labs.
For official standards, refer to IEEE LLDP documentation from Cisco.
One can also refer to LLDP, explained by Wikipedia.
π§ Final Thoughts
LLDP is one of the most practical and widely used protocols in modern networking environments.
It helps you:
- Discover devices quickly
- Simplify troubleshooting
- Understand network topology
π Mastering LLDP will significantly improve your efficiency as a network engineer.