1 # VPP Link Layer Discovery Protocol (LLDP) implementation {#lldp_doc}
3 This is a memo intended to contain documentation of the VPP LLDP implementation
4 Everything that is not directly obvious should come here.
8 LLDP is a link layer protocol to advertise the capabilities and current status of the system.
10 There are 2 nodes handling LLDP
12 1.) input-node which processes incoming packets and updates the local database
13 2.) process-node which is responsible for sending out LLDP packets from VPP side
18 LLDP has a global configuration and a per-interface enable setting.
20 Global configuration is modified using the "set lldp" command
22 set lldp [system-name <string>] [tx-hold <value>] [tx-interval <value>]
24 system-name: the name of the VPP system sent to peers in the system-name TLV
25 tx-hold: multiplier for tx-interval when setting time-to-live (TTL) value in the LLDP packets (TTL = tx-hold * tx-interval + 1, if TTL > 65535, then TTL = 65535)
26 tx-interval: time interval between sending out LLDP packets
28 Per interface setting is done using the "set interface lldp" command
30 set interface lldp <interface> | if_index <idx> [port-desc <string>] [disable]
32 interface: the name of the interface for which to enable/disable LLDP
33 if_index: sw interface index can be used if interface name is not used.
34 port-desc: port description
35 disable: LLDP feature can be enabled or disabled per interface.
37 ### Configuration example
39 Configure system-name as "VPP" and transmit interval to 10 seconds:
41 set lldp system-name VPP tx-interval 10
43 Enable LLDP on interface TenGigabitEthernet5/0/1 with port description
45 set interface lldp TenGigabitEthernet5/0/1 port-desc vtf:eth0
50 The list of LLDP-enabled interfaces which are up can be shown using "show lldp" command
54 Local interface Peer chassis ID Remote port ID Last heard Last sent Status
55 GigabitEthernet2/0/1 never 27.0s ago inactive
56 TenGigabitEthernet5/0/1 8c:60:4f:dd:ca:52 Eth1/3/3 20.1s ago 18.3s ago active
58 All LLDP configuration data with all LLDP-enabled interfaces can be shown using "show lldp detail" command
61 DBGvpp# show lldp detail
63 Configured system name: vpp
65 Configured tx-interval: 30
67 LLDP-enabled interface table:
69 Interface name: GigabitEthernet2/0/1
70 Interface/peer state: inactive(timeout)
71 Last known peer chassis ID:
72 Last known peer port ID:
73 Last packet sent: 12.4s ago
74 Last packet received: never
76 Interface name: GigabitEthernet2/0/2
77 Interface/peer state: interface down
78 Last packet sent: never
80 Interface name: TenGigabitEthernet5/0/1
81 Interface/peer state: active
82 Peer chassis ID: 8c:60:4f:dd:ca:52(MAC address)
83 Remote port ID: Eth1/3/3(Locally assigned)
84 Last packet sent: 3.6s ago
85 Last packet received: 5.5s ago