TCP IP Illustrated

The client asks for 1024 bytes starting at offset 0

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: exclusive of the IP and UDP headers. We see in this figure that the minimum NFS message contains around 100 bytes of data. In line 3 the client calls the LOOKUP procedure for the file rstevens and receives an OK reply in line 4. The LOOKUP specifies the filename rstevens and the file handle that was saved by the kernel when the remote filesystem was mounted. The reply contains a new file handle that is used in the next step. In line 5 the client does a LOOKUP of hello.c using the file handle from line 4. It receives another file handle in line 6. This new file handle is what the client uses in lines 7 and 9 to reference the file /nfs/bsdi/usr/rstevens/hello.c. We see that the client does a LOOKUP for each component of the pathname that is being opened. In line 7 the client does another GETATTR, followed by a READ in line 9. The client asks for 1024 bytes, starting at offset 0, but receives less. (After subtracting the sizes of the RPC fields, and the other values returned by the READ procedure, 38 bytes of data are returned in line 10. This is indeed the size of the file hello.c.) In this example the user process knows nothing about these NFS requests and replies that are being done by the kernel. The application just calls the kernel's open function, which causes 3 requests and 3 replies to be exchanged (lines 1-6), and then calls the kernel's read function, which causes 2 requests and 2 replies (lines 7-10). It is transparent to the client application that the file is on an NFS server. Simple Example: Creating a Directory As another simple example we'll change our working directory to a directory that's on an NFS server, and then create a new directory: sun % cd /nfs/bsdi/usr/rstevens sun % mkdir Mail change working directory and create a directory Figure 29.8 shows the tcpdump output. 1 2 3 4 0.0 sun.7ad2 0.004912 ( 0.0049) bsdi.nfs 0.007266 ( 0.0024) sun.7ad3 0.010846 ( 0.0036) bsdi.nfs > > > > bsdi.nfs: sun.7ad2: bsdi.nfs: sun.7ad3: 104 getattr reply ok 96 104 getattr reply ok 96 file:///D|/Documents%20and%20Settings/bigini/Docu...homenet2run/tcpip/tcp-...
View Full Document

This test prep was uploaded on 04/04/2014 for the course ECE EL5373 taught by Professor Guoyang during the Spring '12 term at NYU Poly.

Ask a homework question - tutors are online