summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man5/systemd.dnssd.5
blob: 708d02ca70a3bb3050cd45bed05a38cfab3973ad (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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
'\" t
.TH "SYSTEMD\&.DNSSD" "5" "" "systemd 255" "systemd.dnssd"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd.dnssd \- DNS\-SD configuration
.SH "SYNOPSIS"
.PP
\fInetwork_service\fR\&.dnssd
.SH "DESCRIPTION"
.PP
DNS\-SD setup is performed by
\fBsystemd-resolved\fR(8)\&.
.PP
The main network service file must have the extension
\&.dnssd; other extensions are ignored\&.
.PP
The
\&.dnssd
files are read from the files located in the system network directories
/usr/lib/systemd/dnssd
and
/usr/local/lib/systemd/dnssd, the volatile runtime network directory
/run/systemd/dnssd
and the local administration network directory
/etc/systemd/dnssd\&. All configuration files are collectively sorted and processed in lexical order, regardless of the directories in which they live\&. However, files with identical filenames replace each other\&. Files in
/etc/
have the highest priority, files in
/run/
take precedence over files with the same name in
/usr/lib/\&. This can be used to override a system\-supplied configuration file with a local file if needed\&.
.PP
Along with the network service file
foo\&.dnssd, a "drop\-in" directory
foo\&.dnssd\&.d/
may exist\&. All files with the suffix
"\&.conf"
from this directory will be parsed after the file itself is parsed\&. This is useful to alter or add configuration settings, without having to modify the main configuration file\&. Each drop\-in file must have appropriate section headers\&.
.PP
In addition to
/etc/systemd/dnssd, drop\-in
"\&.d"
directories can be placed in
/usr/lib/systemd/dnssd
or
/run/systemd/dnssd
directories\&. Drop\-in files in
/etc/
take precedence over those in
/run/
which in turn take precedence over those in
/usr/lib/
or
/usr/local/lib\&. Drop\-in files under any of these directories take precedence over the main network service file wherever located\&.
.SH "[SERVICE] SECTION OPTIONS"
.PP
The network service file contains a [Service] section, which specifies a discoverable network service announced in a local network with Multicast DNS broadcasts\&.
.PP
\fIName=\fR
.RS 4
An instance name of the network service as defined in the section 4\&.1\&.1 of
\m[blue]\fBRFC 6763\fR\m[]\&\s-2\u[1]\d\s+2, e\&.g\&.
"webserver"\&.
.sp
The option supports simple specifier expansion\&. The following expansions are understood:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&1.\ \&Specifiers available
.TS
allbox tab(:);
lB lB lB.
T{
Specifier
T}:T{
Meaning
T}:T{
Details
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l.
T{
"%a"
T}:T{
Architecture
T}:T{
A short string identifying the architecture of the local system\&. A string such as \fBx86\fR, \fBx86\-64\fR or \fBarm64\fR\&. See the architectures defined for \fIConditionArchitecture=\fR in \fBsystemd.unit\fR(5) for a full list\&.
T}
T{
"%A"
T}:T{
Operating system image version
T}:T{
The operating system image version identifier of the running system, as read from the \fIIMAGE_VERSION=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
T}
T{
"%b"
T}:T{
Boot ID
T}:T{
The boot ID of the running system, formatted as string\&. See \fBrandom\fR(4) for more information\&.
T}
T{
"%B"
T}:T{
Operating system build ID
T}:T{
The operating system build identifier of the running system, as read from the \fIBUILD_ID=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
T}
T{
"%H"
T}:T{
Host name
T}:T{
The hostname of the running system\&.
T}
T{
"%m"
T}:T{
Machine ID
T}:T{
The machine ID of the running system, formatted as string\&. See \fBmachine-id\fR(5) for more information\&.
T}
T{
"%M"
T}:T{
Operating system image identifier
T}:T{
The operating system image identifier of the running system, as read from the \fIIMAGE_ID=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
T}
T{
"%o"
T}:T{
Operating system ID
T}:T{
The operating system identifier of the running system, as read from the \fIID=\fR field of /etc/os\-release\&. See \fBos-release\fR(5) for more information\&.
T}
T{
"%v"
T}:T{
Kernel release
T}:T{
Identical to \fBuname \-r\fR output\&.
T}
T{
"%w"
T}:T{
Operating system version ID
T}:T{
The operating system version identifier of the running system, as read from the \fIVERSION_ID=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
T}
T{
"%W"
T}:T{
Operating system variant ID
T}:T{
The operating system variant identifier of the running system, as read from the \fIVARIANT_ID=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
T}
T{
"%%"
T}:T{
Single percent sign
T}:T{
Use "%%" in place of "%" to specify a single percent sign\&.
T}
.TE
.sp 1
Added in version 236\&.
.RE
.PP
\fIType=\fR
.RS 4
A type of the network service as defined in the section 4\&.1\&.2 of
\m[blue]\fBRFC 6763\fR\m[]\&\s-2\u[1]\d\s+2, e\&.g\&.
"_http\&._tcp"\&.
.sp
Added in version 236\&.
.RE
.PP
\fIPort=\fR
.RS 4
An IP port number of the network service\&.
.sp
Added in version 236\&.
.RE
.PP
\fIPriority=\fR
.RS 4
A priority number set in
\fBSRV\fR
resource records corresponding to the network service\&.
.sp
Added in version 236\&.
.RE
.PP
\fIWeight=\fR
.RS 4
A weight number set in
\fBSRV\fR
resource records corresponding to the network service\&.
.sp
Added in version 236\&.
.RE
.PP
\fITxtText=\fR
.RS 4
A whitespace\-separated list of arbitrary key/value pairs conveying additional information about the named service in the corresponding TXT resource record, e\&.g\&.
"path=/portal/index\&.html"\&. Keys and values can contain C\-style escape sequences which get translated upon reading configuration files\&.
.sp
This option together with
\fITxtData=\fR
may be specified more than once, in which case multiple TXT resource records will be created for the service\&. If the empty string is assigned to this option, the list is reset and all prior assignments will have no effect\&.
.sp
Added in version 236\&.
.RE
.PP
\fITxtData=\fR
.RS 4
A whitespace\-separated list of arbitrary key/value pairs conveying additional information about the named service in the corresponding TXT resource record where values are base64\-encoded string representing any binary data, e\&.g\&.
"data=YW55IGJpbmFyeSBkYXRhCg=="\&. Keys can contain C\-style escape sequences which get translated upon reading configuration files\&.
.sp
This option together with
\fITxtText=\fR
may be specified more than once, in which case multiple TXT resource records will be created for the service\&. If the empty string is assigned to this option, the list is reset and all prior assignments will have no effect\&.
.sp
Added in version 236\&.
.RE
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&HTTP service\fR
.sp
.if n \{\
.RS 4
.\}
.nf
# /etc/systemd/dnssd/http\&.dnssd
[Service]
Name=%H
Type=_http\&._tcp
Port=80
TxtText=path=/stats/index\&.html t=temperature_sensor
.fi
.if n \{\
.RE
.\}
.PP
This makes the http server running on the host discoverable in the local network given MulticastDNS is enabled on the network interface\&.
.PP
Now the utility
"resolvectl"
should be able to resolve the service to the host\*(Aqs name:
.sp
.if n \{\
.RS 4
.\}
.nf
$ resolvectl service meteo\&._http\&._tcp\&.local
meteo\&._http\&._tcp\&.local: meteo\&.local:80 [priority=0, weight=0]
                        169\&.254\&.208\&.106%senp0s21f0u2u4
                        fe80::213:3bff:fe49:8aa%senp0s21f0u2u4
                        path=/stats/index\&.html
                        t=temperature_sensor
                        (meteo/_http\&._tcp/local)

\-\- Information acquired via protocol mDNS/IPv6 in 4\&.0ms\&.
\-\- Data is authenticated: yes
.fi
.if n \{\
.RE
.\}
.PP
"Avahi"
running on a different host in the same local network should see the service as well:
.sp
.if n \{\
.RS 4
.\}
.nf
$ avahi\-browse \-a \-r
+ enp3s0 IPv6 meteo                                         Web Site             local
+ enp3s0 IPv4 meteo                                         Web Site             local
= enp3s0 IPv6 meteo                                         Web Site             local
   hostname = [meteo\&.local]
   address = [fe80::213:3bff:fe49:8aa]
   port = [80]
   txt = ["path=/stats/index\&.html" "t=temperature_sensor"]
= enp3s0 IPv4 meteo                                         Web Site             local
   hostname = [meteo\&.local]
   address = [169\&.254\&.208\&.106]
   port = [80]
   txt = ["path=/stats/index\&.html" "t=temperature_sensor"]
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemd-resolved.service\fR(8),
\fBresolvectl\fR(1)
.SH "NOTES"
.IP " 1." 4
RFC 6763
.RS 4
\%https://tools.ietf.org/html/rfc6763
.RE