[Sussex] Setting up a simple home network

Steve Dobson steve at dobson.org
Sat Apr 30 08:41:14 UTC 2005


Hi Captian

On Sat, 2005-04-30 at 09:06 +0100, Captain Redbeard wrote:
> OK, so I got the switch and the proper cables, and I've 
> plugged my two Slackware 10.1 boxes into it - now what. 
> I've been trying to get the two machines to talk to each 
> other but so far failing miserably, why?  Here's what I've 
> done so far:
> 
> I have currently two machines on the network (but once it's 
> up and running I plan to add two or three more), the faster 
> one which will eventually be the server is called 
> templeofthebeard while the slower one is called 
> shrineofthebeard.  The network itself, for want of a better 
> term, is called homenet.  Neither of these is yet connected 
> to the Internet so until I get them going my connection is 
> via <cringe> an Win XP laptop </cringe>.  I've created a 
> directory called /home/public on templeofthebeard (the 
> server) which had global read and write privileges which I 
> want shrineofthebeard (the client) to be able to access. 
> The /etc/hosts on both machines looks like this (minus 
> commented lines):
> 
> 
> 127.0.0.1           localhost
> 
> 192.168.0.1    shrineofthebeard.homenet shrineofthebeard
> 192.168.0.2    shrineofthebeard.homenet shrineofthebeard
> 

Not quite right.  It should read something like this:

127.0.0.1	localhost
192.168.0.1	machine-name-1
192.168.0.2	machine-name-2

Each machine must have a unique name one your network.

> I've run "netconfig" on both machines and given them the 
> data listed above and also told it that there are both 
> connected via static IP, the netmask is 255.255.255.0 
> (though I have no idea what this actually means) have no 
> gateway address, and are not using a nameserver.  Then I ran 
>   "ifconfig" on both machines.  The client reported this for 
> eth0:
> 
> 
> Link encap:Ethernet  HWaddr 00:60:6E:36:DE:94
> inet addr:127.0.0.11  BCast:127.0.0.255  Mask:255.0.0.0
> UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
> Interrupt:10  Base address:0xda00

You haven't configured the Network Interface Cards (NIC)
on the machines.

If you try "ifconfig -a" you should see an entry for the NIC (eth0).
If not then the network cards are not supported or you haven't
got the right network driver loaded into the kernel.

If you see an entry then try this (on machine-name-1):
ifconfig eth0 192.168.0.1 netmask 255.255.0.0 broadcast 192.168.255.255

and this (on machine-name-1):
ifconfig eth0 192.168.0.2 netmask 255.255.0.0 broadcast 192.168.255.255

Then should then be able to talk to one another.
Try a broadcast ping which should get every machine on your network to
respond:

ping 192.168.255.255


> As well as an entry for lo.  Note that the inet 
> addr:127.0.0.11 comes from an earlier attempt to get the 
> machines configured when I tried to call them 127.0.0.10 and 
> 127.0.0.11 before discovering that they should be numbered 
> 192.168....  On the server the output is very similar except 
> that the line starting "inet addr:" is missing and TX bytes 
> is given the figure of 1180.  Does this mean anything in 
> particular?  Other than that this seems to mean that the 
> hardware is running and configured and as all the relevant 
> lights show up on the switch I *assume* this means that the 
> hardware is configured correctly.  Now what?
> 
> Up to now my main info source has been "The Official Guide 
> To Slackware Linux" at http://www.slackware.com/book/.  Any 
> other books and HOW-TO's I found were all either 
> distro-specific or assumed I was connecting my computer to 
> the Internet, which I will be but not yet.  So now we're up 
> to the section "The /etc files" in chapter 5.  I changed 
> /etc/hosts as listed above /etc/inetd.conf, 
> /etc/rc.d/rc.inet1 and /etc/rc.d/rc.inet2 didn't seem like 
> they needed any configuration so I left them as the default 
> while /etc/resolv.conf now looks like this on both machines:
> 
> 
> search homenet
> domain homenet

You only need this to work with DNS.  As you haven't got networking
working yet, I doubt you're ready for DNS yet, and on a simple two
machine network you don't need it.  The entries in /etc/hosts is much
easier to maintain.

> So the next chapter told me I needed to have the services 
> portmap, nfsd, and mountd running on the server.  I tried 
> "ps -A" and did not find any such entries and typing the 
> names directly into bash gave me a "command not found" 
> error.  So after a brief search with the locate command I 
> found and ran rpc.portmap, rpc.nfsd and rpc.mountd so they 
> do now appear in the list when i type "ps -A".  I'm 
> *assuming* that these are the equivalent files.  Next I 
> added the following line /etc/exports:

This is advanced stuff.  If you can't get the two machine to ping
each other, then don't worry yet about protocol and remote mounting
of files.  This maybe want you want, but learn to stand up before you
try and run.

Steve





More information about the Sussex mailing list