When specifying an NFS mountpoint in /etc/fstab, what's the purpose of the addr option? For example:
192.168.1.5:/home /home nfs rw,addr=192.168.1.5 0 0
When specifying an NFS mountpoint in /etc/fstab, what's the purpose of the addr option? For example:
192.168.1.5:/home /home nfs rw,addr=192.168.1.5 0 0
It can specify the client address to use when the client has multiple subnet IPs on an interface and traversing the same routes (think aliased eth0:1, bond0:2, etc.). Typically in this situation you'd put the NFS server on another interface/subnet to avoid the whole problem but in large network installations things can get messy.
addr
is not the same asclientaddr
. Theaddr
option is what the NFS server /etc/exports explicitly specifies, e.g.instead of simply
If the NFS server has multiple interfaces, you can designate a specific interface for the NFS traffic. Of course if you do leave it to the server to choose an interface (i.e. specify *), the server chooses one out of the available IPs and you see it in the client side `mount' command output.
(in response to troyengel's answer) The clientaddr mount option is for the server to callback the client for certain metadata, not data. I think this includes verifying whether the client is allowed to mount, etc.
addr
is a server IP.clientaddr
is a client IP.Looking at the man page for mount (http://linux.die.net/man/8/mount). It appears as though that option is accepted but ignored. I could not find any other information on it.
I believe NFS uses it internally, you see it in
/proc/mounts
even when not specified.