Skip to content

LLDP (Link Layer Discovery Protocol)

LLDP discovers directly connected network devices - shows what’s connected to each interface without needing network diagrams. Works across vendors (unlike Cisco’s proprietary CDP).

LLDP is disabled by default on many devices.

Switch(config)# lldp run
Switch(config)# no lldp run

Disable LLDP on specific interface:

Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# no lldp transmit
Switch(config-if)# no lldp receive

Re-enable LLDP on interface:

Switch(config-if)# lldp transmit
Switch(config-if)# lldp receive

Shows all directly connected devices.

Switch# show lldp neighbors

Typical output:

Capability 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
SW1 Gig0/1 120 B Gig0/1
Main_L3 Gig1/1 120 R Gig1/0/2
Edge Gig2/1 120 R Gig0/0/1
Total entries displayed: 3

Shows full details including IP addresses, VLANs, capabilities.

Switch# show lldp neighbors detail

Typical output:

Local Intf: Gig0/1
Chassis id: 0cd9.96e8.8a00
Port id: Gig0/1
Port Description: Connection to SW_Core
System Name: SW1
System Description: Cisco IOS Software, Version 12.2(25r)
System Capabilities: B
Enabled Capabilities: B
Management Addresses:
IP: 10.30.0.4
Auto Negotiation - supported, enabled
Physical media capabilities:
1000baseT(FD)
100base-TX(FD)
100base-TX(HD)
10base-T(FD)
10base-T(HD)
Media Attachment Unit type: 30
Vlan ID: 1
Total entries displayed: 1

View LLDP Information for Specific Interface

Section titled “View LLDP Information for Specific Interface”
Switch# show lldp neighbors GigabitEthernet0/1

Or for detailed info:

Switch# show lldp neighbors GigabitEthernet0/1 detail

Shows LLDP packets transmitted/received and errors.

Switch# show lldp traffic

Typical output:

LLDP traffic statistics:
Total frames out: 3847
Total entries aged: 0
Total frames in: 3842
Total frames received in error: 0
Total frames discarded: 0
Total TLVs discarded: 0
Total TLVs unrecognized: 0

Shows global LLDP settings (timers, hold-time, etc.).

Switch# show lldp

Typical output:

Global LLDP Information:
Status: ACTIVE
LLDP advertisements are sent every 30 seconds
LLDP hold time advertised is 120 seconds
LLDP interface reinitialisation delay is 2 seconds

Change advertisement interval (default 30 seconds):

Switch(config)# lldp timer 60

Change hold-time (how long neighbor info is kept, default 120 seconds):

Switch(config)# lldp holdtime 180

Change reinitialization delay (default 2 seconds):

Switch(config)# lldp reinit 5
FeatureLLDPCDP
StandardIEEE 802.1AB (industry standard)Cisco proprietary
Vendor supportMulti-vendorCisco only
Default stateOften disabledEnabled on Cisco devices
Commandsshow lldpshow cdp

Enable both for maximum compatibility:

Switch(config)# lldp run
Switch(config)# cdp run

Step 1: Connect to device via SSH

laptop> ssh admin@10.30.0.2
Password: WELkom@1
SW_Core>

Step 2: Enter privileged mode

SW_Core> enable
Password: WELkom@1
SW_Core#

Step 3: View all neighbors

SW_Core# show lldp neighbors
Device ID Local Intf Hold-time Capability Port ID
SW3 Gig0/1 120 B Gig0/1
SW2 Gig1/1 120 B Gig0/1
SW1 Gig2/1 120 B Gig0/1
Main_L3 Gig3/1 120 R Gig1/0/2

Step 4: Get detailed info for specific connection

SW_Core# show lldp neighbors Gig0/1 detail
Local Intf: Gig0/1
System Name: SW3
Management Addresses:
IP: 10.30.0.6
Port id: Gig0/1

Step 5: Verify interface is trunk or access

LLDP doesn’t show trunk/access mode - use this command:

SW_Core# show interfaces Gig0/1 switchport
Name: Gig0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Trunking VLANs Enabled: 20,21,22,23,30
Pruning VLANs Enabled: 2-1001

Check if LLDP is enabled on specific interface.

Switch# show lldp interface GigabitEthernet0/1

Typical output:

GigabitEthernet0/1:
Tx: enabled
Rx: enabled
Tx state: IDLE
Rx state: WAIT FOR FRAME

Neighbor not appearing?

  • Verify LLDP is enabled globally: show lldp
  • Check interface LLDP status: show lldp interface
  • Ensure neighbor device has LLDP enabled
  • Check physical connectivity

Clear LLDP table (force rediscovery):

Switch# clear lldp table

Inventory all devices in network:

  1. Connect laptop to management VLAN (VLAN 30)
  2. SSH to core switch
  3. Run show lldp neighbors to see connected devices
  4. For each neighbor, SSH to that device
  5. Run show lldp neighbors on neighbor
  6. Verify trunk/access with show interfaces trunk or show interfaces [interface] switchport
  7. Document in table: Device, IP, Interface, Connected Device, Connected Interface, Trunk/Access
  8. Repeat for all devices

Example documentation table:

DeviceIP AddressInterfaceConnected ToRemote InterfaceMode
SW_Core10.30.0.2Gig0/1SW3Gig0/1Trunk
SW_Core10.30.0.2Gig1/1SW2Gig0/1Trunk
SW_Core10.30.0.2Gig2/1SW1Gig0/1Trunk
SW_Core10.30.0.2Gig3/1Main_L3Gig1/0/2Trunk