CSE 265: System and Network Administration

Lab #8

Today we continue with networking services. In this lab we will configure our machines as NFS clients and servers, and use automounting.

First, a commercial message: tired of an old browser? Update your system and run Firefox 10....

  1. First, configure your machine to function as an NFS server. We want to export the contents of /usr/local to any machine on the local subnet (but not to the world!). Modify (or create) your /etc/exports file to export /usr/local in a read-only form to only machines on the CSE/ECE subnet. Tip: recall from lecture how to view the export list on other machines.

    You'll then need to start or reload your nfs service (same way as other services we have run in past labs). You and a partner can verify each other's servers in the next task.

    Note that if you have the firewall turned on, it will block NFS access to your machine (that is, you won't be able to run as a server). You can turn it off by running system-config-firewall.

  2. Now set up your machine to function as an NFS client. We want to mount the contents of a neighboring machine's /usr/local to your /mnt directory. Are you able to see the contents of that drive? Can you modify the files or directories?

    Once you have verified that you are able to mount your neighbor's filesystem, unmount it, and instead, mount the /usr/local directory from wume2.cse.lehigh.edu. You'll need to demonstrate this at the end.

  3. In class we saw how to set up and use automount, through the use of map files found in /etc. In RHEL, automount is enabled by default, and will automount the filesystems exported by any machine (if permitted) if you try to access its hostname within the /net/ directory. For example, see what files exist in /net/ and then try:

      ls /net/rosie.eecs.lehigh.edu/export/src/bind/

    You can explore other parts of that filesystem as well. There are a few other exported volumes on other machines that are accessible to any host. Try, for example, ftp.cse.lehigh.edu.

  4. NFS is not the only mechanism to provide network file access. Windows boxes natively support access via SMB/CIFS. If you are on-campus, you can get access to the home space that appears as a drive on LTS Windows PCs. [I found this information on http://www.lehigh.edu/~insna/ where a Mac version is described, and lots of other useful networking info is placed.] This access requires authentication using your LTS account and password, so we want to mount these manually (substituting your own userid):

      mount.cifs //home10.cc.lehigh.edu/A-H /mnt -o "username=ad\bdd3"

    If your username doesn't start with an a-h, you need to use a different home machine, one of:

      mount.cifs //home11.cc.lehigh.edu/I-L /mnt -o "username=ad\jmt7"
      mount.cifs //home12.cc.lehigh.edu/M-Z /mnt -o "username=ad\ss0k"

    You'll be asked for your LTS password, but after that you can cd to /mnt/bdd3 to see your files (when your home drive is mapped). Note that files will look like they are all owned by root---to fix this, you'll need to use uid and gid options in mount to substitute your local account uid and gids. (It appears that the options for remapping uid and gid might need to be before the username option.)

  5. By default, automount has only one automounted directory enabled -- the /net/ directory you used above. However, it is also able to access CIFS/SMB filesystems. If you know of any publicly accessible CIFS/SMB filesystems, you can create a new directory for automounting them (with appropriate additional configuration for automount). For security, however, I don't recommend embedding your username and password in an automount file.

  6. Given what you saw in lecture this week, imagine that you are troubleshooting a network problem and netstat -rn gives you the following output. What is the problem and what command would you use to fix it?

      Destination   Gateway   Genmask          Flags  MSS  Window  irtt  Iface
      128.138.202.0 0.0.0.0   255.255.255.0    U      40   0       0     eth0
      127.0.0.0     0.0.0.0   255.0.0.0        U      40   0       0     lo
      

In order to sign the lab completion sheet, you will need to:

  1. show me the contents of /usr/local that you automounted from wume2.
  2. show me that you have (non-root) SMB/CIFS access to your LTS drive.
  3. tell me the problem made visible by netstat.


This page can be reached from http://www.cse.lehigh.edu/~brian/course/2012/sysadmin/labs/
Last revised: 23 March 2012.