cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4157
Views
10
Helpful
6
Replies

Why CDP is a layer2 protocol?

chandra_rc16
Level 4
Level 4

Why CDP is a layer2 protocol?

Where as it is also giving information about the layer3 IP address of the connected device .

Regards,

Chandu

Regards, Chandu
1 Accepted Solution

Accepted Solutions

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.

Regards, Alex. Please rate useful posts.

View solution in original post

6 Replies 6

Sandeep Choudhary
VIP Alumni
VIP Alumni

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.

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

Regards, Chandu

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.

Regards, Alex. Please rate useful posts.

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

HTH

Rick

Alex - I've got to endorse an explanation that includes a packet decode. Nice work!

chandra_rc16
Level 4
Level 4

Thanks everyone.

Regards, Chandu
Review Cisco Networking products for a $25 gift card