LLDP
LLDP is a vendor-neutral Layer 2 protocol that enables devices to advertise their identity, capabilities, and management addresses to directly connected neighbors and to learn the same information from them. LLDP is specified in IEEE 802.1AB, Station and Media Access Control Connectivity Discovery.
Each device sends LLDP frames periodically on every interface where
LLDP transmission is enabled and records the received information in a
local neighbor database. This database can also be queried with
SNMP (see set service lldp snmp), so the topology of an entire LLDP-enabled network can be
mapped by querying each device in turn. Advertised information may
include:
System name and description
Port name and description
VLAN name
Management IP address
System capabilities (the device’s role: router, bridge, telephone, and so on)
Physical link settings, such as speed, duplex, and auto-negotiation (MAC/PHY)
Power over Ethernet (MDI power)
Link aggregation (bonding)
LLDP provides functionality similar to proprietary protocols such as
CDP,
EDP,
FDP, and
SONMP. You can
configure VyOS to interoperate with devices running these protocols
via set service lldp legacy-protocols.
Configuration
Enable the LLDP service.
With no further configuration, the service sends and processes LLDP frames on every available local interface.
Configure service lldp interface to restrict it to selected
interfaces.
Example:
set service lldp
Enable LLDP on the specified interface.
Repeat the command to enable LLDP on multiple interfaces. The special
value all enables LLDP on every available local interface.
Once LLDP is enabled with set service lldp, it runs on all available
local interfaces by default. Configuring one or more interfaces here
limits LLDP strictly to those configured, disabling LLDP on all
remaining interfaces.
Example:
set service lldp interface eth1
set service lldp interface eth2
Configure the LLDP administrative status on the specified interface:
rx-tx: Sends LLDP frames and processes received ones.rx: Processes only received frames, so the router learns about its neighbors without announcing itself.tx: Sends frames only.disable: Neither sends nor processes frames on the interface.
The default is rx-tx.
Example:
set service lldp interface eth1 mode rx
Configure the latitude of the coordinate-based LLDP-MED location advertised on the specified interface.
The value is a decimal number followed by N or S. Both latitude and longitude must be configured.
Example:
set service lldp interface eth1 location coordinate-based latitude 37.524449N
Configure the longitude of the coordinate-based LLDP-MED location advertised on the specified interface.
The value is a decimal number followed by E or W. Both latitude and longitude must be configured.
Example:
set service lldp interface eth1 location coordinate-based longitude 122.267255W
Configure the altitude, in meters, of the coordinate-based LLDP-MED location advertised on the specified interface.
The value is a positive or negative number of meters, where 0 means no altitude. Altitude is part of the coordinate-based location, so latitude and longitude must also be configured for it to be advertised.
The default is 0.
Example:
set service lldp interface eth1 location coordinate-based altitude 12
Configure the geodetic datum of the coordinate-based LLDP-MED location advertised on the specified interface:
WGS84andNAD83select the corresponding geodetic datum.MLLWselects NAD83 combined with the MLLW tidal datum, used where altitude is referenced to tidal water level.
The default is WGS84.
Example:
set service lldp interface eth1 location coordinate-based datum NAD83
Advertise an Emergency Call Service ELIN on the specified interface.
The value is 10 to 25 digits.
Example:
set service lldp interface eth1 location elin 1234567890
Advertise the specified IPv4 or IPv6 address to LLDP neighbors as a management address.
Repeat the command to advertise multiple addresses. VyOS generates a warning upon commit if the address is a loopback address or is not assigned to any interface.
Example:
set service lldp management-address 192.0.2.1
set service lldp management-address 2001:db8::1
Allow the LLDP database to be queried over SNMP.
Requires a configured SNMP service (see SNMP). Otherwise, the commit fails.
Example:
set service lldp snmp
Enable the LLDP service to process the specified vendor-proprietary discovery protocol:
cdp: Cisco routers and switches.edp: Extreme routers and switches.fdp: Foundry routers and switches.sonmp: Nortel routers and switches.
After receiving a frame of an enabled protocol on an interface, VyOS also transmits that protocol on the interface.
Repeat the command to enable processing of multiple protocols.
Example:
set service lldp legacy-protocols cdp
Operation
Show detailed information about neighbors discovered on the specified interface.