On Mon, Feb 05, 2024 at 08:34:46PM +0000, Trond Myklebust wrote: > On Mon, 2024-02-05 at 19:53 +0000, Chuck Lever III wrote: > > > > > > > On Feb 5, 2024, at 11:17 AM, Trond Myklebust > > > <trondmy@xxxxxxxxxxxxxxx> wrote: > > > > > > On Mon, 2024-02-05 at 15:13 +0000, Chuck Lever III wrote: > > > > > > > > > > > > A DNS label is just a hostname (fully-qualified or not). It > > > > never includes a port number. > > > > > > > > According to RFC 8881, fs_location4's server field can contain: > > > > > > > > - A DNS label (no port number; 2049 is assumed) > > > > > > > > - An IP presentation address (no port number; 2049 is assumed) > > > > > > > > - a universal address > > > > > > > > A universal address is an IP address plus a port number. > > > > Therefore > > > > a universal address is the only way an alternate port can be > > > > communicated in an NFSv4 referral. > > > > > > That's not strictly true. RFC8881 has little to say about how you > > > are > > > to go about using the DNS hostname provided by fs_locations4. There > > > is > > > just some non-normative and vague language about using DNS to look > > > up > > > the addresses. > > > > > > The use of DNS service records do allow you to look up the full IP > > > address and port number (i.e. the equivalent of a universal > > > address) > > > given a fully qualified hostname and a service. While we do not use > > > the > > > hostname that way in the Linux NFS client today, I see nothing in > > > the > > > spec that would appear to disallow it at some future time. > > > > We absolutely could do that. But first a service name would need to > > be > > reserved, yes? > > > > https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=dns > > > > What's wrong with the one that is already assigned? I'm talking about: > > nfs 2049 tcp Network File System - Sun [Brent_Callaghan] [Brent_Callaghan] Defined TXT keys: path=<path to mount point> > Microsystems > nfs 2049 udp Network File System - Sun [Brent_Callaghan] [Brent_Callaghan] Defined TXT keys: path=<path to mount point> > Microsystems > nfs 2049 sctp Network File System [RFC5665] Defined TXT keys: path=<path to mount point> For reference: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=2049 My search terms excluded these, so I missed them. I don't see the IANA action request text in RFC 5665. These must have been specified and requested in some other document, or that action request was removed before RFC 5665 was published. Putative example: NFS on port 2050 of example.com: _nfs._tcp.example.com. 86400 IN SRV 0 5 2050 server1.example.com. I suppose "mount.nfs" could recognize this mapping as well. Since the transport protocol is included in the SRV record, I'm not sure how one would encode "rdma" for NFS on iWARP, which uses a distinct port (20049). -- Chuck Lever