3.4.4 TFTP 3.5 Observing Network Traffic
Ethernet Networking Technology Guide  /  3 Network Simulation  /  3.4 IP Services  / 

3.4.5 NFS

Simics includes an NFS server module that can be attached to the generic TCP/IP stack in the service node.

simics> service_node_cmp0.nfs.info
Information about service_node_cmp0.nfs [class nfs_server]
==========================================================

UDP layer:
     Connected stack : service_node_cmp0.sn
             Enabled : True
   Server IP address : 10.10.0.1
    Registered ports : ('nfs', 2049)
                       ('mount', 635)

Directories on the simulation host can now be exported with the <nfs_server>.add-export command.

simics> service_node_cmp0.nfs.add-export /home export_path = /mnt1 -w

The <nfs_server>.add-export command exports host_path of the host file system with named mount point as export_path. If the optional export_path is not given, the host path will be used as the named mount point.

The -w switch exports the directory with read/write privilege. The default is to export directories read-only.

On Windows, absolute path with a drive letter ("C:\USERS") is supported. Such paths will be exposed to the target system with the driver letter substituted for ///drive/ ("///c/users").

simics> service_node_cmp0.nfs.add-export "C:\\users"

How the export should be mounted on the target is operating system dependent. The NFS server provides NFS version 3 over UDP. No lock service is currently implemented in the service node. This is the mount command that would mount the named mount point /mnt1 read-write on a common linux target system:

#> mount -t nfs 10.10.0.1:/mnt1 /mnt -o rw,nolock,udp,vers=3

The IP address to mount is the IP address of the service node. Use man mount on the target system to find suitable mount options for a specific system.

The NFS server functionality can be dynamically enabled or disabled by setting its enabled attribute:

simics> service_node_cmp0.nfs->enabled = FALSE

3.4.4 TFTP 3.5 Observing Network Traffic