lldp run
Globally enables Link Layer Discovery Protocol (LLDP) on the switch, allowing it to advertise and receive device information from directly connected LLDP-capable neighbors.
Definition: lldp run is a Cisco IOS global config command. Globally enables Link Layer Discovery Protocol (LLDP) on the switch, allowing it to advertise and receive device information from directly connected LLDP-capable neighbors.
Overview
The `lldp run` command is a global configuration command that enables the Link Layer Discovery Protocol (LLDP) on a Cisco IOS switch. LLDP is a vendor-neutral, IEEE 802.1AB standard protocol that allows network devices to advertise their identity, capabilities, and neighbors on a local Ethernet network. When enabled, the switch periodically sends LLDP advertisements (LLDPDUs) out all interfaces and processes incoming LLDPDUs from directly connected neighbors.
This command is foundational for network discovery, inventory management, and troubleshooting. It matters because it provides a standardized way to discover device information—such as device type, management IP, port ID, and system description—without relying on proprietary protocols like Cisco Discovery Protocol (CDP). You would reach for this command when you need to integrate with multi-vendor environments (e.g., Juniper, HP, Arista) where CDP is not supported, or when you require a standards-based discovery mechanism for compliance or interoperability.
In a broader workflow, enabling LLDP is often one of the first steps in network monitoring and automation, as it populates the LLDP neighbor table that other tools (like SNMP, NetFlow, or network management systems) can query. Important IOS behavior: `lldp run` is a global command that must be issued before per-interface LLDP commands (like `lldp transmit` or `lldp receive`) take effect. The command is saved to the running configuration and persists across reloads if written to startup config.
There is no privilege level restriction beyond the standard global config mode (privilege level 15). Enabling LLDP does not impact CPU significantly unless the network is very large; the switch buffers LLDP frames in hardware. Note that LLDP is disabled by default on most Cisco IOS switches (unlike CDP which is often enabled by default).
Also, LLDP and CDP can coexist, but they serve different purposes; LLDP is IEEE standard, CDP is Cisco proprietary. When troubleshooting, you can use `show lldp` to verify global status and `show lldp neighbors` to see discovered devices. The command is available in IOS 12.2(55)SE and later, and in IOS-XE 3.2.0S and later.
In summary, `lldp run` is the master switch that activates LLDP on the device, enabling a wealth of neighbor information that is critical for network documentation, change management, and rapid fault isolation.
lldp runWhen to Use This Command
- Enable LLDP on a switch to discover and display information about neighboring Cisco and third-party devices for network documentation and troubleshooting.
- Activate LLDP before configuring per-interface LLDP settings to ensure the protocol is globally available.
- Use LLDP to verify device capabilities, software versions, and VLAN assignments of connected switches and routers.
- Enable LLDP as a prerequisite for using CDP-like discovery in mixed-vendor environments where CDP is not supported.
Command Examples
Enabling LLDP Globally
Switch(config)# lldp runSwitch(config)#
No output is displayed upon successful execution. The command simply enables LLDP globally. Use 'show lldp' to verify the status.
Verifying LLDP Status After Enabling
show lldpGlobal LLDP Information: Status: ACTIVE LLDP advertisements are sent every 30 seconds LLDP hold time advertised: 120 seconds LLDP interface reinitialization delay: 2 seconds
The output confirms LLDP is active globally. 'Status: ACTIVE' indicates LLDP is enabled. The advertisement interval (30s) and hold time (120s) are default values. Reinitialization delay is the time before LLDP restarts on an interface after a configuration change.
Understanding the Output
The 'show lldp' command displays global LLDP status. 'Status: ACTIVE' means LLDP is enabled globally; 'INACTIVE' means it is disabled. The advertisement interval (default 30 seconds) controls how often LLDP packets are sent.
The hold time (default 120 seconds) tells neighbors how long to keep the information before discarding it. The reinitialization delay (default 2 seconds) is the wait time before restarting LLDP on an interface after a change. In a real network, you should see ACTIVE; if not, use 'lldp run' to enable.
Watch for mismatched timers that could cause premature neighbor loss.
Configuration Scenarios
Enable LLDP on a Cisco Switch for Multi-Vendor Network Discovery
A network engineer needs to discover all directly connected devices in a mixed-vendor environment (Cisco, Juniper, HP). CDP is not supported on non-Cisco devices, so LLDP must be enabled globally.
Topology
SW1(Gi0/1)---(Gi0/0)Juniper-SW
SW1(Gi0/2)---(Gi0/0)HP-SWSteps
- 1.Step 1: Enter global configuration mode: SW1> enable
- 2.Step 2: Enter global configuration mode: SW1# configure terminal
- 3.Step 3: Enable LLDP globally: SW1(config)# lldp run
- 4.Step 4: (Optional) Verify LLDP status: SW1(config)# do show lldp
- 5.Step 5: Exit configuration mode: SW1(config)# end
- 6.Step 6: Save configuration: SW1# copy running-config startup-config
! Enable LLDP globally lldp run
Verify: SW1# show lldp Global LLDP Information: Status: ACTIVE LLDP advertisements are sent every 30 seconds LLDP hold time advertised: 120 seconds LLDP interface reinitialisation delay: 2 seconds SW1# show lldp neighbors 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 Juniper-SW Gi0/1 120 B Gi0/0 HP-SW Gi0/2 120 B Gi0/0 Total entries displayed: 2
Watch out: LLDP is disabled by default on most Cisco switches. If you forget to issue `lldp run`, the `show lldp neighbors` command will return nothing even if interfaces have LLDP enabled. Always verify with `show lldp` to see global status.
Disable LLDP on Specific Interfaces While Keeping Global LLDP Active
After enabling LLDP globally, the network engineer wants to prevent LLDP advertisements on a specific interface connected to a non-LLDP-capable device to reduce unnecessary traffic.
Topology
SW1(Gi0/1)---(Gi0/0)Legacy-Device
SW1(Gi0/2)---(Gi0/0)LLDP-Capable-SWSteps
- 1.Step 1: Enter global configuration mode: SW1> enable
- 2.Step 2: Enter global configuration mode: SW1# configure terminal
- 3.Step 3: Enable LLDP globally (if not already): SW1(config)# lldp run
- 4.Step 4: Enter interface configuration mode: SW1(config)# interface GigabitEthernet0/1
- 5.Step 5: Disable LLDP transmission and reception on this interface: SW1(config-if)# no lldp transmit
- 6.Step 6: SW1(config-if)# no lldp receive
- 7.Step 7: Exit interface mode: SW1(config-if)# exit
- 8.Step 8: Verify LLDP status on the interface: SW1(config)# do show lldp interface GigabitEthernet0/1
- 9.Step 9: Save configuration: SW1(config)# end SW1# copy running-config startup-config
! Enable LLDP globally lldp run ! ! Disable LLDP on Gi0/1 interface GigabitEthernet0/1 no lldp transmit no lldp receive
Verify: SW1# show lldp interface GigabitEthernet0/1 GigabitEthernet0/1: Tx: disabled Rx: disabled Tx state: IDLE Rx state: IDLE SW1# show lldp neighbors Device ID Local Intf Hold-time Capability Port ID LLDP-Capable-SW Gi0/2 120 B Gi0/0 Total entries displayed: 1
Watch out: Disabling LLDP on an interface with `no lldp transmit` and `no lldp receive` does not affect the global LLDP status. However, if you later re-enable LLDP globally, the interface-level configuration persists. Also, note that `no lldp transmit` alone stops sending but still receives; both commands are needed to fully disable LLDP on the interface.
Troubleshooting with This Command
When troubleshooting LLDP issues, the first step is to verify that LLDP is globally enabled using `show lldp`. Healthy output shows 'Status: ACTIVE' and default timers (30-second advertisement interval, 120-second hold time). If the status is 'INACTIVE' or 'NOT RUNNING', LLDP is disabled globally—issue `lldp run` in global config.
Next, check if LLDP is enabled on specific interfaces with `show lldp interface`. For each interface, you should see 'Tx: enabled' and 'Rx: enabled'. If either is disabled, use `lldp transmit` and `lldp receive` under the interface.
Common symptoms include: (1) No neighbors shown in `show lldp neighbors`—this could mean LLDP is disabled globally, the neighbor does not support LLDP, or there is a Layer 1 issue (cable, port down). Check interface status with `show interfaces`; if the interface is down, LLDP cannot operate. (2) Partial neighbor information—if you see a neighbor but missing details like system name or management IP, the neighbor may not be sending complete LLDPDUs. Use `show lldp neighbors detail` to see all received information. (3) LLDP packets not being sent—verify with `debug lldp packets` (use with caution in production) to see if frames are being transmitted.
If no debug output, check if the interface is in an err-disabled state or if there is a VLAN mismatch. (4) High CPU due to LLDP—though rare, if the network has many LLDP neighbors (e.g., hundreds), the switch may process many frames. Consider increasing the LLDP timer with `lldp timer <seconds>` to reduce frequency. A step-by-step diagnostic flow: 1) `show lldp` to confirm global status. 2) `show lldp neighbors` to see discovered devices. 3) If no neighbors, check interface status and LLDP interface config. 4) Use `show lldp traffic` to see packet counts; if Tx count is zero, LLDP is not sending. 5) If Tx count increments but Rx count is zero, the neighbor may not be sending or there is a connectivity issue. 6) Use `show lldp errors` to see if any LLDP frames were malformed.
Correlate with `show cdp neighbors` if CDP is also enabled—sometimes CDP works but LLDP doesn't, indicating a neighbor that only supports CDP. Also, check that the neighbor's LLDP is enabled and that there is no ACL blocking LLDP multicast (01:80:c2:00:00:0e). Finally, remember that LLDP operates at Layer 2 and does not require IP connectivity; if you see neighbors but cannot ping their management IP, that is a separate routing issue.
CCNA Exam Tips
CCNA exam tip: 'lldp run' is a global configuration command; it must be entered in global config mode, not interface mode.
CCNA exam tip: LLDP is disabled by default on Cisco IOS; you must explicitly enable it with 'lldp run'.
CCNA exam tip: Unlike CDP which is Cisco proprietary, LLDP is IEEE 802.1AB standard and works with multi-vendor devices.
CCNA exam tip: The exam may test that 'lldp run' enables LLDP globally, but per-interface enablement with 'lldp transmit' and 'lldp receive' is also required for full operation.
Common Mistakes
Mistake: Forgetting to enter global configuration mode before typing 'lldp run'. Consequence: Command is rejected or applied incorrectly.
Mistake: Assuming LLDP is enabled by default. Consequence: Neighbor discovery fails until 'lldp run' is configured.
Mistake: Enabling LLDP globally but not enabling it on specific interfaces (using 'lldp transmit' and 'lldp receive'). Consequence: LLDP packets are not sent or received on those interfaces.
lldp run vs lldp transmit
Both commands enable LLDP, but lldp run globally enables the LLDP process on the switch, while lldp transmit activates LLDP advertisements on a specific interface. They are commonly confused because lldp transmit has no effect unless LLDP is globally enabled first, and engineers may mistakenly apply one when the other is needed.
| Aspect | lldp run | lldp transmit |
|---|---|---|
| Scope | Global (entire switch) | Interface (specific port) |
| Configuration mode | Global configuration | Interface configuration |
| Persistence | Persists across reboots if saved | Persists across reboots if saved |
| Precedence | Prerequisite for lldp transmit | Overrides global lldp transmit disable on that interface |
| Typical use | Initial LLDP setup | Selectively enabling LLDP on trunks or uplinks |
| Effect without the other | Enables LLDP receive by default; transmit requires interface command | No effect unless lldp run is configured |
Use lldp run when you need to globally activate LLDP on the switch to allow it to discover and be discovered by neighboring devices.
Use lldp transmit when you want to enable LLDP advertisements on a specific interface after LLDP is globally enabled.
Platform Notes
On Cisco IOS-XE (e.g., Catalyst 9000 series), the `lldp run` command syntax is identical to classic IOS. However, IOS-XE may have additional options like `lldp tlv-select` to customize which TLVs are sent. The output of `show lldp neighbors` is similar but may include additional fields like 'Network Policy' or 'Location' if configured.
On NX-OS (e.g., Nexus switches), the equivalent command is `feature lldp` in global configuration mode. NX-OS uses a feature-based model: you must first enable the LLDP feature with `feature lldp`, then LLDP is active globally. Per-interface commands are similar: `lldp transmit` and `lldp receive` under interface config.
Note that on NX-OS, LLDP is disabled by default, and you cannot use `lldp run`—it will be rejected. On Cisco ASA firewalls, LLDP is not supported; ASA uses CDP for neighbor discovery. For IOS-XR (e.g., ASR 9000), the command is `lldp` in global configuration mode, but the exact syntax is `lldp enable` (not `lldp run`).
IOS-XR also supports `lldp timer` and `lldp holdtime` but with different default values. In older IOS versions (12.x), LLDP was introduced in 12.2(55)SE; earlier versions may not support it. In IOS 15.x and 16.x, the command is fully supported.
Always check the specific platform documentation, as some switches (like Catalyst 2960-X) may have minor differences in LLDP TLV support. For example, IOS-XE 16.9 and later support LLDP-MED (Media Endpoint Discovery) for VoIP devices, which requires additional configuration. In summary, while the core `lldp run` command is consistent across IOS and IOS-XE, NX-OS and IOS-XR use different syntax, and ASA does not support LLDP at all.
Related Commands
lldp receive
Enables LLDP reception on an interface, allowing the device to receive LLDP advertisements from neighboring devices for network discovery and topology mapping.
lldp transmit
Enables LLDP transmission on an interface, allowing the device to advertise its identity and capabilities to neighboring LLDP-enabled devices.
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.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions