summaryrefslogtreecommitdiff
path: root/docs/configuration/service/lldp.md
blob: c555376ae2e4a8e57a627c6067f534192cfcb424 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
---
myst:
  html_meta:
    description: |
      LLDP is a vendor-neutral Layer 2 protocol that lets devices
      advertise their identity, capabilities, and management addresses
      to directly connected neighbors and learn the same from them.
    keywords: lldp, lldp-med, cdp, edp, fdp, sonmp, neighbor-discovery
---

(lldp)=

# LLDP

{abbr}`LLDP (Link Layer Discovery Protocol)` 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
{abbr}`SNMP (Simple Network Management Protocol)` (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
{abbr}`CDP (Cisco Discovery Protocol)`,
{abbr}`EDP (Extreme Discovery Protocol)`,
{abbr}`FDP (Foundry Discovery Protocol)`, and
{abbr}`SONMP (SynOptics Network Management Protocol)`. You can
configure VyOS to interoperate with devices running these protocols
via `set service lldp legacy-protocols`.

## Configuration

```{cfgcmd} set service lldp

**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:

```none
set service lldp
```

```{cfgcmd} set service lldp interface \<interface\>

**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:

```none
set service lldp interface eth1
set service lldp interface eth2
```

```{cfgcmd} set service lldp interface \<interface\> mode \<disable | rx-tx | tx | rx\>

**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:

```none
set service lldp interface eth1 mode rx
```

```{cfgcmd} set service lldp interface \<interface\> location coordinate-based latitude \<latitude\>

**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:

```none
set service lldp interface eth1 location coordinate-based latitude 37.524449N
```

```{cfgcmd} set service lldp interface \<interface\> location coordinate-based longitude \<longitude\>

**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:

```none
set service lldp interface eth1 location coordinate-based longitude 122.267255W
```

```{cfgcmd} set service lldp interface \<interface\> location coordinate-based altitude \<altitude\>

**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:

```none
set service lldp interface eth1 location coordinate-based altitude 12
```

```{cfgcmd} set service lldp interface \<interface\> location coordinate-based datum \<WGS84 | NAD83 | MLLW\>

**Configure the geodetic datum of the coordinate-based LLDP-MED
location advertised on the specified interface:**

- `WGS84` and `NAD83` select the corresponding geodetic datum.
- `MLLW` selects NAD83 combined with the
  {abbr}`MLLW (Mean Lower Low Water)` tidal datum, used where altitude
  is referenced to tidal water level.

The default is `WGS84`.
```

Example:

```none
set service lldp interface eth1 location coordinate-based datum NAD83
```

```{cfgcmd} set service lldp interface \<interface\> location elin \<number\>

**Advertise an Emergency Call Service
{abbr}`ELIN (Emergency Location Identification Number)` on the
specified interface.**

The value is 10 to 25 digits.
```

Example:

```none
set service lldp interface eth1 location elin 1234567890
```

```{cfgcmd} set service lldp management-address \<address\>

**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:

```none
set service lldp management-address 192.0.2.1
set service lldp management-address 2001:db8::1
```

```{cfgcmd} set service lldp snmp

**Allow the LLDP database to be queried over SNMP.**

Requires a configured SNMP service (see {ref}`snmp`). Otherwise, the
commit fails.
```

Example:

```none
set service lldp snmp
```

```{cfgcmd} set service lldp legacy-protocols \<cdp | edp | fdp | sonmp\>

**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:

```none
set service lldp legacy-protocols cdp
```

## Operation

```{opcmd} show lldp neighbors

**Show all neighbors discovered via LLDP or enabled legacy
protocols.**
```

```{opcmd} show lldp neighbors detail

**Show detailed information about discovered neighbors.**
```

```{opcmd} show lldp neighbors interface \<interface\>

**Show neighbors discovered on the specified interface.**
```

```{opcmd} show lldp neighbors interface \<interface\> detail

**Show detailed information about neighbors discovered on the
specified interface.**
```

```{opcmd} show log lldp

**Show the log of the LLDP service since the last boot.**
```