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.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Framing in Data Link Layer
- Design Issues in Data Link Layer
- Data Link Layer Communication Protocols in IoT
- Examples of Data Link Layer Protocols
- Services provided by Data Link Layer
- Various kind of Framing in Data link layer
- Error Control in Data Link Layer
- Flow Control in Data Link Layer
- Line Discipline in Data Link Layer
- Difference between layer-2 and layer-3 switches
- Difference between Secure Socket Layer (SSL) and Transport Layer Security (TLS)
- Difference Between High-level Data Link Control (HDLC) and Point-to-Point Protocol (PPP)
- Logical Link Control (LLC) Protocol Data Unit
- File Transfer Protocol (FTP) in Application Layer
- Difference between Stop and Wait protocol and Sliding Window protocol
- Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
- Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
- Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
- Difference between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)
- Optimized Link State Routing Protocol
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.