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       directories /usr/lib/systemd/dnssd and /usr/local/lib/systemd/dnssd,
19       the volatile runtime network directory /run/systemd/dnssd and the local
20       administration network directory /etc/systemd/dnssd. All configuration
21       files are collectively sorted and processed in lexical order,
22       regardless of the directories in which they live. However, files with
23       identical filenames replace each other. Files in /etc have the highest
24       priority, files in /run take precedence over files with the same name
25       in /usr/lib. This can be used to override a system-supplied
26       configuration file with a local file if 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 or /usr/local/lib. Drop-in files
39       under any of these directories take precedence over the main network
40       service file wherever located.
41

[SERVICE] SECTION OPTIONS

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

EXAMPLES

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

SEE ALSO

164       systemd(1), systemd-resolved.service(8), resolvectl(1)
165

NOTES

167        1. RFC 6763
168           https://tools.ietf.org/html/rfc6763
169
170
171
172systemd 243                                                   SYSTEMD.DNSSD(5)
Impressum