arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

Link Layer Discovery Protocol (LLDP)

Link Layer Discovery Protocol (LLDP) is an IEEE 802.1AB-2009 that defines messages, encapsulated in Ethernet frames for the purpose of giving devices a means of announcing basic device information to other devices on the LAN (Local Area Network) through periodic retransmissions out each port every 30 seconds by default.

This implementation of LLDP is compatible with the IEEE 802.1AB-2005 standard. LLDP uses Layer 2 (the data link layer), and allows network management applications to extend their awareness of the network by discovering devices that are direct neighbors of already known devices.

With LLDP, the switch can advertise the presence of its ports, their major capabilities, and their current status to adjacent LLDP neighbours. LLDP transmissions occur on ports at regular intervals or whenever there is a relevant change to their status. The switch can also receive LLDP information advertised from adjacent LLDP-capable network devices.

The following topics provide more information on configuring LLDP:

Enabling LLDPchevron-right
Displaying LLDP Neighborschevron-right

Enabling LLDP

You can enable or disable LLDP using the below command:

hashtag
Reference

Command

lldp { disabled | rx-and-tx | rx-only | tx-only }

Description

Enable/Disable LLDP receive and transmit

CLI Example

You can verify the configuration by using the command(s) below:

Parameters

disabled Disable LLDP

rx-and-tx Enable Rx and Tx

rx-only Enable Rx-Only

tx-only Enable Tx-Only

Mode

INTERFACE

pbnoscli# configure terminal
pbnoscli(config)# interface ethernet Ethernet1/1
pbnoscli(config-if)# lldp 
  disabled              Disable LLDP
  rx-and-tx             Enable Rx and Tx
  rx-only               Enable Rx-Only
  tx-only               Enable Tx-Only
pbnoscli(config-if)# lldp rx-and-tx 
pbnoscli(config-if)# 
pbnoscli# sh running-config 
configure terminal
interface ethernet Ethernet1/1
lldp rx-and-tx
!
interface ethernet Ethernet2/1
lldp rx-only
!
interface ethernet Ethernet3/1
lldp disabled
!
interface mgmt
ip address 10.4.4.52/24 gateway 10.4.4.1
!
pbnoscli# 

Displaying LLDP Neighbors

You can use the below commands to verify LLDP information:

hashtag
Reference

Command

show lldp neighbors

Description

hashtag
Example

To display the LLDP neighbor's information in detail, use the following command:

hashtag
Reference

hashtag
Example

Display LLDP neighbors

Parameters

None

Mode

EXEC

Command

show lldp neighbors detail

Description

Display LLDP neighbors in detail

Parameters

None

Mode

EXEC

pbnoscli# show lldp neighbors
Capability codes: (R) Router, (B) Bridge, (O) Other
LocalPort    RemoteDevice    RemotePortID    Capability    RemotePortDescr
-----------  --------------  --------------  ------------  -----------------
Ethernet1/1  sonic           etp1            BR            Ethernet0
Ethernet2/1  sonic           etp2            BR            Ethernet4
Ethernet3/1  sonic           etp3            BR            Ethernet8
Ethernet13/1 sonic           hundredGigE13   BR            Ethernet48
Ethernet14/1 sonic           hundredGigE14   BR            Ethernet52
Ethernet15/1 sonic           hundredGigE15   BR            Ethernet56
eth0         HP2848          12              B             12
--------------------------------------------------
Total entries displayed:  7
pbnoscli#  
pbnoscli# show lldp neighbors detail
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth0, via: LLDP, RID: 1, Time: 0 day, 10:12:31
  Chassis:     
    ChassisID:    mac 00:0e:7f:01:2f:00
    SysName:      HP2848
    SysDescr:     ProCurve J4904A Switch 2848, revision I.10.105, ROM I.08.07 (/sw/code/build/mako)
    Capability:   Bridge, on
    Capability:   Router, off
  Port:        
    PortID:       local 12
    PortDescr:    12
    TTL:          120
-------------------------------------------------------------------------------
<...>
-------------------------------------------------------------------------------
Interface:    Ethernet15/1, via: LLDP, RID: 3, Time: 0 day, 10:12:20
  Chassis:     
    ChassisID:    mac 80:a2:35:57:49:a7
    SysName:      sonic
    SysDescr:     SONiC Software Version: SONiC.master.0-dirty-20230123.005620 - HwSku: Accton-AS7712-32X - Distribution: Debian 10.13 - Kernel: 4.19.0-12-2-amd64
    MgmtIP:       10.4.4.56
    Capability:   Bridge, on
    Capability:   Router, on
    Capability:   Wlan, off
    Capability:   Station, off
  Port:        
    PortID:       local hundredGigE15
    PortDescr:    Ethernet56
    TTL:          120
-------------------------------------------------------------------------------
pbnoscli# 
pbnoscli# show lldp neighbors detail interface Ethernet2/1
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    Ethernet2/1, via: LLDP, RID: 2, Time: 0 day, 10:13:33
  Chassis:     
    ChassisID:    mac 04:3f:72:da:74:ee
    SysName:      sonic
    SysDescr:     SONiC Software Version: SONiC.master.0-8202018d - HwSku: ACS-MSN3700C - Distribution: Debian 11.6 - Kernel: 5.10.0-8-2-amd64
    MgmtIP:       10.4.4.52
    Capability:   Bridge, on
    Capability:   Router, on
    Capability:   Wlan, off
    Capability:   Station, off
  Port:        
    PortID:       local etp2
    PortDescr:    Ethernet4
    TTL:          120
-------------------------------------------------------------------------------
pbnoscli#