Use LLDP on FortiGate

Enabling LLDP reception allows the FortiGate to receive and store LLDP messages, learn about active neighbors, and makes the LLDP information available.

LLDP can be activated globally:

config system global
  set lldp-reception enable
  set lldp-transmission enable
end

Or per interface:

config system interface
  edit <port>
    set lldp-reception enable
    set lldp-transmission enable
  next
end

The following commands do show the neighbors:

diagnose lldprx neighbor {summary | details | clear}

diagnose lldprx port {details | summary | neighbor | filter}

diagnose lldprx port neighbor {summary | details}

Note that the port index in the output corresponds to the port index from the following command:

diagnose netlink interface list port2 port3 | grep index