11-15-2013 04:17 AM - edited 03-07-2019 04:37 PM
Why CDP is a layer2 protocol?
Where as it is also giving information about the layer3 IP address of the connected device .
Regards,
Chandu
Solved! Go to Solution.
11-15-2013 05:54 AM
Chandu,
CDP is LAYER 2
When the router/switch sends out CDP PDUs the source address is the system MAC and the destination is a MULTICAST MAC (LAYER2) address. There are no LAYER3 headers for the likes of IP, IPX, Apples, DEC etc etc
To see this for yourself
Connect your laptop/PC to the switch via an ethernet port.
Run up WIRESHARK for say 3 minutes then filter or look for protocol CDP
You should see a packet or 2
Regards,
Alex.
Please rate useful posts.
11-15-2013 04:23 AM
Hi Chandu,
CDP works on layer 2 that means it doesnt require an IP address of the neighbor device to collect its information. Because the neigbors are directly connected, they can learn each other's MAC address (via sending the frames on multicast address).
In the case where a neighbor device doesnt have IP configured, the CDP output will not show any IP address.Hope that helps.
Regards
Please rate helpful posts.
11-15-2013 04:32 AM
Hi Sandeep,
-------------
In the case where a neighbor device doesnt have IP configured, the CDP output will not show any IP address.Hope that helps.
-----------
I know it won't show if the coneected device doen't have an IP configured.
My question is since CDP is also showing the details about IP (a layer3 protocol). Why don't we consider CDP has a layer3 protocol ?
REgards,
Chandu
11-15-2013 05:54 AM
Chandu,
CDP is LAYER 2
When the router/switch sends out CDP PDUs the source address is the system MAC and the destination is a MULTICAST MAC (LAYER2) address. There are no LAYER3 headers for the likes of IP, IPX, Apples, DEC etc etc
To see this for yourself
Connect your laptop/PC to the switch via an ethernet port.
Run up WIRESHARK for say 3 minutes then filter or look for protocol CDP
You should see a packet or 2
Regards,
Alex.
Please rate useful posts.
11-15-2013 06:36 AM
Chandu
It may be a bit confusing but I hope that you can understand that a protocol can report layer 3 information without being a layer 3 protocol. From my perspective the important thing is to consider what is required for the protocol to do its job. And CDP runs quite fine when there is only layer 2 information available. If CDP required IP addresses to do its job then I would agree that it was a layer 3 protocol. But since all that is required are MAC addresses then this is proof that it is only a layer 2 protocol.
HTH
Rick
11-15-2013 02:46 PM
Alex - I've got to endorse an explanation that includes a packet decode. Nice work!
11-17-2013 03:33 AM
Thanks everyone.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide