[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wish to network my home computers but don't know Jack about it



On Fri, Dec 19, 2003 at 02:45:19PM -0600, Cybe R. Wizard wrote:
> On Fri, 19 Dec 2003 10:37:03 -0700
> "Monique Y. Herman" <spam@bounceswoosh.org> wrote:
> 
> > Maybe a dense question here, but what type of networking support are
> > you looking for?  ftp? ssh/scp? smb?  Will you be providing an
> > internal dns server?  What is the connection to your home, and are you
> > planning on having all machines connect to the outside world?
> > 
> > ...
> 
> As the subject indicates, I am completely uneducated about networking. 
> I have a dial up account so will probably not share that, just use at
> whichever computer is in use.  I think I am looking for a home LAN(?) to
> allow all my family computers to speak to each other/access files from
> one another, and print to any of their individual printers.  If it's
> possible to have one computer do the dial up and others to use that
> connection through the local network, that would be wonderful, but I
> ...

Rusty,

Linux (any unix) is a very networkable operating system, and it's really
not that difficult to have a small home network access the Internet
through a single dial-up connection.  If you make the dial-up connection
on your Linux host, that'll give you an interface (probably named ppp0)
with an IP address assigned by your internet service provider.  On the
same machine, install an ethernet card (it likely will be built in on
any reasonably recent computer) for your private network, and assign it
address 192.168.1.1 (configured in /etc/network/interfaces).  Connect
the ethernet port to a hub or switch; all the other machines can connect
to that hub/switch as well, and that will be your private subnet.

For a small number of hosts you can just manually assign IP addresses
to the other computers (running a dhcp server is only slightly more
"advanced"), recognizing that the *network* address is 192.168.1.0 (the
trailing 0 means that this IP is a network and not a host), the net mask
is 255.255.255.0, and the gateway is (or will be, when you get things
working) your linux host, 192.168.1.1.  Just choose a different host
number for each machine, e.g., 192.168.1.2, 192.168.1.3, etc.

At this point you should be able to "see" each machine on the private
network, i.e., you can ping any of the machines, access web pages if
you've got any webservers running, etc..  The private network is entirely
separate from the Internet connection, so should work regardless of
whether you've dialed-up or not, and should be sufficient for the Windows
machines to see each other, share printers, etc.  Getting the linux host
to work with the Windows ones to share files, printers, etc., is the
domain of Samba, and is a separate issue from the base networking setup.

For convenience, you can define names for the set of machines on your
network in /etc/hosts, and in corresponding files hidden somewhere in
the depths of the Windows machines.

Network address translation, aka NAT or masquerading, is the key to having
the local machines access the Internet through your dial-up gateway.
This is handled by the kernel, and works remarkably well and easily.
I'd highly recommend using the Shorewall firewall to get that working
(follow the instructions for a "Two Interface System"), but it's possible
to do it without any additional software.   The linux host's routing
table (man route) directs incoming packets on the local net (probably on
interface eth0) to the Internet-at-large, and visa versa, as needed.

At this point, your local machines should be able to "see" hosts on the
Internet when addressed by ip number; i.e., you can ping remote hosts,
access web pages, etc.  Being able to use names instead of numbers means
getting name resolution working.  This should already work on the dial-up
host, as that is normally set up automatically by the ppp system.  To 
get dns working on the other machines, the simplest thing may be to copy
the domain name server (DNS) numbers defined in /etc/resolv.conf to the
appropriate places in the network interface setup on the other machines.


> At the same time, I have a daughter in college who will likely come home
> and want to have the internet access at the same time as I.  Perhaps I

Just set up her ethernet interface the same way as the other local machines,
i.e., assign a unique number on the local subnet, set the gateway to the
dial-up host, and set the dns numbers.  Alternatively, get a DHCP server
running on the linux host to do all that automatically, and then just set
those machines to "automatic" or "dhcp".


> should look at broadband sharing, too, even though I won't use it yet?

Broadband and dial-up differ in speed and the details, but make no difference
in how your local network is set up.


> Are the two kinds of network (local and shared internet) available
> together in one box?  Can it share dial up?  (Likely danged slow)

Each network is supported on a single "interface" on a linux host,
usually ppp0 for the dial-up and eth0 for the local ethernet.  Run 
/sbin/ifconfig to view these interfaces; you should see a valid Internet
address assigned to you under the entry for ppp0, and your local network
address under eth0.  (There'll also be the "loopback interface", lo, which
allows your linux box to talk to itself using the same networking routines
in the kernel.)


> I'm starting to feel as if I've not done sufficient googling.

I'd highly recommend killing a tree and getting a decent book on the 
basics of networking... can't find my old reference, and it doesn't
seem to show up on google/oreilly/amazon, but something like "Network
Administration for Unix". 

Ken

-- 
Ken Irving, Research Analyst, fnkci@uaf.edu, 907-474-6152
Water and Environmental Research Center
Institute of Northern Engineering
University of Alaska, Fairbanks



Reply to: