NFSv3 over TCP

When reading the headline, you may think “What? This works for years now”. Well, you are right. You can do NFS over TCP. There was just a small problem before Solaris 11.4. Let me show it by mounting an NFS share with a Oracle Solaris 11.3 system as a client.

root@sol113c1:~# mount -o vers=3,proto=tcp 192.168.1.131:/export/nfsshare /mnt114

When you use an sniffer on this connection you will find something interesting

sol113c1 ? sol113s1 Portmap 98 V2 GETPORT Call MOUNT(100005) V:3 UDP

Despite using the mount option proto=tcp the first request is done via UDP instead of TCP. Only after the setup of the mount everything else would go via TCP and thus you always needed UDP and TCP between both systems in oder to do an successful mount and coudn’t just block UDP between the NFS server and the NFS client.

In Solaris 11.4 it’s different. Let’s do an NFSv3 mount from an 11.4 to an 11.4 system.

root@sol114c1:~# mount -o vers=3,proto=tcp 192.168.1.131:/export/nfsshare /mnt114

If we check with a sniffer again we will see this initial setup is done via TCP as well.

sol114c1 ? sol114s1 Portmap 126 V2 GETPORT Call MOUNT(100005) V:3 TCP


As it’s something done in the client, it doesn’t matter what the server is. If you do do a mount from an 11.4 client to an 11.3 server you will see the new behaviour as well:

sol114c1 ? sol113s1 Portmap 126 V2 GETPORT Call MOUNT(100005) V:3 TCP