Dual-homed NFS servers

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 10.0.0.10, and another wireless card
was in the Xeon at 10.0.0.2. The Xeon acted as the gateway for the laptop.
Also introduced into the equation was NAT. The other NIC for the Xeon was
at 192.168.0.18, 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 192.168.0.20

In order to mount from 10.0.0.10, 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 192.168.0.20 10.0.0.10

I HUP’d mountd but I wasn’t able to mount this export from 10.0.0.10.
Hmmm, and /var/log/messages on the server
contained this:

portmap[24980]: connect from 10.0.0.10 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 10.0.0.10. 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 192.168.0.20 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

1 thought on “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]

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

    So
    /usr -maproot=root 10.0.0.1 192.168.1.1

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

    Should be just dandy.

    Actually, there are some examples in man 5 exports.

    Hope that helps.

Leave a Comment

Scroll to Top