DNS Service Discovery Types Reference

vitaprimo

Dabbler
Joined
Jun 28, 2018
Messages
27
I'm setting up Zero-Configuration Wide Area Service Discovery—DNS-SD. I set up a subdomain to delegate all of this away from the main domain, along with long-lived queries, all that but I'm still setting up static records for some services.

From the DNS-server-to-be I'm using Apple's dns-sd to discovery probes. I was surprised that TrueNAS is among the among the devices that register the highest amount of services, followed by macOS systems or the other way around.. Either way, it is high. I taught myself a little Bash scripting to put them into zone files to $INCLUDE once I knew which services were. With an IDE batch-edited the files to match domains names and that's it. I still need to learn awk/sed to make it better for sharing it and bearable to look at for actual programmers, if any the hardest part was figuring out the hierarchy which isn't hard per se, just very confusing.

Back to TrueNAS though, is there a reference of the services registered/published by TrueNAS? Things like _middleware-ssl._tcp which is not in the list or others such as _https.tcp which is but only to specifically single it out as not to be used and instruct to use _http._tcp instead. Also to know which allow their names to be edited, for instance, some in some services such as, for (a real) example:

Code:
_nfs._tcp                       PTR     vm._nfs._tcp
vm._nfs._tcp                    SRV     0 0 2049 zx7.vitanetworks.link.
vm._nfs._tcp                    TXT     "path=/nfs/vm"

that would only show the vm NFS server in the results versus:
Code:
_nfs._tcp                       PTR     vm\ on\ \[ZX7\]._nfs._tcp
vm\ on\ \[ZX7\]._nfs._tcp       SRV     0 0 2049 zx7.vitanetworks.link.
vm\ on\ \[ZX7\]._nfs._tcp       TXT     "path=/nfs/vm"

that would show vm on ZX7, the server where the vm share lives.

Other service instances put some value, like a name or UUID of the instance then again somewhere in the accompanying TXT record, creating uncertainty if these should match, e.g;
Code:
_printer._tcp                       PTR     usbprinter1\ @\ zx0._printer._tcp
usbprinter1\ @\ zx0._printer._tcp   SRV     0 0 515 zx0.vitanetworks.link.
usbprinter1\ @\ zx0._printer._tcp   TXT     (
                                            "txtvers=1" \
                                            "qtotal=2" \
                                            "ty=HP HP Officejet Pro X476dw MFP" \
                                            "note=zx0(HP HP Officejet Pro X476dw MFP)" \
                                            "pdl=application/octet-stream,application/postscript" \
                                            "rp=usbprinter1"
)


So far, I've identified: _ssh._tcp, _smb._tcp, _sftp-ssh._tcp, _nfs._tcp, _webdav._tcp*, _webdavs._tcp*, _middleware._tcp, _middleware-ssl._tcp, _iscsi._tcp, _http._tcp, _https._tcp and _device-info._tcp without logging in to the server long before I started doing this. I don't know if I'll "wake" more service upon login.
(*: Not registered but I know how to add them)

As [I think] you know, apps using ZeroConf/Bonjour rarely show more than the name of the service instance in what they were able to discover, only specialized apps show information this detailed and even those only search in the link-local, including Apple's no matter if it detects the special records (b, lb, db, r & dr) for discovery. This, the server-side DNS-SD, to me is the coolest networking-related stuff I've learned, it sucks that its documentation is not that great. :/ I mean…the sort-of-competing-but-not-really UPnP (and thus DLNA) can piggyback on it, how is it not more mainstream?!

Even if the services aren't meant to be shown in any place, I'd still like to statically map them, it just makes sense. Hopefully you guys can point out which obvious document I missed, it's happened before. Thanks!
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
In SCALE it's getting pared down to http, smb, adisk, and device_info. Probably same for TN 13 (although we'll still have netatalk so afpovertcp). Only device_info and adisk have txt records.

Explanation of adisk SRV record:
Code:
        """
        Device Info:
        -------------------------
        The TXTRecord string here determines the icon that will be displayed in Finder on MacOS
        clients. Default is to use MacRack which will display the icon for a rackmounted server.


        Time Machine (adisk):
        -------------------------
        sys=adVF=0x100 -- this is required when _adisk._tcp is present on device. When it is
        set, the MacOS client will send a NetShareEnumAll IOCTL and shares will be visible.
        Otherwise, Finder will only see the Time Machine share. In the absence of _adisk._tcp
        MacOS will _always_ send NetShareEnumAll IOCTL.

        waMa=0 -- MacOS server uses waMa=0, while embedded devices have it set to their Mac Address.
        Speculation in Samba-Technical indicates that this stands for "Wireless ADisk Mac Address".

        adVU -- ADisk Volume UUID.

        dk(n)=adVF=
        0xa1, 0x81 - AFP support
        0xa2, 0x82 - SMB support
        0xa3, 0x83 - AFP and SMB support

        adVN -- AirDisk Volume Name. We set this to the share name.
        network analysis indicates that current MacOS Time Machine shares set the port for adisk to 311.
        """
 
Last edited:
Top