TCP and UDP – NFS Perspective

Recently I came across a situation when a specific UNIX client was not able to mount the NFS drive from Windows. Upon checking the permissions and related setting on server and client it was looking clean.

My next avenue was to get a network capture and analyze it. I noticed that mount calls were falling back to UDP and we pretty much blocked UDP protocol for NFS from Windows NFS server.

So at that point we knew the resolution and enabling TCP+UDP from server side was the trick.

The real question here is; why mount calls are falling to UDP?

To me using mount calls through UDP sounds logical BUT only if we are mounting several times; like in case of auto mount. We know there is no three way handshake for UDP (unlike TCP) and for large no. of mounts; using UDP will be less resource consuming.

Again, does the server really care if a mount call fails even when we use TCP? The answer is No. NFS Clients generally use soft vs. hard mount to keep the mounted drive alive.

Using TCP is definitely preferred if we are transferring large size files over NFS to ensure data consistency.