Network File System (NFS) in Computer Network

FREE Online Courses: Click for Success, Learn for Free - Start Now!

The Network File System is abbreviated as NFS. It is a distributed file system protocol. Sun Microsystems created this protocol in 1984. It is based on a client/server architecture.

It is this protocol that enables users to access data and files remotely through the network. Because the NFS protocol is an open standard, it is simple to implement. Any user can manipulate files in the same way as they would if they were on another protocol. This protocol is based on the ONC RPC system as well.

This protocol is mostly used in computer settings where centralised resource and data management is important. It handles data transmission using the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP).

Network File System can operate on all IP-based networks. It is implemented in a client/server application in which the NFS server handles authorization, authentication, and client management. This protocol is supported by Apple Mac OS, Unix and Unix-like operating systems such as Solaris, Linux, FreeBSD, and AIX.

NFS as a Distributed System:

Sun’s Network File System: Sun Microsystems developed the Network File System, which was the first successful distributed system (NFS). NFSv2 was built with the objective of easy and quick server crash recovery. This objective is critical in multi-client and single-server network systems since a single server crash means that all clients are unserviced. The entire system fails.

When it comes to crashes, stateful protocols complicate matters. Consider client A attempting to obtain data from the server. However, the site failed shortly after the first read. When the server is ready, client A sends the second read request. The server, on the other hand, has no idea which files the client is referring to because all of that information was transient and destroyed after the crash.

Here, stateless protocols come to our aid. Such protocols are designed such that no state information is stored on the server. The server has no idea what the clients are doing, such as which blocks they are caching, which files they are opening, or where their current file pointers are. The server simply provides all of the information needed to satisfy a client request. If the server crashes, the client must simply retry the request. NFS employs a stateless protocol due to its simplicity.

File Handles for NFS:

NFS employs file handles to uniquely identify a file or directory that is the subject of the current operation. This is made up of the following elements:

1. Volume Identifier:

 A file system or partition on an NFS server may contain numerous file systems or partitions. The volume identification informs the server about the file system being referenced to.

2. Inode number: 

The inode number identifies the file within the partition.

3. Generation Number: 

When reusing an inode number, this value is utilised as the generation number.

Attributes of the File:

In NFS terminology, “file attributes” is a phrase that is often used. This is a catch-all word for a file’s monitored metadata, which includes file creation time, last updated time, size, ownership rights, and so on. By running stat() on the file, you can get at this information.

Difference between NFS and CIFS:

Network File System(NFS)Common Internet File System(CIFS)
NFS is short for Network File System.The Common Internet File System is abbreviated as CIFS.
Unix and Linux operating systems utilise this protocol to share files.Windows operating systems utilise this protocol to share files.
It is quite scalable.It has a lower scalability.
Communication moves at a breakneck pace.The communication speed is medium.
The Network File System protocol is not secure.The Network File System is less secure than the Common Internet File System.
NFS is an unreliable protocol.CIFS is a reliable protocol.
Sessions are not provided by this protocol.Sessions are provided by this protocol.
This protocol is simple to implement and configure.Its implementation is difficult.
TCP and UDP are both used on port 111 in this protocol.This protocol employs 139 and 445 TCP ports, as well as 137 and 138 UDP ports.

Summary:

In this article, we looked at the history and functioning of the Network File System (NFS). We looked at the various terminologies involved in the file handling process of NFS, and also the differences between NFS (Network File System) and CIFS (Common Internet File System).

Did we exceed your expectations?
If Yes, share your valuable feedback on Google

follow dataflair on YouTube

Leave a Reply

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