/etc/services
List of standard service definitions in UNIX
Mdnsd service configuration file
/etc/mdns.d/*.service
mdnsd needs at least one .service file to actively announce itself. The systems that mdnsd targets usually have an SSH or HTTP/HTTPS service, which can be located by end-users with mDNS-SD. E.g., mdnsd may be embedded in your printer, an access point, an industrial switch, or other headless network connected device.
Services are defined one per .service file and only two fields are mandatory:
type TYPEThe TYPE can be any service type from /etc/services, prefixed with an underscore. E.g., 'ipp' is port 631/tcp, which gives the type _ipp._tcp
port PORTThe port is the UDP or TCP port to announce. This can also be found in the file /etc/services.
There are also a few optional fields supported, see below for examples:
name STRINGFree form string to describe service. Usually what is presented to end users by discovery agents.
txt STRINGText records are free-form strings that are included in service announcements. Useful for announcing meta data about your service.
target URLURL to announce as canonical for this service.
cname URLA cname is an alias that can be announced for unique service reqords. E.g., if only one HTTP service is available on the LAN it can be reached through the full name, or using the cname alias.
This section has some examples of mDNS service definitions.
# mDNS-SD advertisement of SSH service type _ssh._tcp port 22
# mDNS-SD advertisement of FTP service name Troglobit FTP Server type _ftp._tcp port 21 txt server=uftpd txt version=2.6 target ftp.luthien.local
# mDNS-SD advertisement of HTTP service type _http._tcp port 80 txt server=merecat txt version=2.31 cname home.local
# mDNS-SD advertisement of foo._printer._tcp.local. type _printer._tcp port 515
# mDNS-SD advertisement of foo._ipp._tcp.local. type _ipp._tcp port 631
/etc/services
List of standard service definitions in UNIX
Unchanged in 2 releases since Debian 12 (Bookworm).