Link Layer Discovery Protocol (LLDP) is a tool for finding switches and other network devices. It serves on Layer 2 of the OSI model and helps identify network components in the immediate area. It is also helpful in mapping devices and analyzing network topology.
The IEEE 802.1AB document defines an extra option for CDP. This protocol helps with exchanging and controlling communication between devices.
What is LLDP Protocol in Networking?
Devices nearby communicate by sending and receiving a MAC frame to share information. This process means they can only talk within the same network segment.
The LLDPDU package structure has Chassis ID, Port ID, and TTL info. TLV (Type-Length-Value) fields organize the information by displaying type, length, and value. So, these fields aid in collecting data within specific areas.
The information obtained from the protocol remains private, working seamlessly with SNMP. Moreover, SNMP accesses and stores this data in an MIB on local or remote networks.
LLDPMED is an enhanced version that extends information access beyond the same network. The expansion of this term is Link Layer Discovery Protocol – Media Endpoint Discovery. It provides better device identification and location tracking. Additionally, it increases network visibility. So, it allows data about devices in different networks to be obtained.
The LLDPMED shares the network policies, device location, power management, and more. As a result, devices from different networks can exchange information.
Each device in the network has an LLDP Agent that manages its access to higher layers. This agent handles receiving, sending, and managing packages.
The Link Discovery protocol is vital for determining VoIP systems. Furthermore, it aids in identifying devices’ Voice over IP compatibility. The Link Discovery protocol is critical in deciding on VoIP systems. Moreover, it aids in identifying devices’ Voice over IP compatibility. CDP is convenient when Cisco devices dominate the network. Furthermore, it optimizes device discovery and network management.
When the network includes Cisco and 3rd party devices, LLDP is beneficial. Furthermore, LLDP effectively accommodates various manufacturers’ devices.
How Does LLDP Work?
A device supporting the protocol sends messages to its neighbors. These messages identify the device and provide network-related information.
SNMP stores information in MIB, making it accessible. So, data in this database can be easily retrieved using SNMP.
The database holds the system name, port details, IP address, and more. So, it stores essential network and device information comprehensively. Reading the database with SNMP provides the complete logical topology. Thus, administrators gain insights into the network’s structure and connections.
LLDPMED Working Logic
The updated version exchanges VoIP-related information, simplifying VoIP deployment. So, it streamlines the integration of Voice over IP systems. This protocol performs the following operations in order;
- The Switch transmits port power capacity and VLANs for audio systems. Moreover, it communicates DiffServ Code Point and location data.
- IP telephony broadcasts power requirements, VLANs for audio systems, and DiffServ Code Point. Furthermore, it disseminates relevant information about its configurations.
- The network management system requests detailed information from the Switch. As a result, it can create topological maps of the voice and data infrastructure.
Comparison
How to Enable and Configure LLDP on a Cisco Router or Cisco Switch
Devices like CDP do not enable the Link-layer discovery protocol by default. Thus, manual configuration is necessary to help the protocol.
Execute the “lldp run” command in config mode to enable the Link Discovery protocol. So, it activates the protocol on the Router and Switch.
To turn off the service, use the “no lldp run” command in config mode. Thus, it deactivates the Link Discovery protocol on the device.
Let’s examine the commands now;
show lldp (Inactive)
L2_B_SW#
% LLDP is not enabled
lldp run
L2_B_SW#conf t
L2_B_SW(config)#lldp run
L2_B_SW(config)#exit
show lldp (Active)
Global Information:
Status: ACTIVE
LLDP advertisements are sent every 30 seconds
LLDP hold time advertised is 120 seconds
LLDP interface reinitialisation delay is 2 seconds
L2_B_SW#
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
L2_A_SW Gi0/0 120 R Gi0/0
Total entries displayed: 1
L2_B_SW#
no lldp transmit
L2_B_SW(config)#interface gigabitEthernet 0/0
L2_B_SW(config-if)#lldp ?
med-tlv-select Selection of LLDPMED TLVs to send
receive Enable LLDP reception on interface
tlv-select Selection of LLDP TLVs to send
transmit Enable LLDP transmission on interface
L2_B_SW(config-if)#no lldp transmit
To keep sending data, use the “lldp send” command on the GigabitEthernet0/0 interface of L2_B_SW. So, executing the show lldp neighbors command on L2_A_SW yields no results.
The L2_A_SW command output will be as follows;
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
Total entries displayed: 0
show lldp neighbors detail (L2_B_SW)
Local Intf: Gi0/0
Chassis id: 0ce6.486e.b400
Port id: Gi0/0
Port Description: GigabitEthernet0/0
System Name: L2_A_SW
System Description:
Cisco IOS Software, vios_l2 Software (vios_l2-ADVENTERPRISEK9-M), Version 15.0(4
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2014 by Cisco Syst
Time remaining: 87 seconds
System Capabilities: B,R
Enabled Capabilities: R
Management Addresses - not advertised
Auto Negotiation - not supported
Physical media capabilities - not advertised
Media Attachment Unit type - not advertised
Vlan ID: - not advertised
Total entries displayed: 1
L2_B_SW#
show lldp traffic
Traffic statistics:
Total frames out: 34
Total entries aged: 0
Total frames in: 12
Total frames received in error: 0
Total frames discarded: 0
Total TLVs discarded: 0
Total TLVs unrecognized: 0
L2_B_SW#