Thursday, July 11, 2013

Using LLDP (CDP) with HP Comware and Provision switches.

The topic came up at CompetencSolutions as to whether HP switches can run CDP or do network discovery with Cisco devices. And the answer is yes and know. Yes they run CDP but only halfway and even less with the Comware. Some clarification is in order. 

So the basics of what is LLDP? It stands for link layer discovery protocol. What it does is it allows you to discover devices from the switch you are currently logged into. It is running by default out of the box on all HP devices and is exchanging information about the switch locally to the neighbor directly connected. Most importantly LLDP is an open standard IEEE 802.1ab which means it works across other platforms where as Ciscos CDP is proprietary.

While LLDP is not intended to be used as a configuration protocol (see Cisco ODR) it does allow the administrator to quickly build an accurate network map without having to rely on an outdated network topology map or worse having to trace cable. 

With Comware the command is relatively simple. The easiest is to go in and type:
For a slightly more detailed neighbor-information report use the "brief" command instead of "list":
If you want to see everything that a neighbor is advertising use:
<Comware-1>display lldp neighbor-information 



It is usually about now that the issue of security pops up and having all of your switches advertising in cleartext their ip addressing, model, and version information as well as what ports are used on both sides means that while you can build a network map then so can the bad guys. So to turn off LLDP globally or to disable it per interface the commands are as follows:

[Comware-2]undo lldp enable

-or for just the interface
[Comware-2-GigabitEthernet1/0/27]undo lldp enable

-or to prune whether you will just receive or just send...
[Comware-2-GigabitEthernet1/0/25]lldp admin-status ?
  disable  The port can neither transmit nor receive LLDP frames
  rx       The port can only receive LLDP frames
  tx       The port can only transmit LLDP frames
  txrx     The port can both transmit and receive LLDP frames

Provision switches follow suite so far as being enabled for LLDP out of the box and having the ability to enable/disable the service globally or per interface. To simply show information:

ProVision-1# show lldp info remote-device

ProVision-1(config)# no lldp run
ProVision-1(config)# lldp run

ProVision-1(config)# lldp admin-status 1-12 ?
 txonly                Set in transmit mode.
 rxonly                Set in receive mode.
 tx_rx                 Set in transmit and receive mode.
 disable               Disable.


CAUTION - DEEP DIVE SECTION
So where does CDP fit in?

The short answer is Provision will listen to CDP but not send it while Comware only uses CDP for Cisco phones. Here is the configuration to enable:

[Comware-2]lldp compliance cdp
[Comware-2]int g1/0/25
[Comware-2-GigabitEthernet1/0/25]lldp admin
[Comware-2-GigabitEthernet1/0/25]lldp admin-status txrx
[Comware-2-GigabitEthernet1/0/25]lldp compli
[Comware-2-GigabitEthernet1/0/25]lldp compliance admin
[Comware-2-GigabitEthernet1/0/25]lldp compliance admin-status cdp txrx

Provision on the other readily integrates CDP although does not send:

ProVision-1(config)# cdp
 enable                Enable/disable CDP on particular device ports.
 run                   Start and stop CDP on the device.
ProVision-1(config)# show cdp neighbors

 CDP neighbors information

  Port Device ID                     | Platform                     Capability
  ---- ----------------------------- + ---------------------------- -----------
  1    2c 59 e5 11 f5 00             | HP J9310A Switch E3500yl-... R S
  19   d0 7e 28 76 7b 7c             | HP Comware Platform Softw... R S

For reference here are a few documents you may want to read for more information. Included is a really nice Interoperability Manual that covers Cisco to HP made available from HP.

reference:

Comments? Suggestions? Found a better way? Let me know below...







2 comments:

Anonymous said...

Very nice Info and layout you have created here, Hope you keep up the good work.

Anonymous said...

Very nice Info and layout you have created here, Hope you keep up the good work.