0% found this document useful (0 votes)
4 views

Layer 2 Discovery Protocols (CDP & LLDP)

The document provides an overview of Layer 2 Discovery Protocols, specifically Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP). CDP is a Cisco proprietary protocol that enables network administrators to gather information about directly connected Cisco devices, while LLDP is an industry standard protocol that can run alongside CDP. The document details how to enable, configure, and verify both protocols on Cisco devices, including command examples and default settings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Layer 2 Discovery Protocols (CDP & LLDP)

The document provides an overview of Layer 2 Discovery Protocols, specifically Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP). CDP is a Cisco proprietary protocol that enables network administrators to gather information about directly connected Cisco devices, while LLDP is an industry standard protocol that can run alongside CDP. The document details how to enable, configure, and verify both protocols on Cisco devices, including command examples and default settings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Sayed Hamza Jillani

Layer 2 Discovery Protocols (CDP & LLDP)

Layer 2 Discovery Protocols


 Layer 2 discovery protocols such as CDP and LLDP share information with and
discover information about neighboring (Directly connected) Devices.
 The Shared information includes host name, IP address, device type, etc.

 CDP is a Cisco proprietary protocol.

 LLDP is an industry standard protocol (IEEE 802.1AB)

CDP (Cisco Discovery Protocol)


CDP:-
Cisco Discovery Protocol (CDP) is a proprietary Protocol designed by Cisco to help
administrator collect information about both locally attached and remote devices, by using
CDP, you can gather hardware and protocol information about neighbor devices, which is
useful info for troubleshooting and documenting the network.

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani
 CDP is Cisco Proprietary protocol.

 It is enabled on Cisco devices by Default. (Routers, Switches, Firewalls, IP


Phones etc)
 When a device receives a CDP message, it processes and discards the message.
It does not forward it to other devices. (Means only Directly connect devices
will discover)
 CDP messages are periodically sent to multicast MAC Address 0100.0CCC.CCCC

 By default, CDP messages are sent every 60 Seconds.

 By Default, CDP hold time is 180 Seconds.

CDP Conditions:-
1. Device must be Cisco
2. Must be Directly Connected
3. Must be some software Running on those Devices

By Default, CDP is globally enabled


By Default, CDP is also enabled on Each interface

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani

How to Run CDP


Globally Router
(config)#cdp run
Router4(config)#no cdp
run

How to Run CDP on specific


interface Router(config)#interface
serial 0/0 Router(config-if)#cdp
enable

Router#show cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
Router#

Router#show cdp neighbors


Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S -
Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID LocalIntrfce Holdtme Capability Platform Port ID
SW_A Fas 0/0 127 S 2950 Fas 0/1
B Ser 0/0 171 R C2600 Ser 0/0
Router#

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani
Router#show cdp neighbors detail
Device ID: SW_A
Entry address(es):
Platform: cisco 2950, Capabilities: Switch
Interface: FastEthernet0/0, Port ID (outgoing port): FastEthernet0/1 Holdtime:
178
Version :
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE
SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc. Compiled
Wed 18-May-05 22:31 by jharirba advertisement version:
2
Duplex: full

Device ID: B Entry


address(es):
IP address : 1.0.0.2
Platform: cisco C2600, Capabilities: Router
Interface: Serial0/0, Port ID (outgoing port): Serial0/0 Holdtime:
161
Version :
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5)

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 27-Apr-04 19:01 by miwang
advertisement version: 2
Duplex: full
Router#

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani

Router#show cdp interface


FastEthernet0/0 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/0 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Router#

Router#show cdp interface f 0/0


FastEthernet0/0 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Router#

Router#show cdp entry B


Device ID: B Entry
address(es):
IP address : 1.0.0.2
Platform: cisco C2600, Capabilities: Router
Interface: Serial0/0, Port ID (outgoing port): Serial0/0 Holdtime:
147

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani
Version :
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 27-Apr-04 19:01 by miwang
advertisement version: 2
Duplex: full

Router#

How to Change CDP Timer & Holdtime


Router(config)#cdp timer 100
Router(config)#cdp holdtime 200

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani

LLDP (Link Layer Discovery Protocol)


 LLDP is an industry standard protocol (IEEE 802.1AB)

 It is usually disabled on Cisco devices by default, so it must be manually


enabled.
 A device can run CDP and LLDP an the same time.

 LLDP message are periodically sent to multicast MAC address 0180.C200.000E

 When a device receives an LLDP message, it processes and discards the


message. It does not forward it to other devise.
 By Default, LLDP messages are send once every 30 seconds.

 By default, the LLDP holdtime is 120 seconds.

 LLDP has and additional timer called the ‘reinitialization delay’. If LLDP is
enabled (globally or on an interface), this timer will delay the actual
initialization on LLDP. 2 seconds by default.

Enable LLDP globally on the switch.


Switch(config)#lldp run

Disable LLDP feature on the switch.


Switch(config)#no lldp run

Enable LLDP specific to an interface.


Switch(config)#interface gigabitethernet 1/0/1

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani
Enable the interface to send LLDP.
Switch(config-if)#lldp transmit

Enable the interface to receive LLDP.


Switch(config-if)#lldp receive

Specify time for the device to hold LLDP information.


Switch(config)#lldp holdtime 120

Set the time for sending frequency of LLDP updates.


Switch(config)#lldp timer 30

Set the time for Re-initialization Delay of LLDP.


Switch(config)#lldp reinit 2

Verification
SW-A#show lldp interface fastEthernet 0/10
FastEthernet0/1
0: Tx:
enabled Rx:
enabled
Tx state:
IDLE Rx state:
INIT
SW-A#

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani

Switch#show lldp
Global LLDP
Information:
Status: ACTIVE
LLDP advertisements are sent every 30
seconds LLDP hold time advertised is 120
seconds
LLDP interface reinitialisation delay is 2 seconds

Switch#show lldp neighbors


Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

Device ID Local Intf Hold-time Capability Port


ID SW-A Fa3/0/30 333 B
Fa0/10
Total entries displayed: 1
Switch#
Switch#show lldp neighbors detail

Chassis id:
0024.9730.3680 Port id:
Fa0/10

Software / Network Engineer whatsapp: +923059299396


Sayed Hamza Jillani
Port Description: FastEthernet0/10
System Name: SW-A
System Description:
Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 15.0(2)SE7,
RELEASE SOFTWARE
(fc1)
Technical Support:
http://www.cisco.com/techsupport Copyright (c)
1986-2014 by Cisco Systems, Inc.
Compiled Thu 23-Oct-14 14:13 by
prod_rel_team Time remaining: 326 seconds
System Capabilities: B,R
Enabled Capabilities: B
Management Addresses:
IP: 192.168.21.1
Auto Negotiation - supported,
enabled Physical media capabilities:
100base-TX(FD)
100base-TX(HD)
10base-
T(FD)
10base-
T(HD)
Media Attachment Unit type:
16 Vlan ID: 1
Software / Network Engineer whatsapp: +923059299396
Sayed Hamza Jillani
Total entries displayed: 1
Switch#

Switch#show lldp traffic


LLDP traffic statistics:
Total frames out: 241
Total entries aged: 0
Total frames in: 45
Total frames received in error: 0
Total frames discarded: 0
Total TLVs discarded: 0
Total TLVs unrecognized:
Switch#

Software / Network Engineer whatsapp: +923059299396

You might also like