1SYSTEMD.DNSSD(5)                 systemd.dnssd                SYSTEMD.DNSSD(5)
2
3
4

NAME

6       systemd.dnssd - DNS-SD configuration
7

SYNOPSIS

9       network_service.dnssd
10

DESCRIPTION

12       DNS-SD setup is performed by systemd-resolved(8).
13
14       The main network service file must have the extension .dnssd; other
15       extensions are ignored.
16
17       The .dnssd files are read from the files located in the system network
18       directory /usr/lib/systemd/dnssd, the volatile runtime network
19       directory /run/systemd/dnssd and the local administration network
20       directory /etc/systemd/dnssd. All configuration files are collectively
21       sorted and processed in lexical order, regardless of the directories in
22       which they live. However, files with identical filenames replace each
23       other. Files in /etc have the highest priority, files in /run take
24       precedence over files with the same name in /usr/lib. This can be used
25       to override a system-supplied configuration file with a local file if
26       needed.
27
28       Along with the network service file foo.dnssd, a "drop-in" directory
29       foo.dnssd.d/ may exist. All files with the suffix ".conf" from this
30       directory will be parsed after the file itself is parsed. This is
31       useful to alter or add configuration settings, without having to modify
32       the main configuration file. Each drop-in file must have appropriate
33       section headers.
34
35       In addition to /etc/systemd/dnssd, drop-in ".d" directories can be
36       placed in /usr/lib/systemd/dnssd or /run/systemd/dnssd directories.
37       Drop-in files in /etc take precedence over those in /run which in turn
38       take precedence over those in /usr/lib. Drop-in files under any of
39       these directories take precedence over the main network service file
40       wherever located. (Of course, since /run is temporary and /usr/lib is
41       for vendors, it is unlikely drop-ins should be used in either of those
42       places.)
43

[SERVICE] SECTION OPTIONS

45       The network service file contains a "[Service]" section, which
46       specifies a discoverable network service announced in a local network
47       with Multicast DNS broadcasts.
48
49       Name=
50           An instance name of the network service as defined in the section
51           4.1.1 of RFC 6763[1], e.g.  "webserver".
52
53           The option supports simple specifier expansion. The following
54           expansions are understood:
55
56           Table 1. Specifiers available
57           ┌──────────┬────────────────┬─────────────────────┐
58Specifier Meaning        Details             
59           ├──────────┼────────────────┼─────────────────────┤
60           │"%m"      │ Machine ID     │ The machine ID of   │
61           │          │                │ the running system, │
62           │          │                │ formatted as        │
63           │          │                │ string. See         │
64           │          │                │ machine-id(5) for   │
65           │          │                │ more information.   │
66           ├──────────┼────────────────┼─────────────────────┤
67           │"%b"      │ Boot ID        │ The boot ID of the  │
68           │          │                │ running system,     │
69           │          │                │ formatted as        │
70           │          │                │ string. See         │
71           │          │                │ random(4) for more  │
72           │          │                │ information.        │
73           ├──────────┼────────────────┼─────────────────────┤
74           │"%H"      │ Host name      │ The hostname of the │
75           │          │                │ running system.     │
76           ├──────────┼────────────────┼─────────────────────┤
77           │"%v"      │ Kernel release │ Identical to uname  
78           │          │                │ -r output.          │
79           └──────────┴────────────────┴─────────────────────┘
80
81       Type=
82           A type of the network service as defined in the section 4.1.2 of
83           RFC 6763[1], e.g.  "_http._tcp".
84
85       Port=
86           An IP port number of the network service.
87
88       Priority=
89           A priority number set in SRV resource records corresponding to the
90           network service.
91
92       Weight=
93           A weight number set in SRV resource records corresponding to the
94           network service.
95
96       TxtText=
97           A whitespace-separated list of arbitrary key/value pairs conveying
98           additional information about the named service in the corresponding
99           TXT resource record, e.g.  "path=/portal/index.html". Keys and
100           values can contain C-style escape sequences which get translated
101           upon reading configuration files.
102
103           This option together with TxtData= may be specified more than once,
104           in which case multiple TXT resource records will be created for the
105           service. If the empty string is assigned to this option, the list
106           is reset and all prior assignments will have no effect.
107
108       TxtData=
109           A whitespace-separated list of arbitrary key/value pairs conveying
110           additional information about the named service in the corresponding
111           TXT resource record where values are base64-encoded string
112           representing any binary data, e.g.
113           "data=YW55IGJpbmFyeSBkYXRhCg==". Keys can contain C-style escape
114           sequences which get translated upon reading configuration files.
115
116           This option together with TxtText= may be specified more than once,
117           in which case multiple TXT resource records will be created for the
118           service. If the empty string is assigned to this option, the list
119           is reset and all prior assignments will have no effect.
120

EXAMPLES

122       Example 1. HTTP service
123
124           # /etc/systemd/dnssd/http.dnssd
125           [Service]
126           Name=%H
127           Type=_http._tcp
128           Port=80
129           TxtText=path=/stats/index.html t=temperature_sensor
130
131       This makes the http server running on the host discoverable in the
132       local network given MulticastDNS is enabled on the network interface.
133
134       Now the utility "resolvectl" should be able to resolve the service to
135       the host's name:
136
137           $ resolvectl service meteo._http._tcp.local
138           meteo._http._tcp.local: meteo.local:80 [priority=0, weight=0]
139                                   169.254.208.106%senp0s21f0u2u4
140                                   fe80::213:3bff:fe49:8aa%senp0s21f0u2u4
141                                   path=/stats/index.html
142                                   t=temperature_sensor
143                                   (meteo/_http._tcp/local)
144
145           -- Information acquired via protocol mDNS/IPv6 in 4.0ms.
146           -- Data is authenticated: yes
147
148       "Avahi" running on a different host in the same local network should
149       see the service as well:
150
151           $ avahi-browse -a -r
152           + enp3s0 IPv6 meteo                                         Web Site             local
153           + enp3s0 IPv4 meteo                                         Web Site             local
154           = enp3s0 IPv6 meteo                                         Web Site             local
155              hostname = [meteo.local]
156              address = [fe80::213:3bff:fe49:8aa]
157              port = [80]
158              txt = ["path=/stats/index.html" "t=temperature_sensor"]
159           = enp3s0 IPv4 meteo                                         Web Site             local
160              hostname = [meteo.local]
161              address = [169.254.208.106]
162              port = [80]
163              txt = ["path=/stats/index.html" "t=temperature_sensor"]
164

SEE ALSO

166       systemd(1), systemd-resolved.service(8), resolvectl(1)
167

NOTES

169        1. RFC 6763
170           https://tools.ietf.org/html/rfc6763
171
172
173
174systemd 241                                                   SYSTEMD.DNSSD(5)
Impressum