Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Why CDP is a layer2 protocol?

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
Green

Why CDP is a layer2 protocol?

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.
6 REPLIES
VIP Purple

Re: Why CDP is a layer2 protocol?

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.

New Member

Why CDP is a layer2 protocol?

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
Green

Why CDP is a layer2 protocol?

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.
Hall of Fame Super Silver

Why CDP is a layer2 protocol?

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

Hall of Fame Super Silver

Why CDP is a layer2 protocol?

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

New Member

Why CDP is a layer2 protocol?

Thanks everyone.

Regards, Chandu
471
Views
5
Helpful
6
Replies