]> git.proxmox.com Git - mirror_frr.git/blame - doc/user/ldpd.rst
doc: add ldp information over transport connection
[mirror_frr.git] / doc / user / ldpd.rst
CommitLineData
4535bb2c
PG
1.. _ldp:
2
3***
4LDP
5***
6
7The *ldpd* daemon is a standardised protocol that permits exchanging MPLS label
8information between MPLS devices. The LDP protocol creates peering between
9devices, so as to exchange that label information. This information is stored in
10MPLS table of *zebra*, and it injects that MPLS information in the underlying
11system (Linux kernel or OpenBSD system for instance).
12*ldpd* provides necessary options to create a Layer 2 VPN across MPLS network.
13For instance, it is possible to interconnect several sites that share the same
14broadcast domain.
15
16FRR implements LDP as described in :rfc:`5036`; other LDP standard are the
17following ones: :rfc:`6720`, :rfc:`6667`, :rfc:`5919`, :rfc:`5561`, :rfc:`7552`,
18:rfc:`4447`.
19Because MPLS is already available, FRR also supports :rfc:`3031`.
20
21Running Ldpd
22============
23
24The *ldpd* daemon can be invoked with any of the common
25options (:ref:`common-invocation-options`).
26
27The *zebra* daemon must be running before *ldpd* is invoked.
28
29Configuration of *ldpd* is done in its configuration file
30:file:`ldpd.conf`.
31
32
33.. _understanding-ldp:
34
35Understanding LDP principles
36============================
37
38Let's first introduce some definitions that permit understand better the LDP
39protocol:
40
41- `LSR` : Labeled Switch Router. Networking devices handling labels used to
42 forward traffic between and through them.
43
44- `LER` : Labeled Edge Router. A Labeled edge router is located at the edge of
45 an MPLS network, generally between an IP network and an MPLS network.
46
47
48``LDP`` aims at sharing label information across devices. It tries to establish
49peering with remote LDP capable devices, first by discovering using UDP port 646
50, then by peering using TCP port 646. Once the TCP session is established, the
51label information is shared, through label advertisements.
52
53There are different methods to send label advertisement modes. The
54implementation actually supports the following : Liberal Label Retention +
55Downstream Unsolicited + Independent Control.
56The other advertising modes are depicted below, and compared with the current
57implementation.
58
59- Liberal label retention versus conservative mode
60 In liberal mode, every label sent by every LSR is stored in the MPLS table.
61 In conservative mode, only the label that was sent by the best next hop
62 (determined by the IGP metric) for that particular FEC is stored in the MPLS
63 table.
64
65- Independent LSP Control versus ordered LSP Control
66 MPLS has two ways of binding labels to FEC’s; either through ordered LSP
67 control, or independent LSP control.
68 Ordered LSP control only binds a label to a FEC if it is the egress LSR, or
69 the router received a label binding for a FEC from the next hop router. In
70 this mode, an MPLS router will create a label binding for each FEC and
71 distribute it to its neighbors so long as he has a entry in the RIB for the
72 destination.
73 In the other mode, label bindings are made without any dependencies on another
74 router advertising a label for a particular FEC. Each router makes it own
75 independent decision to create a label for each FEC.
76 By default IOS uses Independent LSP Control, while Juniper implements the
77 Ordered Control. Both modes are interoperable, the difference is that Ordered
78 Control prevent blackholing during the LDP convergence process, at cost of
79 slowing down the convergence itself
80
81- unsolicited downstream versus downstream on demand
82 Downstream on demand label distribution is where an LSR must explicitly
83 request that a label be sent from its downstream router for a particular FEC.
84 Unsolicited label distribution is where a label is sent from the downstream
85 router without the original router requesting it.
86
87.. _configuring-ldpd:
88
89.. _ldp-configuration:
90
91LDP Configuration
92===================
93
94.. index:: [no] mpls ldp
95.. clicmd:: [no] mpls ldp
96
97 Enable or disable LDP daemon
98
99.. index:: [no] router-id A.B.C.D
100.. clicmd:: [no] router-id A.B.C.D
101
102 The following command located under MPLS router node configures the MPLS
103 router-id of the local device.
104
105.. index:: [no] address-family [ipv4 | ipv6]
106.. clicmd:: [no] address-family [ipv4 | ipv6]
107
108 Configure LDP for IPv4 or IPv6 address-family. Located under MPLS route node,
109 this subnode permits configuring the LDP neighbors.
110
111.. index:: [no] interface IFACE
112.. clicmd:: [no] interface IFACE
113
114 Located under MPLS address-family node, use this command to enable or disable
115 LDP discovery per interface. IFACE stands for the interface name where LDP is
116 enabled. By default it is disabled. Once this command executed, the
117 address-family interface node is configured.
118
119.. index:: [no] discovery transport-address A.B.C.D | A:B::C:D
120.. clicmd:: [no] discovery transport-address A.B.C.D | A:B::C:D
121
122 Located under mpls address-family interface node, use this command to set
123 the IPv4 or IPv6 transport-address used by the LDP protocol to talk on this
124 interface.
125
126.. index:: [no] neighbor A.B.C.D password PASSWORD
127.. clicmd:: [no] neighbor A.B.C.D password PASSWORD
128
129 The following command located under MPLS router node configures the router
130 of a LDP device. This device, if found, will have to comply with the
131 configured password. PASSWORD is a clear text password wit its digest sent
132 through the network.
133
134.. index:: [no] neighbor A.B.C.D holdtime HOLDTIME
135.. clicmd:: [no] neighbor A.B.C.D holdtime HOLDTIME
136
137 The following command located under MPLS router node configures the holdtime
138 value in seconds of the LDP neighbor ID. Configuring it triggers a keepalive
139 mechanism. That value can be configured between 15 and 65535 seconds. After
140 this time of non response, the LDP established session will be considered as
141 set to down. By default, no holdtime is configured for the LDP devices.
142
143.. index:: [no] discovery hello holdtime HOLDTIME
144.. clicmd:: [no] discovery hello holdtime HOLDTIME
145
146.. index:: [no] discovery hello interval INTERVAL
147.. clicmd:: [no] discovery hello interval INTERVAL
148
149 INTERVAL value ranges from 1 to 65535 seconds. Default value is 5 seconds.
150 This is the value between each hello timer message sent.
151 HOLDTIME value ranges from 1 to 65535 seconds. Default value is 15 seconds.
152 That value is added as a TLV in the LDP messages.
153
a305be43
PG
154.. index:: [no] dual-stack transport-connection prefer ipv4
155.. clicmd:: [no] dual-stack transport-connection prefer ipv4
156
157 When *ldpd* is configured for dual-stack operation, the transport connection
158 preference is IPv6 by default (as specified by :rfc:`7552`). On such
159 circumstances, *ldpd* will refuse to establish TCP connections over IPv4.
160 You can use above command to change the transport connection preference to
161 IPv4. In this case, it will be possible to distribute label mappings for
162 IPv6 FECs over TCPv4 connections.
163
4535bb2c
PG
164.. _show-ldp-information:
165
166Show LDP Information
167====================
168
169These commands dump various parts of *ldpd*.
170
171.. index:: show mpls ldp neighbor [A.B.C.D]
172.. clicmd:: show mpls ldp neighbor [A.B.C.D]
173
174 This command dumps the various neighbors discovered. Below example shows that
175 local machine has an operation neighbor with ID set to 1.1.1.1.
176
177 ::
178
179 west-vm# show mpls ldp neighbor
180 AF ID State Remote Address Uptime
181 ipv4 1.1.1.1 OPERATIONAL 1.1.1.1 00:01:37
182 west-vm#
183
184.. index:: show mpls ldp neighbor [A.B.C.D] capabilities
185.. clicmd:: show mpls ldp neighbor [A.B.C.D] capabilities
186
187.. index:: show mpls ldp neighbor [A.B.C.D] detail
188.. clicmd:: show mpls ldp neighbor [A.B.C.D] detail
189
190 Above commands dump other neighbor information.
191
192.. index:: show mpls ldp discovery [detail]
193.. clicmd:: show mpls ldp discovery [detail]
194
195.. index:: show mpls ldp ipv4 discovery [detail]
196.. clicmd:: show mpls ldp ipv4 discovery [detail]
197
198.. index:: show mpls ldp ipv6 discovery [detail]
199.. clicmd:: show mpls ldp ipv6 discovery [detail]
200
201 Above commands dump discovery information.
202
203.. index:: show mpls ldp ipv4 interface
204.. clicmd:: show mpls ldp ipv4 interface
205
206.. index:: show mpls ldp ipv6 interface
207.. clicmd:: show mpls ldp ipv6 interface
208
209 Above command dumps the IPv4 or IPv6 interface per where LDP is enabled.
210 Below output illustrates what is dumped for IPv4.
211
212 ::
213
214 west-vm# show mpls ldp ipv4 interface
215 AF Interface State Uptime Hello Timers ac
216 ipv4 eth1 ACTIVE 00:08:35 5/15 0
217 ipv4 eth3 ACTIVE 00:08:35 5/15 1
218
219
220.. index:: show mpls ldp ipv4|ipv6 binding
221.. clicmd:: show mpls ldp ipv4|ipv6 binding
222
223 Above command dumps the binding obtained through MPLS exchanges with LDP.
224
225 ::
226
227 west-vm# show mpls ldp ipv4 binding
228 AF Destination Nexthop Local Label Remote Label In Use
229 ipv4 1.1.1.1/32 1.1.1.1 16 imp-null yes
230 ipv4 2.2.2.2/32 1.1.1.1 imp-null 16 no
231 ipv4 10.0.2.0/24 1.1.1.1 imp-null imp-null no
232 ipv4 10.115.0.0/24 1.1.1.1 imp-null 17 no
233 ipv4 10.135.0.0/24 1.1.1.1 imp-null imp-null no
234 ipv4 10.200.0.0/24 1.1.1.1 17 imp-null yes
235 west-vm#
236
237LDP debugging commands
238========================
239
240.. index::
241 simple: debug mpls ldp KIND
242 simple: no debug mpls ldp KIND
243
244.. clicmd:: [no] debug mpls ldp KIND
245
246 Enable or disable debugging messages of a given kind. ``KIND`` can
247 be one of:
248
249 - ``discovery``
250 - ``errors``
251 - ``event``
252 - ``labels``
253 - ``messages``
254 - ``zebra``
255
256LDP Example Configuration
257=========================
258
259Below configuration gives a typical MPLS configuration of a device located in a
260MPLS backbone. LDP is enabled on two interfaces and will attempt to peer with
261two neighbors with router-id set to either 1.1.1.1 or 3.3.3.3.
262
263.. code-block:: frr
264
265 mpls ldp
266 router-id 2.2.2.2
267 neighbor 1.1.1.1 password test
268 neighbor 3.3.3.3 password test
269 !
270 address-family ipv4
271 discovery transport-address 2.2.2.2
272 !
273 interface eth1
274 !
275 interface eth3
276 !
277 exit-address-family
278 !
279
280
281Deploying LDP across a backbone generally is done in a full mesh configuration
282topology. LDP is typically deployed with an IGP like OSPF, that helps discover
283the remote IPs. Below example is an OSPF configuration extract that goes with
284LDP configuration
285
286.. code-block:: frr
287
288 router ospf
289 ospf router-id 2.2.2.2
290 network 0.0.0.0/0 area 0
291 !
292
293
294Below output shows the routing entry on the LER side. The OSPF routing entry
295(10.200.0.0) is associated with Label entry (17), and shows that MPLS push action
296that traffic to that destination will be applied.
297
298::
299
300 north-vm# show ip route
301 Codes: K - kernel route, C - connected, S - static, R - RIP,
302 O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
303 T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
304 F - PBR,
305 > - selected route, * - FIB route
306
307 O>* 1.1.1.1/32 [110/120] via 10.115.0.1, eth2, label 16, 00:00:15
308 O>* 2.2.2.2/32 [110/20] via 10.115.0.1, eth2, label implicit-null, 00:00:15
309 O 3.3.3.3/32 [110/10] via 0.0.0.0, loopback1 onlink, 00:01:19
310 C>* 3.3.3.3/32 is directly connected, loopback1, 00:01:29
311 O>* 10.0.2.0/24 [110/11] via 10.115.0.1, eth2, label implicit-null, 00:00:15
312 O 10.100.0.0/24 [110/10] is directly connected, eth1, 00:00:32
313 C>* 10.100.0.0/24 is directly connected, eth1, 00:00:32
314 O 10.115.0.0/24 [110/10] is directly connected, eth2, 00:00:25
315 C>* 10.115.0.0/24 is directly connected, eth2, 00:00:32
316 O>* 10.135.0.0/24 [110/110] via 10.115.0.1, eth2, label implicit-null, 00:00:15
317 O>* 10.200.0.0/24 [110/210] via 10.115.0.1, eth2, label 17, 00:00:15
318 north-vm#
319