linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "martin.l.wege@gmail.com" <martin.l.wege@gmail.com>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Cc: "cedric.blancher@gmail.com" <cedric.blancher@gmail.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"bcodding@redhat.com" <bcodding@redhat.com>
Subject: Re: NFSv4 referrals - custom (non-2049) port numbers in fs_locations?
Date: Mon, 5 Feb 2024 16:17:37 +0000	[thread overview]
Message-ID: <c28a3c78daa1845b8a852d910e0ea6c6bf4d63b4.camel@hammerspace.com> (raw)
In-Reply-To: <93DA527F-E5D7-49A4-89E6-811CE045DDD3@oracle.com>

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.

> The RFC is only about wire protocol. It says nothing about the
> server's administrative interfaces; those are always up to the
> whim of server developers.
> 
> In NFSD's case, refer= can specify a DNS label (no port), an IPv4
> or IPv6 address (no port), or an IPv4 universal address. This
> is because of the punctuation involved with separating the list
> of export options, and the punctuation used internally in DNS
> labels and IP addresses.
> 
> To add support for other combinations would require code changes.

Agreed, and there would also be the major issue of trying to ensure
backward compatibility if you were to rely on client behaviour that
differs from today.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2024-02-05 16:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01  9:06 NFSv4 referrals - custom (non-2049) port numbers in fs_locations? Martin Wege
2023-11-01 14:42 ` Benjamin Coddington
2023-11-10  7:54   ` Martin Wege
2023-11-10 13:49     ` Benjamin Coddington
2023-11-10 13:55       ` Chuck Lever III
2023-11-12 23:39         ` Cedric Blancher
2023-11-13 16:19     ` Chuck Lever III
2023-11-13 22:57       ` Cedric Blancher
2023-11-14  2:07         ` Chuck Lever III
2024-01-29 23:46           ` Martin Wege
2024-02-05 15:13             ` Chuck Lever III
2024-02-05 16:17               ` Trond Myklebust [this message]
2024-02-05 19:53                 ` Chuck Lever III
2024-02-05 20:34                   ` Trond Myklebust
2024-02-06 14:34                     ` Chuck Lever
2024-05-21  8:32                   ` Martin Wege

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c28a3c78daa1845b8a852d910e0ea6c6bf4d63b4.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=bcodding@redhat.com \
    --cc=cedric.blancher@gmail.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=martin.l.wege@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).