| 1 |
'\" t |
| 2 |
.TH "SYSTEMD\&.DNSSD" "5" "" "systemd 261~rc3" "systemd.dnssd" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
systemd.dnssd \- DNS\-SD configuration |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.PP |
| 26 |
\fInetwork_service\fR\&.dnssd |
| 27 |
.SH "DESCRIPTION" |
| 28 |
.PP |
| 29 |
DNS\-SD setup is performed by |
| 30 |
\fBsystemd-resolved\fR(8)\&. |
| 31 |
.PP |
| 32 |
The main network service file must have the extension |
| 33 |
\&.dnssd; other extensions are ignored\&. |
| 34 |
.PP |
| 35 |
The |
| 36 |
\&.dnssd |
| 37 |
files are read from the files located in the system network directories |
| 38 |
/usr/lib/systemd/dnssd |
| 39 |
and |
| 40 |
/usr/local/lib/systemd/dnssd, the volatile runtime network directory |
| 41 |
/run/systemd/dnssd |
| 42 |
and the local administration network directory |
| 43 |
/etc/systemd/dnssd\&. All configuration files are collectively sorted and processed in lexicographic order, regardless of the directories in which they live\&. However, files with identical filenames replace each other\&. Files in |
| 44 |
/etc/ |
| 45 |
have the highest priority, files in |
| 46 |
/run/ |
| 47 |
take precedence over files with the same name in |
| 48 |
/usr/lib/\&. This can be used to override a system\-supplied configuration file with a local file if needed\&. |
| 49 |
.PP |
| 50 |
Along with the network service file |
| 51 |
foo\&.dnssd, a "drop\-in" directory |
| 52 |
foo\&.dnssd\&.d/ |
| 53 |
may exist\&. All files with the suffix |
| 54 |
"\&.conf" |
| 55 |
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\&. |
| 56 |
.PP |
| 57 |
In addition to |
| 58 |
/etc/systemd/dnssd, drop\-in |
| 59 |
"\&.d" |
| 60 |
directories can be placed in |
| 61 |
/usr/lib/systemd/dnssd |
| 62 |
or |
| 63 |
/run/systemd/dnssd |
| 64 |
directories\&. Drop\-in files in |
| 65 |
/etc/ |
| 66 |
take precedence over those in |
| 67 |
/run/ |
| 68 |
which in turn take precedence over those in |
| 69 |
/usr/lib/ |
| 70 |
or |
| 71 |
/usr/local/lib\&. Drop\-in files under any of these directories take precedence over the main network service file wherever located\&. |
| 72 |
.SH "[SERVICE] SECTION OPTIONS" |
| 73 |
.PP |
| 74 |
The network service file contains a [Service] section, which specifies a discoverable network service announced in a local network with Multicast DNS broadcasts\&. |
| 75 |
.PP |
| 76 |
\fIName=\fR |
| 77 |
.RS 4 |
| 78 |
An instance name of the network service as defined in the section 4\&.1\&.1 of |
| 79 |
\m[blue]\fBRFC 6763\fR\m[]\&\s-2\u[1]\d\s+2, e\&.g\&. |
| 80 |
"webserver"\&. |
| 81 |
.sp |
| 82 |
The option supports simple specifier expansion\&. The following expansions are understood: |
| 83 |
.sp |
| 84 |
.it 1 an-trap |
| 85 |
.nr an-no-space-flag 1 |
| 86 |
.nr an-break-flag 1 |
| 87 |
.br |
| 88 |
.B Table\ \&1.\ \&Specifiers available |
| 89 |
.TS |
| 90 |
allbox tab(:); |
| 91 |
lB lB lB. |
| 92 |
T{ |
| 93 |
Specifier |
| 94 |
T}:T{ |
| 95 |
Meaning |
| 96 |
T}:T{ |
| 97 |
Details |
| 98 |
T} |
| 99 |
.T& |
| 100 |
l l l |
| 101 |
l l l |
| 102 |
l l l |
| 103 |
l l l |
| 104 |
l l l |
| 105 |
l l l |
| 106 |
l l l |
| 107 |
l l l |
| 108 |
l l l |
| 109 |
l l l |
| 110 |
l l l |
| 111 |
l l l. |
| 112 |
T{ |
| 113 |
"%a" |
| 114 |
T}:T{ |
| 115 |
Architecture |
| 116 |
T}:T{ |
| 117 |
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\&. |
| 118 |
T} |
| 119 |
T{ |
| 120 |
"%A" |
| 121 |
T}:T{ |
| 122 |
Operating system image version |
| 123 |
T}:T{ |
| 124 |
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\&. |
| 125 |
T} |
| 126 |
T{ |
| 127 |
"%b" |
| 128 |
T}:T{ |
| 129 |
Boot ID |
| 130 |
T}:T{ |
| 131 |
The boot ID of the running system, formatted as string\&. See \fBrandom\fR(4) for more information\&. |
| 132 |
T} |
| 133 |
T{ |
| 134 |
"%B" |
| 135 |
T}:T{ |
| 136 |
Operating system build ID |
| 137 |
T}:T{ |
| 138 |
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\&. |
| 139 |
T} |
| 140 |
T{ |
| 141 |
"%H" |
| 142 |
T}:T{ |
| 143 |
Host name |
| 144 |
T}:T{ |
| 145 |
The hostname of the running system\&. |
| 146 |
T} |
| 147 |
T{ |
| 148 |
"%m" |
| 149 |
T}:T{ |
| 150 |
Machine ID |
| 151 |
T}:T{ |
| 152 |
The machine ID of the running system, formatted as string\&. See \fBmachine-id\fR(5) for more information\&. |
| 153 |
T} |
| 154 |
T{ |
| 155 |
"%M" |
| 156 |
T}:T{ |
| 157 |
Operating system image identifier |
| 158 |
T}:T{ |
| 159 |
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\&. |
| 160 |
T} |
| 161 |
T{ |
| 162 |
"%o" |
| 163 |
T}:T{ |
| 164 |
Operating system ID |
| 165 |
T}:T{ |
| 166 |
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\&. |
| 167 |
T} |
| 168 |
T{ |
| 169 |
"%v" |
| 170 |
T}:T{ |
| 171 |
Kernel release |
| 172 |
T}:T{ |
| 173 |
Identical to \fBuname \-r\fR output\&. |
| 174 |
T} |
| 175 |
T{ |
| 176 |
"%w" |
| 177 |
T}:T{ |
| 178 |
Operating system version ID |
| 179 |
T}:T{ |
| 180 |
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\&. |
| 181 |
T} |
| 182 |
T{ |
| 183 |
"%W" |
| 184 |
T}:T{ |
| 185 |
Operating system variant ID |
| 186 |
T}:T{ |
| 187 |
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\&. |
| 188 |
T} |
| 189 |
T{ |
| 190 |
"%%" |
| 191 |
T}:T{ |
| 192 |
Single percent sign |
| 193 |
T}:T{ |
| 194 |
Use "%%" in place of "%" to specify a single percent sign\&. |
| 195 |
T} |
| 196 |
.TE |
| 197 |
.sp 1 |
| 198 |
Added in version 236\&. |
| 199 |
.RE |
| 200 |
.PP |
| 201 |
\fIType=\fR |
| 202 |
.RS 4 |
| 203 |
A type of the network service as defined in the section 4\&.1\&.2 of |
| 204 |
\m[blue]\fBRFC 6763\fR\m[]\&\s-2\u[1]\d\s+2, e\&.g\&. |
| 205 |
"_http\&._tcp"\&. |
| 206 |
.sp |
| 207 |
Added in version 236\&. |
| 208 |
.RE |
| 209 |
.PP |
| 210 |
\fISubType=\fR |
| 211 |
.RS 4 |
| 212 |
A subtype of the network service as defined in the section 7\&.1 of |
| 213 |
\m[blue]\fBRFC 6763\fR\m[]\&\s-2\u[1]\d\s+2, e\&.g\&. |
| 214 |
"_printer"\&. |
| 215 |
.sp |
| 216 |
Added in version 256\&. |
| 217 |
.RE |
| 218 |
.PP |
| 219 |
\fIPort=\fR |
| 220 |
.RS 4 |
| 221 |
An IP port number of the network service\&. |
| 222 |
.sp |
| 223 |
Added in version 236\&. |
| 224 |
.RE |
| 225 |
.PP |
| 226 |
\fIPriority=\fR |
| 227 |
.RS 4 |
| 228 |
A priority number set in |
| 229 |
\fBSRV\fR |
| 230 |
resource records corresponding to the network service\&. |
| 231 |
.sp |
| 232 |
Added in version 236\&. |
| 233 |
.RE |
| 234 |
.PP |
| 235 |
\fIWeight=\fR |
| 236 |
.RS 4 |
| 237 |
A weight number set in |
| 238 |
\fBSRV\fR |
| 239 |
resource records corresponding to the network service\&. |
| 240 |
.sp |
| 241 |
Added in version 236\&. |
| 242 |
.RE |
| 243 |
.PP |
| 244 |
\fITxtText=\fR |
| 245 |
.RS 4 |
| 246 |
A whitespace\-separated list of arbitrary key/value pairs conveying additional information about the named service in the corresponding TXT resource record, e\&.g\&. |
| 247 |
"path=/portal/index\&.html"\&. Keys and values can contain C\-style escape sequences which get translated upon reading configuration files\&. |
| 248 |
.sp |
| 249 |
This option together with |
| 250 |
\fITxtData=\fR |
| 251 |
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\&. |
| 252 |
.sp |
| 253 |
Added in version 236\&. |
| 254 |
.RE |
| 255 |
.PP |
| 256 |
\fITxtData=\fR |
| 257 |
.RS 4 |
| 258 |
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\&. |
| 259 |
"data=YW55IGJpbmFyeSBkYXRhCg=="\&. Keys can contain C\-style escape sequences which get translated upon reading configuration files\&. |
| 260 |
.sp |
| 261 |
This option together with |
| 262 |
\fITxtText=\fR |
| 263 |
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\&. |
| 264 |
.sp |
| 265 |
Added in version 236\&. |
| 266 |
.RE |
| 267 |
.SH "EXAMPLES" |
| 268 |
.PP |
| 269 |
\fBExample\ \&1.\ \&HTTP service\fR |
| 270 |
.sp |
| 271 |
.if n \{\ |
| 272 |
.RS 4 |
| 273 |
.\} |
| 274 |
.nf |
| 275 |
# /etc/systemd/dnssd/http\&.dnssd |
| 276 |
[Service] |
| 277 |
Name=%H |
| 278 |
Type=_http\&._tcp |
| 279 |
Port=80 |
| 280 |
TxtText=path=/stats/index\&.html t=temperature_sensor |
| 281 |
.fi |
| 282 |
.if n \{\ |
| 283 |
.RE |
| 284 |
.\} |
| 285 |
.PP |
| 286 |
This makes the http server running on the host discoverable in the local network given MulticastDNS is enabled on the network interface\&. |
| 287 |
.PP |
| 288 |
Now the utility |
| 289 |
"resolvectl" |
| 290 |
should be able to resolve the service to the host\*(Aqs name: |
| 291 |
.sp |
| 292 |
.if n \{\ |
| 293 |
.RS 4 |
| 294 |
.\} |
| 295 |
.nf |
| 296 |
$ resolvectl service meteo\&._http\&._tcp\&.local |
| 297 |
meteo\&._http\&._tcp\&.local: meteo\&.local:80 [priority=0, weight=0] |
| 298 |
169\&.254\&.208\&.106%senp0s21f0u2u4 |
| 299 |
fe80::213:3bff:fe49:8aa%senp0s21f0u2u4 |
| 300 |
path=/stats/index\&.html |
| 301 |
t=temperature_sensor |
| 302 |
(meteo/_http\&._tcp/local) |
| 303 |
|
| 304 |
\-\- Information acquired via protocol mDNS/IPv6 in 4\&.0ms\&. |
| 305 |
\-\- Data is authenticated: yes |
| 306 |
.fi |
| 307 |
.if n \{\ |
| 308 |
.RE |
| 309 |
.\} |
| 310 |
.PP |
| 311 |
"Avahi" |
| 312 |
running on a different host in the same local network should see the service as well: |
| 313 |
.sp |
| 314 |
.if n \{\ |
| 315 |
.RS 4 |
| 316 |
.\} |
| 317 |
.nf |
| 318 |
$ avahi\-browse \-a \-r |
| 319 |
+ enp3s0 IPv6 meteo Web Site local |
| 320 |
+ enp3s0 IPv4 meteo Web Site local |
| 321 |
= enp3s0 IPv6 meteo Web Site local |
| 322 |
hostname = [meteo\&.local] |
| 323 |
address = [fe80::213:3bff:fe49:8aa] |
| 324 |
port = [80] |
| 325 |
txt = ["path=/stats/index\&.html" "t=temperature_sensor"] |
| 326 |
= enp3s0 IPv4 meteo Web Site local |
| 327 |
hostname = [meteo\&.local] |
| 328 |
address = [169\&.254\&.208\&.106] |
| 329 |
port = [80] |
| 330 |
txt = ["path=/stats/index\&.html" "t=temperature_sensor"] |
| 331 |
.fi |
| 332 |
.if n \{\ |
| 333 |
.RE |
| 334 |
.\} |
| 335 |
.SH "SEE ALSO" |
| 336 |
.PP |
| 337 |
\fBsystemd\fR(1), \fBsystemd-resolved.service\fR(8), \fBresolvectl\fR(1) |
| 338 |
.SH "NOTES" |
| 339 |
.IP " 1." 4 |
| 340 |
RFC 6763 |
| 341 |
.RS 4 |
| 342 |
\%https://tools.ietf.org/html/rfc6763 |
| 343 |
.RE |