On Tue, 18 Sep 2012 01:28:09 -0400 Chuck Lever <chuck.lever@xxxxxxxxxx> wrote: > Hi Neil- > > On Sep 17, 2012, at 9:54 PM, NeilBrown wrote: > > > It seems that with current nfs-utils, "proto=udp" (either > > in /etc/nfsmount.conf or on the command line) restricts the mount to using > > IPv4, not IPv6. > > For IPv6 you need "udp6". > > > > This isn't made crystal clear by the documentation. I could fix the > > documentation, but first I wanted to check if this really is appropriate. > > Is there a good reason for this, or should we make "udp" mean "udp4 or udp6" > > and require either "udp4" or "udp6" if we want a particular IP version. > > > > i.e. instead of treating the "proto=" value as a "netid", should we treat it > > as a "protoname" and match any "netid" in /etc/netconfig with that > > "protoname"?? > > This is working as designed. > > The meaning of each netid is defined in RFC 5665. "udp" means UDP over IPv4. This matches precisely what "proto=udp" meant before TI-RPC. These netids force a particular protocol family when the server is specified by hostname and not IP address. > > What's more, we mean this to match the behavior of the Solaris mount command, where "proto=udp" also has this meaning. > > Which part of the documentation do you think is unclear? > Hi Chuck, Thanks for the reply. It is unfortunate that the tag "proto" is used to choose the "netid". In common parlance, "udp" and "tcp" are protocols independent of the underlying transport (IPv4 or IPv6) much as "nfsv3" or "nfsv4" are independent of the underlying transport (tcp, udp6, rdma etc). Give this obvious opportunity for confusion it would be good if the documentation took significant steps to minimise it. I note that nfs(5) does mention /etc/netconfig and the "netid"s that it contains. However "udp6" and "tcp6" are never given as examples - doing so would help the reader see the import of the distinction. proto=netid The transport protocol name and protocol family the NFS client uses to transmit requests to the NFS server for this mount point. If an NFS server has both an IPv4 and an IPv6 address, using a specific netid will force the use of IPv4 or IPv6 networking to communicate with that server. I don't think the second sentence would be very helpful to someone who didn't already understand the subtleties. Something like: A particular netid completely specifies the protocol, so for example "tcp" is TCP over IPv4, and "udp6" is UDP over IPv6. It is not possible to request "UDP" without also specifying which version of IP should be used. man nfsmount.conf gives the example: [ NFSMount_Global_Options ] Proto=Tcp The TCP protocol will be used on every NFS mount. which is incomplete. Not just TCP, but TCP/IPv4 will be used on every NFS mount. And again, not IPv6 examples. (and nfsmount.conf doesn't mention the "default$OPTION=value" syntax...) For a usability perspective, I think that treating "udp" as meaning "udp/ipv4" is a serious mistake and I'm not at all convinced that "Solaris compatibility" is sufficient justification, but as I have no interest in offering patches, I won't pursue that line of argument further :-) Thanks, NeilBrown
Attachment:
signature.asc
Description: PGP signature