In this article I will go through the LLDP and CDP protocols on the HP procurve ( provision ), A-Series switches (comware) and Cisco switches, how to setup, configure and test connectivity. First some brief information on the protocols.
Link Layer Discovery Protocol – Is a vendor neutral protocol used by devices to advertise their information across a network.
Cisco Discovery Protocol – Is a propriety protocol from Cisco that displays information about devices that are connected over the network or directly.
These protocols can be used during configuration and diagnostics to display the topology of a network. LLDP and CDP support on HP and Cisco devices is as below.
- A Cisco Switch by Default has CDP enabled on all ports
- LLDP support was introduced on the following Cisco Products. 2950, 3760, 6500 and 3750 running OS over version 12.2
HP E Series
- CDP is enabled on all ports ( receive mode only), transmit is not supported.
- LLDP is enabled by default on all ports
HP A Series
- CDP is disabled by default
- LLDP is disabled by default
CDP and LLDP Commands Comparison
Description of Command
Hp E Series
HP A Series
|Show CDP Information
|show cdp neighbor
|Show CDP neighbor
|Show LLDP Infomration
|show lldp info remote
|display lldp neighbot-nformation list
|show lldp neighbor
|Show More Detailed Information
|show lldp info remote all
|display lldp neighbot-nformation
|show lldp neighbor detail
In my test setup below, I have one HP procurve and once Cisco catalyst. The switches are directly connected. The procurve has port 24 tagged in vlan 2 and vlan 2 is 192.168.1.1. The Cisco also has vlan 2 created on 192.168.1.2 and has port 1 tagged to it (using the switchport mode trunk command ).
From the Procurve we run
show cdp neighbor
show cdp neighbor detail
We now get much more information, we can see the ip address, what type of devices and the port speed we are directly connected with. So we now know that our topology runs at 100mb between our HP and our Cisco.
If we wanted to get same information for LLDP then use the commands in the table above.
Now from the cisco we run the command below to check its neighbors.
show cdp neighbors details
Should I use LLDP or CDP
Tough question, obviously if your environment is all Cisco then CDP and if your environment is HP then LLDP. In a mixed environment personally I prefer LLDP as it is not vendor specific and all new switches are compatible, the only time I would consider CDP was if my core was Cisco. Remember you can use both of these protocols at the same time.