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
|
.\" $OpenBSD: ldpd.conf.5,v 1.18 2015/07/21 04:52:29 renato Exp $
.\"
.\" Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
.\" Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org>
.\" Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
.\" Copyright (c) 2002 Daniel Hartmeier <dhartmei@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: July 21 2015 $
.Dt LDPD.CONF 5
.Os
.Sh NAME
.Nm ldpd.conf
.Nd Label Distribution Protocol daemon configuration file
.Sh DESCRIPTION
The
.Xr ldpd 8
daemon implements the Label Distribution Protocol as described in RFC 5036.
.Sh SECTIONS
The
.Nm
config file is divided into six main sections.
.Bl -tag -width xxxx
.It Sy Macros
User-defined variables may be defined and used later, simplifying the
configuration file.
.It Sy Global Configuration
Global settings for
.Xr ldpd 8 .
.It Sy Interfaces Configuration
Interface-specific parameters.
.It Sy Targeted Neighbors Configuration
Targeted neighbor specific parameters.
.It Sy Neighbors Configuration
Neighbor-specific parameters.
.It Sy Layer 2 VPNs Configuration
Layer 2 VPNs parameters as per RFC 4447.
.El
.Sh MACROS
Much like
.Xr cpp 1
or
.Xr m4 1 ,
macros can be defined that will later be expanded in context.
Macro names must start with a letter, digit, or underscore,
and may contain any of those characters.
Macro names may not be reserved words (for example,
.Ic cost ) .
Macros are not expanded inside quotes.
.Pp
For example:
.Bd -literal -offset indent
hi="2"
interface em0 {
cost $hi
}
.Ed
.Sh GLOBAL CONFIGURATION
All interface related settings can be configured globally and per interface.
The only settings that can be set globally and not overruled are listed below.
.Pp
.Bl -tag -width Ds -compact
.It Xo
.Ic fib-update
.Pq Ic yes Ns | Ns Ic no
.Xc
If set to
.Ic no ,
do not update the Label Forwarding Information Base, a.k.a. the kernel routing
table.
The default is
.Ic yes .
.Pp
.It Ic router-id Ar address
Set the router ID; in combination with labelspace it forms the LSR-ID.
.Pp
.It Ic keepalive Ar seconds
Set the keepalive timeout in seconds.
The default value is 180; valid range is 1\-65535.
.Pp
.It Xo
.Ic targeted-hello-accept
.Pq Ic yes Ns | Ns Ic no
.Xc
If set to
.Ic yes ,
allow LDP sessions to be established with remote neighbors that have not been
specifically configured.
The default is
.Ic no .
.El
.Sh INTERFACES
Each interface can have several parameters configured individually, otherwise
they are inherited.
.Bd -literal -offset indent
interface em0 {
}
.Ed
.Pp
Interface-specific parameters are listed below.
.Bl -tag -width Ds
.It Ic link-hello-holdtime Ar seconds
Set the hello holdtime in seconds.
The maximum time
.Xr ldpd 8
will wait between two consecutive hello messages from a peer before it is
marked as being down.
The default value is 15.
.It Ic link-hello-interval Ar seconds
Set the hello interval in seconds.
The default value is 5; valid range is 1\-65535.
.El
.Sh TARGETED NEIGHBORS
Each targeted neighbor can have several parameters configured individually,
otherwise they are inherited.
.Bd -literal -offset indent
targeted-neighbor A.B.C.D {
}
.Ed
.Pp
Targeted-neighbor specific parameters are listed below.
.Bl -tag -width Ds
.It Ic targeted-hello-holdtime Ar seconds
Set the hello holdtime in seconds.
The maximum time
.Xr ldpd 8
will wait between two consecutive hello messages from a peer before it is
marked as being down.
The default value is 45.
.It Ic targeted-hello-interval Ar seconds
Set the hello interval in seconds.
The default value is 5; valid range is 1\-65535.
.El
.Sh NEIGHBORS
The
.Ic neighbor
section allows for the configuration of neighbor-specific parameters.
Note, however, that
.Xr ldpd 8
uses the hello discovery mechanism to discover its neighbors.
Without an underlying adjacency these commands have no effect.
.Bd -literal -offset indent
neighbor A.B.C.D {
}
.Ed
.Pp
Neighbor-specific parameters are listed below.
.Bl -tag -width Ds
.It Ic password Ar secret
Enable TCP MD5 signatures per RFC 5036.
.El
.Sh LAYER 2 VPNS
.Xr ldpd 8
implements the signaling of pseudowires which can be used to
implement either the VPWS solution (also known as PWE3) or the VPLS
solution. Currently only the VPLS solution is supported.
.Bd -literal -offset indent
l2vpn name type vpls {
bridge bridge0
interface em1
pseudowire mpw1 {
pw-id 100
neighbor 192.168.1.10
}
pseudowire mpw2 {
pw-id 200
neighbor 10.0.1.5
}
}
.Ed
.Pp
Layer 2 VPN specific parameters are listed below.
.Bl -tag -width Ds
.It Xo
.Ic type
.Pq Ic ethernet Ns | Ns Ic ethernet-tagged
.Xc
Specify the type of the configured pseudowires. The type must be the
same at both endpoints. The default is
.Ic ethernet .
.Pp
.It Ic mtu Ar number
Set the MTU advertised in the pseudowires. Local and remote MTUs must
match for a pseudowire to be set up. The default value is 1500.
.Pp
.It Ic bridge Ar interface
Set the bridge interface the VPLS is associated with. This parameter
is optional and is only used to remove MAC addresses received from MAC
address withdrawal messages. Only one bridge interface can be set.
.Pp
.It Ic interface Ar interface
Configure a non pseudowire interface pertaining to the VPLS. This
parameter is optional and is only used to send MAC address withdrawal
messages when the specified interface is shutdown. Multiple interfaces
can be configured.
.Sh PSEUDOWIRES
Each
.Xr mpw 4
pseudowire interface can have several parameters configured individually,
otherwise they are inherited. A pseudowire interface is specified by
its name.
.Bd -literal -offset indent
pseudowire mpw5 {
pw-id 5000
neighbor 172.16.1.50
}
.Ed
.Pp
Pseudowire-specific parameters are listed below.
.Bl -tag -width Ds
.Pp
.It Ic neighbor Ar address
Specify the endpoint of the pseudowire on the remote PE router. A targeted
neighbor will automatically be created for this address.
.Pp
.It Ic pw-id Ar number
Set the PW ID used to identify the pseudowire. The PW ID must be the
same at both endpoints. Valid range is 1\-4294967295.
.It Xo
.Ic status-tlv
.Pq Ic yes Ns | Ns Ic no
.Xc
Specify whether the use of the Status TLV is preferred or not
preferred. The default is
.Ic yes .
.It Xo
.Ic control-word
.Pq Ic yes Ns | Ns Ic no
.Xc
Specify whether the use of the control word is preferred or not
preferred. The default is
.Ic yes .
.Sh FILES
.Bl -tag -width "/etc/ldpd.conf" -compact
.It Pa /etc/ldpd.conf
.Xr ldpd 8
configuration file
.El
.Sh SEE ALSO
.Xr ldpctl 8 ,
.Xr ldpd 8 ,
.Xr rc.conf.local 8
.Sh HISTORY
The
.Nm
file format first appeared in
.Ox 4.6 .
|