aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lldp/lldp_doc.rst
blob: a6737985aabab23e710a6409860de7ff7a615cea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
LLDP Protocol
=============

This is a memo intended to contain documentation of the VPP LLDP (Link
Layer Discovery Protocol) implementation Everything that is not directly
obvious should come here.

LLDP
----

LLDP is a link layer protocol to advertise the capabilities and current
status of the system.

There are 2 nodes handling LLDP

1.) input-node which processes incoming packets and updates the local
database 2.) process-node which is responsible for sending out LLDP
packets from VPP side

Configuration
~~~~~~~~~~~~~

LLDP has a global configuration and a per-interface enable setting.

Global configuration is modified using the “set lldp” command

set lldp [system-name ] [tx-hold ] [tx-interval ]

system-name: the name of the VPP system sent to peers in the system-name
TLV 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) tx-interval: time interval between sending out
LLDP packets

Per interface setting is done using the “set interface lldp” command

set interface lldp \| if_index [port-desc ] [disable]

interface: the name of the interface for which to enable/disable LLDP
if_index: sw interface index can be used if interface name is not used.
port-desc: port description disable: LLDP feature can be enabled or
disabled per interface.

Configuration example
~~~~~~~~~~~~~~~~~~~~~

Configure system-name as “VPP” and transmit interval to 10 seconds:

set lldp system-name VPP tx-interval 10

Enable LLDP on interface TenGigabitEthernet5/0/1 with port description

set interface lldp TenGigabitEthernet5/0/1 port-desc vtf:eth0

Operational data
~~~~~~~~~~~~~~~~

The list of LLDP-enabled interfaces which are up can be shown using
“show lldp” command

Example: DBGvpp# show lldp Local interface Peer chassis ID Remote port
ID Last heard Last sent Status GigabitEthernet2/0/1 never 27.0s ago
inactive TenGigabitEthernet5/0/1 8c:60:4f:dd:ca:52 Eth1/3/3 20.1s ago
18.3s ago active

All LLDP configuration data with all LLDP-enabled interfaces can be
shown using “show lldp detail” command

Example: DBGvpp# show lldp detail LLDP configuration: Configured system
name: vpp Configured tx-hold: 4 Configured tx-interval: 30

LLDP-enabled interface table:

Interface name: GigabitEthernet2/0/1 Interface/peer state:
inactive(timeout) Last known peer chassis ID: Last known peer port ID:
Last packet sent: 12.4s ago Last packet received: never

Interface name: GigabitEthernet2/0/2 Interface/peer state: interface
down Last packet sent: never

Interface name: TenGigabitEthernet5/0/1 Interface/peer state: active
Peer chassis ID: 8c:60:4f:dd:ca:52(MAC address) Remote port ID:
Eth1/3/3(Locally assigned) Last packet sent: 3.6s ago Last packet
received: 5.5s ago