Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does NFS use UDP by default?

I'm sure there's some ancient legacy reason for it, but what is it? It seems like a service that's geared towards reliable data delivery.

like image 758
jdizzle Avatar asked Feb 24 '09 23:02

jdizzle


People also ask

Why does NFS use UDP?

When using NFSv2 or NFSv3 with UDP, the stateless UDP connection under normal conditions has less Protocol overhead than TCP which can translate into better performance on very clean, non-congested networks. The NFS server sends the client a file handle after the client is authorized to access the shared volume.

Does NFS use UDP or TCP?

All versions of NFS can use Transmission Control Protocol (TCP) running over an IP network, with NFSv4 requiring it. NFSv2 and NFSv3 can use the User Datagram Protocol (UDP) running over an IP network to provide a stateless network connection between the client and server.

What is the default port for NFS?

By default, the NFS daemon is already configured to run a static port of 2049. The port is true on both TCP and UDP protocols.

Is NFS over TCP?

The default transport protocol for the NFS protocol is TCP (Transmission Control Protocol).

Why doesn't NFS support UDP?

When UDP is used as a transport protocol, presumably it would be up to the NFS client to manage retransmissions if necessary. UDP is stateless, TCP isn't, but TCP has many predefined properties that didn't suite NFS, or rather that NFS wanted to govern the specifics. In particular, when TCP is doing packet transfers, it does govern timeouts, etc.

What is the default TCP port for NFS?

UDP is the default for NFSv2 (which nobody should really use these days) but NFSv3 use TCP by default.

What is the difference between NFS and NFS v3+?

NFS was originally designed to be used on a LAN where loss rates are very low. Note that NFS v3+ can use TCP. Show activity on this post. UDP is the default for NFSv2 (which nobody should really use these days) but NFSv3 use TCP by default. TCP mounts are more reliable and you know you have a network problem much faster than with UDP.

How does NFS work?

How NFS Works Feature NFS v3 NFS v4 Transport Protocol TCP and UDP UDP only Permission Handling Unix Windows-based Authentication Method Auth_Sys – Weaker Kerberos (Strong) Personality Stateless Stateful 1 more rows ...


2 Answers

  • NFS was originally designed to be used on a LAN where loss rates are very low.
  • UDP is faster, and has less overhead
  • NFS is stateless, so it's simple for clients to retry

Note that NFS v3+ can use TCP.

like image 136
dwc Avatar answered Oct 05 '22 06:10

dwc


UDP is the default for NFSv2 (which nobody should really use these days) but NFSv3 use TCP by default. TCP mounts are more reliable and you know you have a network problem much faster than with UDP.

like image 21
Keltia Avatar answered Oct 05 '22 06:10

Keltia