Configure and verify Layer 2 discovery protocols (Cisco Discovery Protocol and LLDP)
CDP and LLDP are layer 2 discovery protocols that enable different network devices to automatically discover each other. This allows devices to exchange information such as hostname, IP and MAC address, connected interfaces, and device capabilities. While CDP is a proprietary protocol developed by Cisco, LLDP is an open-source protocol supported by multiple vendors.
CDP allows a device to learn about its neighbors on directly connected interfaces. A device can retrieve information about its neighbors such as their hostname, IP and MAC addresses, and device capabilities. To check CDP status, we can use the command "show cdp" and "show cdp neighbors" to view the list of neighboring devices.
On the other hand, LLDP also enables devices to discover their neighbors on directly connected interfaces. By default, LLDP is disabled on all interfaces, and we must manually enable it on interfaces that require it. We can use the "lldp run" command to enable LLDP, and "show lldp neighbors" to view the neighboring devices and LLDP is an open-source protocol.
The difference between CDP and LLDP is that LLDP does not identify the neighbor's platform or IGMP capabilities. Also, CDP lists a neighbor's capabilities whether they are enabled or not, while LLDP only lists a neighbor's capabilities when they are enabled.
Both CDP and LLDP have a timer that sends messages and a hold time after which they remove a neighbor from their list. To change the CDP or LLDP time, we can use the commands
"cdp timer <seconds>" and "cdp holdtime <seconds>" for CDP and
"lldp timer <seconds>" and "lldp holdtime <seconds>" for LLDP.
CDP Configuration and Verification Commands
To enable CDP on a device:
conf t
cdp run
To disable CDP on an interface:
no cdp enable
To display CDP information:
show cdp neighbors
The show cdp neighbors command displays information about directly connected Cisco devices discovered by CDP. This includes device ID, local interface, hold time, and capabilities.show cdp neighbors detail
The show cdp neighbors detail command provides detailed information about the directly connected Cisco devices discovered by CDP, including IP address and platform information.show cdp interface [interface-name]
show cdp traffic
LLDP Configuration and Verification Commands
To enable LLDP on a device:
conf t
lldp run
To disable LLDP on an interface:
no lldp receive
To display LLDP information:
show lldp neighbors
The show lldp neighbors command displays information about directly connected devices discovered by LLDP. This includes the device ID, local interface, and capabilities.
show lldp neighbors detail
The show lldp neighbors detail command provides detailed information about the directly connected devices discovered by LLDP, including system name, system description, and management address.
show lldp traffic
The show lldp traffic command displays information about the LLDP packets being sent and received on a device.
show lldp interface [interface-name]
The show lldp interface [interface-name] command displays LLDP information for a specific interface on a device, including the LLDP hold time and the version of LLDP being used
In conclusion, CDP and LLDP are essential protocols that enable network devices to discover each other on directly connected interfaces. They provide valuable information about neighboring devices and their capabilities, which helps network administrators to troubleshoot and manage their networks effectively. By using the show commands mentioned above, network administrators can easily view CDP or LLDP information, including device ID, local interface, and capabilities, to better understand the devices on their network. The output generated by these show commands can be used for troubleshooting and network management purposes.
0 comments:
Post a Comment