Layer 2 or the Datalink layer provides physical addressing and access to media. It defines how data is to be formatted for transmission and how access to the network is to be controlled. It also provides error detection, ensuring data on higher layers is formatted correctly for transmission.
Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) in Data Link Layer are layer 2 (Datalink layer) protocols. They both help to discover how devices are connected to each other in a network. They both run independently of protocols IPv4/IPv6. They also help to verify and create documentation.
Cisco Discovery Protocol (CDP):
CDP is a Cisco proprietary protocol developed by Cisco Systems. It is used to discover other Cisco devices and can be used to share information such as OS version IP address, etc. CDP uses multicast frames for transmission and doesn’t rely on higher layer protocols. It can also be used for On Demand Routing to include routing information in CDP announcements so that dynamic routing protocols do not need to be used in simple networks.
Link Layer Discovery Protocol (LLDP):
LLDP on the other hand is the industry standard version of CDP. It is used by network devices for advertising themselves and their neighbors on a local area network based on IEEE 802 technology.
Consider the following diagram:
In the above diagram: connection 1 is possible as the connection is between 2 Cisco devices and both would use CDP to discover their neighbors and share their information. The same goes for connection 2 which is between 2 non Cisco devices. It will be using LLDP instead of CDP to discover its neighbors. A Cisco device cannot locate a non Cisco device using CDP and vice versa. Therefore, we can say that connection 3 is not possible.
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Framing in Data Link Layer
- File Transfer Protocol (FTP) in Application Layer
- Difference Between High-level Data Link Control (HDLC) and Point-to-Point Protocol (PPP)
- Difference between Secure Socket Layer (SSL) and Transport Layer Security (TLS)
- Difference between layer-2 and layer-3 switches
- Difference between Stop and Wait protocol and Sliding Window protocol
- Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
- Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
- What is ODI(Open Data link Interface)?
- Principle Of Reliable Data Transfer Protocol
- Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
- TCP and UDP in Transport Layer
- Traceroute in Network Layer
- Secure Socket Layer (SSL)
- Protocols in Application Layer
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.