«

»

Jan 29

CDP and LLDP on Cisco catalyst switch

CDP and LLDP are both discovery protocols used to find information about first hop neighbor network devices.

The Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol developed by Cisco Systems. It is used to share information about other directly connected Cisco equipment, such as the operating system version and IP address.

CDP (Cisco Discovery Protocol) characteristics:

  • Allow to see directly connected devices
  • Proprietary Cisco standard
  • Enabled on Cisco switch by default

  • The Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer protocol in the Internet Protocol Suite used by network devices for advertising their identity, capabilities, and neighbours on an IEEE 802 local area network, principally wired Ethernet.

    LLDP (Link ayer Discovery Protocol) characteristics:

  • Open standard
  • Used for PoE negotiation and other protocols
  • Disabled by default
  • LLDP provides more details about devices than CDP

  • CDPvsLLDP


    Configuration

    CDP configuration commands:

    Switch# config terminal
    !--- Disable CDP on interface
    Switch(config)# no cdp run
    !--- Enable CDP on interface
    Switch(config)# cdp run
    !---
    Switch(config)# interface TenGigabitEthernet4/1
    !--- Disable CDP on interface
    Switch(config-if)# no cdp enable
    !--- Enabled CDP on interface
    Switch(config-if)# cdp enable
    

    To see information about neighbors via CDP use following commands:

    Switch#show cdp neighbours
    !
    Switch#show cdp neighbours detail
    !
    Switch#show cdp entry
    !
    Switch#show cdp interface
    


    LLDP configuration commands:

    Switch#configure terminal
    
    !--- Enable LLDP globally on the switch.
    Switch(config)#lldp run
    
    !--- Specify time for the device to hold LLDP information.
    Switch(config)#lldp holdtime 180
    
    !--- Set the time for sending frequency of LLDP updates.
    Switch(config)#lldp timer 50
    
    !--- Enable LLDP specific to an interface.
    Switch(config)#interface gigabitethernet 1/0/1
    
    !--- Enable the interface to send LLDP.
    Switch(config-if)#lldp transmit
    
    !--- Enable the interface to receive LLDP.
    Switch(config-if)#lldp receive
    

    To see information about neighbours via LLDP use following commands:

    show lldp neigbours
    
    show lldp neigbours detail
    

    To show LLDP counters use:

    show lldp traffic
    

    To see LLDP issues:

    show lldp errors
    

    Note: Remember to save configuration after making changes otherwise new configuration will be lost after device restart . To do it use “write memory” command.

    Follow me!

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>