Link Layer Discovery Protocol (LLDP)

Hello Boris

I stand corrected. I haven’t actually used LLDP in a production environment, so I was not aware of these configuration parameters, so thank you for the heads up. It seems that LLDP can be enabled or disabled globally on a switch by issuing the lldp run command in global configuration mode. If you do this, then you don’t need to configure anything at the interface level by default, as receive, transmit, and tlv-select are all enabled by default.

However, once globally enabled, if you choose to adjust the operation of LLDP at the interface level, you can disable either the sending, or the receiving of LLDP packets by issuing the following commands, respectively: no lldp transmit, no lldp receive.

The lldp tlv-select command is used with additional parameters to specify which TLVs should be enabled or disabled. Enabling takes place without the “no” before the command while disabling is done with the “no”. For example, the following command disables the LLDP TLV for sharing the system name of a device:

no lldp tlv-select system-name

This way you can selectively choose what information is actually exchanged using LLDP.

Now to get to your question, it does seem a bit odd. This is because Cisco documentation seems to indicate that you must first enable LLDP globally in order for it to function. I’ve also tested it on lab equipment as well. I tried keeping LLDP globally disabled, and applied only the lldp receive command on an interface. When I attempted to view LLDP neighbors, I got a response saying “LLDP is not enabled”.

In order to achieve what the question is asking for, you must first enable LLDP globally, and then disable transmit like so:

Device(config)#lldp run
Device(config)#interface fastethernet 0/0
Device(config-if)#no lldp transmit

This would result in what the question is asking for. I just tried this, and the device that only receives LLDP packets does indeed detect a neighbour, while the other one has zero neighbour entries, since it is not receiving anything.

I hope this has been helpful!

Laz

3 Likes