Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-23-2007, 09:41 PM   #1
LQ Newbie
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
NFS with multiple routes to server

The problem I am running into is that there are multiple routes to the NFS-server for the certain computers in our cluster. I can ping the nfs-server from either subnet's computers, but NFS seems only to work on one of the subnets.

Is there an option in the NFS export /etc/exports file to specify an ethernet device when exporting to specific subnets?

I need something like this on the server:
### /etc/exports file
/export/large-dir 192.168.0.*(rw,sync,device=eth0) 192.168.1.*(rw,sync,device=eth1)

Thank you,
Old 10-24-2007, 03:42 PM   #2
LQ Newbie
Registered: Oct 2007
Posts: 2

Original Poster
Rep: Reputation: 0
solved: NFS with multiple routes to server

My question was answered on a different forum, so I would like to make the solution available here in case anyone else has a similar setup.

 |   exporting /export/home directories
 |   dhcp/NAT server for slave-net
 |        \
 |         \
 |          \
 |           \--{slave-net}
 |               |||   |
 |               |||   |
 |   *slave0* ---/||   |
 |   *slave1* ----/|   |
 |     .      -----/   |
 |     .               |
 |     .               |
 |   *slave-special* --/
 |   exporting /export/large-dir
 |      |
 |      |
        \ \ \
        | | |
I have *slave-special* exporting /data/large-dir to the world (*) at the moment. *queue-master* is a NAT routing dhcp server for all the slaves.

both *slave-special* and *queue-master* have an IP for the {slave-net} (192.168.0.X) and an IP for the [workstation-subnet] (IP via NIS/DNS).

Notice that there are two routes the slaves can take to talk to the slave-special. It could talk direct via the slave-net but it can also go through the NAT router in queue-master and the workstation-subnet. It seems to prefer the latter but I don't want to tie up unnecessary resources like that.

What I wish to accomplish:
I would like two directories (home and large-dir) to be seen by both slaves and workstations. Furthermore, when any computer looks at the home directories, they talk directly to queue-master; when any computer looks at the large-dir, they talk directly to slave-special. The home directory is not a problem because it is on the dhcp/NAT server (queue-master). The large-dir on the other hand seems to only export on a specific subnet (the workstation subnet).

With the setup as described prior, I originally thought I would only have to specify the routes to the various IPs for the slave-special (serving the large-dir). But I also had to specify the IP address of slave-special on the other slaves as they got the IP for slave-special through DNS/NIS on the workstation-subnet and thus had to go through the workstation-subnet.

SOLUTION: I merely listed all the slaves' IPs in slave-special's /etc/hosts file. And I then put slave-special's slave-subnet IP (192.168.0.X) in slave-special's /etc/hosts file which will superceed the NIS/DNS IP the slaves would normally get.

Thus the routing from slave-special to the slaves is on the slave-subnet and the routing to everything else is done through the NIS (workstation subnet).

Thanks for your help!

Last edited by johanngoetz; 10-24-2007 at 03:45 PM.
Old 10-25-2007, 11:50 AM   #3
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Welcome to LQ.

Thank you for posting the solution, it helps the LQ goal of creating an archive of answers.


automount, multiple, nfs, routes

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple routes Ammad Linux - Networking 3 08-03-2007 07:52 PM
Linux server 2 NICs static routes? lsteacke Linux - Networking 3 07-31-2007 04:17 PM
multiple default routes for dual nics alfman Linux - Networking 1 05-26-2006 09:26 AM
Contacting INTERNAL LAN server via domain name/full IP? STATIC ROUTES? Please Help!! Bungo2000 Linux - Networking 8 06-27-2003 10:27 AM
Multiple routes DavidPhillips Linux - Networking 2 12-03-2001 12:51 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration