dpdk: Add support for Mellanox ConnectX-4 devices
[vpp.git] / vnet / vnet / lldp / lldp_doc.md
1 # VPP Link Layer Discovery Protocol (LLDP) implementation    {#lldp_doc}
2
3 This is a memo intended to contain documentation of the VPP LLDP implementation
4 Everything that is not directly obvious should come here.
5
6
7 ## LLDP
8 LLDP is a link layer protocol to advertise the capabilities and current status of the system.
9
10 There are 2 nodes handling LLDP
11
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
14
15
16 ### Configuration
17
18 LLDP has a global configuration and a per-interface enable setting.
19
20 Global configuration is modified using the "set lldp" command
21
22 set lldp [system-name <string>] [tx-hold <value>] [tx-interval <value>]
23
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
27
28 Per interface setting is done using the "set interface lldp" command
29
30 set interface lldp <interface> (enable | disable)
31
32 interface: the name of the interface for which to enable/disable LLDP
33
34
35 ### Configuration example
36
37 Configure system-name as "VPP" and transmit interval to 10 seconds:
38
39 set lldp system-name VPP tx-interval 10
40
41 Enable LLDP on interface TenGigabitEthernet5/0/1
42
43 set interface lldp TenGigabitEthernet5/0/1 enable
44
45
46 ### Operational data
47
48 The list of LLDP-enabled interfaces which are up can be shown using "show lldp" command
49
50 Example:
51 DBGvpp# show lldp
52 Local interface           Peer chassis ID           Remote port ID               Last heard      Last sent      Status
53 GigabitEthernet2/0/1                                                               never         27.0s ago     inactive
54 TenGigabitEthernet5/0/1   8c:60:4f:dd:ca:52         Eth1/3/3                     20.1s ago       18.3s ago      active
55
56 All LLDP configuration data with all LLDP-enabled interfaces can be shown using "show lldp detail" command
57
58 Example:
59 DBGvpp# show lldp detail
60 LLDP configuration:
61 Configured system name: vpp
62 Configured tx-hold: 4
63 Configured tx-interval: 30
64
65 LLDP-enabled interface table:
66
67 Interface name: GigabitEthernet2/0/1
68 Interface/peer state: inactive(timeout)
69 Last known peer chassis ID:
70 Last known peer port ID:
71 Last packet sent: 12.4s ago
72 Last packet received: never
73
74 Interface name: GigabitEthernet2/0/2
75 Interface/peer state: interface down
76 Last packet sent: never
77
78 Interface name: TenGigabitEthernet5/0/1
79 Interface/peer state: active
80 Peer chassis ID: 8c:60:4f:dd:ca:52(MAC address)
81 Remote port ID: Eth1/3/3(Locally assigned)
82 Last packet sent: 3.6s ago
83 Last packet received: 5.5s ago
84