The default transport
protocol for NFSv4 is TCP; however, the Red Hat Enterprise Linux 5 kernel
includes support for NFS over UDP. To use NFS over UDP, include the -o udp
option to mount when mounting the NFS-exported file system on the client
system.
There are three ways
to configure an NFS file system export. On demand via the command line (client
side), automatically via the /etc/fstab file (Client side), and automatically
via autofs configuration files, such as /etc/auto.master and /etc/auto.misc (server side with NIS).
For example, on
demand via the command line (client side):
mount -o udp linuxhowto.in:/misc/export /misc/local
When the NFS mount is
specified in /etc/fstab (client side):
server:/usr/local/pub
/pub nfs rsize=8192,wsize=8192,timeo=14,intr,udp
When the NFS mount is
specified in an autofs configuration file for a NIS server, available for NIS
enabled workstations:
clouddata -rw,soft,intr,rsize=8192,wsize=8192,udp linuxhowto.in:/cldata
Since the default is
TCP, if the -o udp option is not specified, the NFS-exported file system is
accessed via TCP.
The advantages of using TCP include the following:
- Error detection. When a TCP connection breaks (due to the server being unavailable) the client stops sending data and restarts the connection process once the server becomes available. With UDP, since it's connection-less, the client continues to pound the network with data until the server reestablishes a connection.
Note that this document comes without warranty of any kind. But every effort
has been made to provide the information as accurate as possible. I welcome
emails from any readers with comments, suggestions, and corrections at
webmaster_at admin@linuxhowto.in
Copyright © 2012 LINUXHOWTO.IN
Copyright © 2012 LINUXHOWTO.IN
No comments:
Post a Comment