[olug] NFS & @Home Networking

Nick Walter waltern at iivip.com
Mon Aug 6 19:06:33 UTC 2001

Depending on how much money you are spending for your second IP address from
Cox, adding a little hardware could save you a few $$ :)  You can split your
internet and local traffic with the addition of one 10mb NIC.  I can usually
pick up 10mb NIC's for 10 dollars.

Here's what you do:

Add the second network card to one linux box, I'd use the more powerful main
box.  Configure one network card with your primary IP /netmask from Cox, and
connect it to the cable modem, just like you did when you only had one
computer.  Configure the other network card for IP address with
netmask  Re-configure the other linux machine to have an IP
address of netmask  Connect the two linux
machines together with the 192.168.0.X NIC's, probably running through your
hub.  Remember to associate a name with each of these 192.168.0.X IP
addresses in each machines /etc/hosts file.

A setup like this will allow you to do local networking between the two
machines on the 10mb network, and also let your main linux machine talk to
the internet via the cable modem.

If you want BOTH machines to be able to talk to the internet, you need to
set up the main server as a masquerading router.  This is easier than it
sounds.  Basically just make sure that the file
/proc/sys/net/ipv4/ip_forward contains a 1.  This will enable routing.  If
there's a zero in that file, you can enable routing with the command "echo 1

Once you have routing enabled, turn masquerading on using ipchains.  If you
are running a 2.4 kernel you can use iptables for this also.  A sample
command would be "ipchains -A forward -s -d -j MASQ".
After this, make sure that your main server has the default route set that
your cable modem normally uses, and make sure the secondary linux server has as it's default router.  Now all the traffic from your secondary
linux computer should be routed through your primary one and up to the
internet.  Notice you don't need a second IP address from Cox for this
setup, so see if you can get your money back on that :)

I've glossed over a lot of technical details in the interest of keeping my
suggestion brief.  I can provide further clarification if any step is
proving particularly troublesome.  Also, the following HOWTOs provide good



Nick Walter

-----Original Message-----
From: Joe Vernon [mailto:jv80123 at hotmail.com]
Sent: Monday, August 06, 2001 1:44 PM
To: olug at bstc.net
Subject: [olug] NFS & @Home Networking

I've been using Linux for about 2 years now, but I don't have very much
experience with networking, mainly because I only had one computer. Recently
I did pick up a second PC. Setting up @Home was a breeze. I purchased a
second IP address from Cox, I got an old 10 MBit hub from a friend who
didn't need it, and I had it working very quickly. I then wanted to set up
some NFS shares between the 2 machines. I read the NFS howto and I managed
to set everything up without much trouble. My problem is that whenever I
send anything back and forth with NFS it seems to be going through the
internet as I am getting stuck with @Home's 256 Kbit upload cap which is
painfully slow for large files. How do I make this NFS traffic stay local
and use the full 10 Mbit transfer speed? I would imagine this involves
setting up some type of local IP addresses. Can this be done without adding
more NIC cards? I know the cards are cheap but I would really like to avoid
adding any new hardware if possible.

Thanks in advance for any help

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

To unsubscribe, e-mail: olug-unsubscribe at bstc.net
For additional commands, e-mail: olug-help at bstc.net

To unsubscribe, e-mail: olug-unsubscribe at bstc.net
For additional commands, e-mail: olug-help at bstc.net

More information about the OLUG mailing list