May 242001

Dual-homed NFS servers

I had an interesting situation today. You’ll know I recently wrote about installing FreeBSD on my laptop. The next step was to use NFS to mount the ports tree from the NFS server. You will recall that the laptop was on, and another wireless card was in the Xeon at The Xeon acted as the gateway for the laptop. Also introduced into the equation was NAT. The other NIC for the Xeon was at, hence the NAT for the laptop to get out onto the rest of my LAN.

The NFS server was was on the Xeon. Here’s what /etc/exports initially held:

/usr/src /usr/obj /usr/ports -maproot=0
In order to mount from, I had to add that IP to the above list. However, I had no success at all with the following configuration:
/usr/src /usr/obj /usr/ports -maproot=0
I HUP’d mountd but I wasn’t able to mount this export from Hmmm, and /var/log/messages on the server contained this:
portmap[24980]: connect from to getport(nfs): request from unauthorized host
Hmmm, now that’s very similar to what you’ll find in NFS Portmap: RPC: Program not registered. After reading that article again, I noticed that /etc/hosts.allow on the server didn’t contain So I modified that file and HUP’d mountd., but I still wasn’t able to mount the export… However, I was able to mount the export from the 192.168.0.* network, just not from 10.0.0.*. How odd.

The solution I found was to remove the entry from /etc/export on the server. Then I KILL’d mountd and nfsd on the server and restarted them both. I had to reboot the client as it contained a process which would not die. After that, I was able to mount the exported NFS volume from the laptop.

Can NFS be dual-homed? Any clues?

If so, please contribute to the phorum with any clues you may have. Thanks

  One Response to “Dual-homed NFS servers”

  1. (posted by Dan Langille)

    You probably have already received an answer for this, but on the off chance you haven’t, here we go.

    Off your webpage:
    "Can NFS be Dual Homed? Any clues?"

    Yes, it can.

    It’s my understanding that the exports file is access control for ONE host
    PER line.

    [mount] [options] [host]

    [mount] [options] [host] [host]

    /usr -maproot=root

    Won’t work, but
    /usr -maproot=root
    /usr -maproot=root

    Should be just dandy.

    Actually, there are some examples in man 5 exports.

    Hope that helps.