lldp: T7165: add support to enable only rx or tx on specific interface

LLDP is a stateless protocol which does not necessitate sending to receive
advertisements. There are multiple scenarios such as provider peering links in
which it is advantageous to receive LLDP but not disclose internal information
to the provider.

Add new CLI command:
* set service lldp interface <name> mode [disable|rx-tx|rx|tx]

The default is unchanged and will be rx-tx.

Furthermore if an interface has an explicit LLDP disable configured under
"set service lldp interface <name> disable" this will be migrated to
"set service lldp interface <name> mode disable"
This commit is contained in:
Christian Breunig 2025-02-24 21:16:03 +01:00
parent d615588b4a
commit 4036e6c907

View File

@ -49,10 +49,16 @@ Configuration
Enable transmission of LLDP information on given `<interface>`. You can also
say ``all`` here so LLDP is turned on on every interface.
.. cfgcmd:: set service lldp interface <interface> disable
.. cfgcmd:: set service lldp interface <interface> mode [disable|rx-tx|rx|tx]
Disable transmit of LLDP frames on given `<interface>`. Useful to exclude
certain interfaces from LLDP when ``all`` have been enabled.
Configure the administrative status of the given port.
By default, all ports are configured to be in rx-tx mode. This means they
can receive and transmit LLDP frames.
In rx mode, they won't emit any frames. In tx mode, they won't receive
any frames. In disabled mode, no frame will be sent and any incoming frame
will be discarded.
.. cfgcmd:: set service lldp snmp