LLDP agent
When you enable LLDP on the switch, it is automatically enabled on all data plane interfaces. You can customize this setting behavior by manually enabling/disabling support on each interface.
Supported standards
The LLDP agent supports the following standard: IEEE 802.1AB-2005, Station, and Media Access Control Connectivity Discovery
Operating modes
An LLDP agent can operate in one of the following modes:
- TxRx mode: An LLDP agent in this mode can send and receive LLDP frames.
- Tx mode: An LLDP agent in this mode can only send LLDP frames.
- Rx mode: An LLDP agent in this mode can only receive LLDP frames.
- Disable mode: An LLDP agent in this mode cannot send or receive LLDP frames.
An LLDP agent operating in TxRx mode or Tx mode sends LLDP frames to its directly connected devices both periodically and when the local configuration changes.
Sending LLDP frames
Each time the LLDP operating mode of an LLDP agent changes, its LLDP protocol state machine reinitializes. A configurable reinitialization delay prevents frequent initializations caused by frequent changes to the operating mode. If you configure the reinitialization delay, an LLDP agent must wait the specified amount of time to initialize LLDP after the LLDP operating mode changes.
Receiving LLDP frames
An LLDP agent operating in TxRx mode or Rx mode confirms the validity of TLVs carried in every received LLDP frame. If the TLVs are valid, the LLDP agent saves the information and starts an aging timer. The initial value of the aging timer is equal to the TTL value in the Time To Live TLV carried in the LLDP frame. When the LLDP agent receives a new LLDP frame, the aging timer restarts. When the aging timer decreases to zero, all saved information ages out.
TLV support
By default, the agent sends and receives the following mandatory TLVs on each interface:
- Port ID
- Chassis ID
- TTL
By default, the agent sends and receives the following organizationally specific TLV (IEEE 802.1) on each interface:
- Port description
- System name
- System description
Management address
- System capabilities
- Port VLAN ID
Log support
The following logs are supported:
- Event log: View event log messages with the command
show events -d lldpd
. - Debug log: Configure debug message logging with the command
debug lldp
. View debug messages with the commandshow debug buffer
.
Event ID | Severity | Message |
101 | Info | LLDP Enabled |
102 | Info | LLDP Disabled |
103 | Info | Configured LLDP tx-timer to {value} |
104 | Info | LLDP neighbor {chassisid}, added on {interface} |
105 | Info | LLDP neighbor {chassisid}, updated on {interface} |
106 | Info | LLDP neighbor {chassisid}, deleted on {interface} |
107 | Info | Configured LLDP Management IP {value} |
108 | Info | Configured LLDP tx-hold to {hold} |
109 | Info | Configured LLDP tx-delay to {value} |
110 | Info | Configured LLDP reinit-delay to {value} |
111 | Info | LLDP statistics cleared |
112 | Info | LLDP neighbor info cleared |
113 | Info | PVID mismatch on {interface} pvid = {pvid}, Neighbor {chassisid} port_id = {ninterface} pvid = {npvid} |
Severity | Message | Description |
Info | Configured %s=%d | Informs which TLVs are configured |
Info | link state change on interface %s: %s" | Informs the link state change of up or down for an interface |
Info | Configured lldp reinit time [%d]s on interface%s | Informs the configuration of reinit timer on an interface |
Info | No vlan found for vlan id %" PRIu64 " | The vlan is not present in the switch |
Info | Setting pvid %d" | Setting pvid to the interface |
Info | Configured lldp tx-timer [%d] | This message informs the configuration of tx-timer on switch |
Info | Configured lldp tx-hold [%d] | This message informs the configuration of tx-hold on switch |
Info | Configured lldp tx-delay [%d] | This message informs the configuration of tx-delay on switch |
Info | %s aging out interface %s | Age out of a neighbor on an interface |
Info | System is now configured (cur_cfg=%d). | This message indicates that the Switch has been configured with LLDP |
Info_once | %s (OPENSWITCH lldpd) %s | This message notes that the LLDP daemon has started |
Info_once | %s (OPENSWITCH LLDPD Daemon) started | This message informs that the LLDP daemon is now running |
Err | Failed to insert a new CPU_RX row | This message indicates that the reception of LLDP packets might work on the switch |
Err | Memory allocation failed, interface list creation failed. | Memory allocation failed for interface list |
Err | Event log initialization failed | Event logs will not be captured |
Err | Configured lldp mgmt_pattern is not a valid IP addr [%s] | Management IP address is not properly set |
Err | another lldpd process is running, disabling this process until it goes away | Trying to run a new instance of LLDP on the switch |
Err | Unable to delete an lldp interface %s that has no entry in hash | Unknown interface is being recognized by the daemon |
Err | Error allocating %s | Memory allocation error |
Err | not able to fetch interface row | Database access error |
Submodule | Severity | Message | Description |
Config | debug | interfaces: initialize Ethernet device %s | This message informs you of the start of the initialization of an Ethernet device |
Config | debug | interfaces: interface %s initialized (fd=%d) | This message informs that the initialization of the Ethernet is complete |
Config | debug | interfaces: send PDU to Ethernet device %s (fd=%d) | This message informs the initiation of sending of an LLDP PDU on an Ethernet device |
Config | debug | interfaces: receive PDU from Ethernet device %s | This message informs the initiation of receiving of an LLDP PDU from an Ethernet device |
Config | debug | interfaces: close Ethernet device %s | This message informs the closure of the Ethernet device |
Config | debug | interfaces: unable to find VID for VLAN %s | Unable to find the VID for the VLAN |
Config | debug | interfaces: get MAC address for %s | This message informs the action of retrieving the MAC address for an interface |
Config | debug | interfaces: ask ethtool for the appropriate MAC/PHY for %s | Checks the MAC/PHY for an interface |
Config | debug | interfaces: initialize bonded device %s | This message informs the start of the initialization of a bonded device |
Config | debug | interfaces: bonded device %s has master %s(%d) | This message informs the initialization of the bonded device is complete |
Config | debug | interfaces: interface %s initialized (fd=%d,master=%s[%d]) | This message informs that the initialization of the bonded interface is complete |
Config | debug | interfaces: receive PDU from bonded device %s | This message informs the initiation of receiving of an LLDP PDU from a bonded device |
Config | debug | interfaces: closing bonded device %s | This message informs the closure of the bonded device |
Config | debug | interfaces: %s is an acceptable bonded device (master=%s) | This message informs if the bonded device is acceptable to LLDP daemon or not |
Config | debug | interfaces: unable to initialize %s | This message informs that the initialization of the interface is unsuccessful |
Config | debug | interfaces: interface %s is a bond | This message informs that the interface found by the daemon is a bonded interface |
Config | debug | interfaces: %s is a physical interface | Daemon has found a physical interface |
Config | debug | interfaces: creating a vrf | This message informs the creation of a new VRF |
Config | debug | interfaces: subscribe to netlink notifications | This message informs that the LLDP daemon is trying to listen on a netlink socket |
Config | debug | interfaces: unable to subscribe to netlink notifications | Daemon was not able to listen on a netlink socket |
Config | debug | interfaces: deleting vrf entry | Deletion of VRF is triggered |
Config | debug | interfaces: closing the vrf netlink fd | Closing the socket fd for the deleted VRF |
Config | debug | interfaces: %s is an acceptable Ethernet device | Daemon has found an Ethernet device |
Config | debug | Configured %s=%d | Informs which TLVs are configured |
Config | error | Failed to insert a new CPU_RX row" | This message indicates that the reception of LLDP packets might work on the switch |
Config | debug | Interface %s being added! | This message informs the addition of a new interface |
Config | debug | Configured lldp reinit time [%d]s on interface%s | This message informs the configuration of reinit timer on switch |
Config | error | Configured lldp mgmt_pattern is not a valid IP addr [%s] | This message informs whether the management address is properly configured |
Config | debug | Configured lldp tx-timer [%d] | This message informs the configuration of tx-timer on switch |
Config | debug | Configured lldp tx-hold [%d] | This message informs the configuration of tx-hold on switch |
Config | debug | System is now configured (cur_cfg=%d). | This message indicates that the Switch has been configured with LLDP |
event | debug | entered sync_lldp_counters_from_db for %s | This message indicates that the synchronization of counters from the DB is taking place |
event | debug | lldpd_stats_run entered at time %" PRIu64 | This message informs that the LLDP statistics are getting accumulated from different data structure |
event | debug | i/f %s DEL | Deletion of a neighbor on an interface |
event | debug | lldpd hardware interface %s being added! | This message informs the addition of a new interface in the LLDP daemon |
state | debug | lldp status change on interface %s: %s | This message indicated the interface status change |
state | info | lldp %s | This message notes if the LLDP daemon is enabled or disabled |
state | debug | could not check stats for %s (hardware %s, dbrow %s) | This message indicates that the LLDP statistics are not able to be checked on an interface |
state | debug | %s time stamps: cur=%0llx last_update=%llx port_ttl=%d (sec) | This message displays the current time, last update time and TTL for a neighbor |
state | debug | mgmt entry family= %d ip= %x if= %d | This message prints the management IP address family and value |