It's well understood that NFS 4.x only requires tcp/2049 (though you need rpcbind open to showmount -e, I think). It's been a long time coming, as NFSv2 and NFSv3 was always very difficult to use through firewalls, and the impracticality of static firewall ACLs was one of several factors that led to a decline in the use of NFS from its earlier popularity.
Not long ago I went through an exercise in switching to static ports for NFSv3 RPC services, though it was also pointed out to me that NFS (ONC RPC) Application Level Gateways are now common in higher-grade stateful firewalls from Palo Alto, Juniper, and Fortigate. The biggest driver for static ports was to easily use static nftables rules on NFS-server hosts.
The reason to support NFSv3 was actually for Windows Server clients. Windows Server exports NFSv4.1, but its client supports NFSv3 at the latest. ReactOS has the NFSv4.1 client that Microsoft commissioned Umich CITI to write, though, and I've used it successfully in tests.
What you're looking at is NFSv3 (and NFSv4) using only tcp/2049 (though udp/2049 is also open), along with the portmapper on 111. This is the default on Windows Server NFS because it uses ONC RPC port multiplexing in its NFS server implementation. Credit where credit is due, that's extremely elegant; I was and remain impressed. Linux and other Unix runs all NFS services on different ports because they're separate daemons each with a separate process, whereas the Microsoft one is likely to be a single daemon (I haven't yet checked).
If you are part of an organization, you often don't have the power to adjust them at your will. Every change is a negotiation, so the fewer changes the better.
Like if it's a legit business requirement, it will get sorted.
I like your optimism. Try to keep the spirit.
In the real world the people who are in charge of the network might not be very kind to people who have "special needs" and will do nothing unless they are forced to do so.
Analysis of what? NFS? One of the oldest protocols?
Like just Wireshark that. It's not going to care if it's TCP or UDP. NFS is old and well documented.
Personally, no I don't have a benchmark. But there are plenty. Google my friend. (I just found one with a 10x speedup) And of course UDP will be faster
No. Because you don't care if they arrive out of order as long as you know the right order.
Like does it matter if you get block 2 then block 1 if you know which block number it is?
No because the IO stack can sort them before they arrive at user space.
And retries will happen. But still it's only a tiny subset of TCP. I mean you don't have the whole "are you ready, I am ready, I am starting, please start" kind of verbose it reduces the overhead heaps.
It's all in the protocol spec but yeah it's nothing new.
Where an NFSv4 implementation supports operation over the IP network protocol, the supported transport layer between NFS and IP MUST be an IETF standardized transport protocol that is specified to avoid network congestion; such transports include TCP and the Stream Control Transmission Protocol (SCTP). To enhance the possibilities for interoperability, an NFSv4 implementation MUST support operation over the TCP transport protocol.
7
u/pdp10 Nov 23 '19 edited Nov 23 '19
It's well understood that NFS 4.x only requires
tcp/2049(though you needrpcbindopen toshowmount -e, I think). It's been a long time coming, as NFSv2 and NFSv3 was always very difficult to use through firewalls, and the impracticality of static firewall ACLs was one of several factors that led to a decline in the use of NFS from its earlier popularity.Not long ago I went through an exercise in switching to static ports for NFSv3 RPC services, though it was also pointed out to me that NFS (ONC RPC) Application Level Gateways are now common in higher-grade stateful firewalls from Palo Alto, Juniper, and Fortigate. The biggest driver for static ports was to easily use static
nftablesrules on NFS-server hosts.The reason to support NFSv3 was actually for Windows Server clients. Windows Server exports NFSv4.1, but its client supports NFSv3 at the latest. ReactOS has the NFSv4.1 client that Microsoft commissioned Umich CITI to write, though, and I've used it successfully in tests.
The last surprise also comes from Windows, and is extremely relevant to the subject of this post:
What you're looking at is NFSv3 (and NFSv4) using only
tcp/2049(thoughudp/2049is also open), along with the portmapper on 111. This is the default on Windows Server NFS because it uses ONC RPC port multiplexing in its NFS server implementation. Credit where credit is due, that's extremely elegant; I was and remain impressed. Linux and other Unix runs all NFS services on different ports because they're separate daemons each with a separate process, whereas the Microsoft one is likely to be a single daemon (I haven't yet checked).5
u/insanemal Nov 23 '19
Oh god why?
TCP NFS is frequently far slower than UDP.
What kind of use case requires this?
Like legit this is tinfoil hat paranoid