NFS4 server and client

Protocol: TCP
Default port: 2049

By default NFS packages are installed.
System A (server) IP:

$ cat /etc/exports
chkconfig nfs on
service nfs start

System B (client) IP:

mount.nfs4 /mnt

Firewall for showmount and automount

Show the NFS server’s export list:

showmount -e
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)

Open 111, 892 tcp,udp ports

$ grep MOUNTD_PORT /etc/sysconfig/nfs
$ service rpcbind restart
$ service nfs restart

On System B:

$ showmount -e
Export list for

Possible problem:

  1. All files and directories in mounted NFS share are owned by:
    UID/GID = 4294967294
    or UID/GID = nobody (99)

NFSv4 uses a uid@domain format.
If your domains are different on system A and B.
[System A]# hostname
[System B]# hostname
It will cause problem with UID/GID.

1. Use the same domain on server and client.
2. Domain in file /etc/idmapd.conf on the client and the server have to match.

$ cat /etc/idmapd.conf
Domain =
. . .

After changes in /etc/idmapd.conf on both systems:

$ pkill rpc.idmapd
$ rpc.idmapd
  1. If there is error: Operation not permitted
$ mount -t nfs4 /mnt/
mount.nfs4: Operation not permitted

NFSv4 requires the root of file system to be defined with fsid=0. Without fsid=0 no permission to mount.
So we need update /etc/exports as:


mount syntax should be changed:

$ mount -t nfs4 /mnt/

One thought on “NFS4 server and client

  1. FranB

    Hi. I imagine that I’m late.
    My solution for problem “Unable to receive: errno 113 (No route to host)” was adding “eth0” (you may check eth+ for all eth interfaces) as a Trusted Interface in the Firewall Configuration properties (using system-config-firewall on RHEL/CentOS).
    Of course you have to have installed the ‘rpcbind’ package, which may be installed by default, and also you must open the ports 2049 (nfs) and 111(sunrpc) both tcp and udp.
    Hope this helps.


Leave a Reply

Your email address will not be published. Required fields are marked *