"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) Two Node Network: How

From Rich on Sun, 30 Jan 2000

Answer guy

I have looked everywhere for some basic instructions on setting up a two system soho network and can't seem to find any information.

I am currently running linux-mandrake 7.0. Basically all I want to do is have the two machines talk to one another in a network configuration. Any help would be greatly appreciated.

Thanks Rich

(!) Let's assume that you have ethernet cards in your two machines. You can then hook them up with a "crossover" cable or you can get a hub and plug both of your systems into that. Most ethernet cards and hubs have little lights on them. Some combination of these lights being on should reassure you that you've successfully connected to two systems.
That takes care of the physical layer. If you don't get that far then you'll need some phone or in person support.
Next you have to configure the two systems to talk to one another.
I'm going to guess that they are both Linux boxes. I'm also going to guess that you don't have a block of "real" IP addresses assigned to you. Therefore you're going to use a couple of addresses from one of the special "reserved blocks" that are set aside for this situation. The reserved blocks are defined in RFC 1918 (an Internet standards document). They are:
192.168.*.*
10.*.*.*

and: 172.16.*.* through 172.31.*.*
... that's a lot of addresses to choose from. I'm going to choose 192.168.130.17 and 192.168.130.18 for deeply mystical reasons. (192.168 are the "class C" address blocks, which are normally used by small to medium offices, and this is 1/30/2000, so I picked 130 for the next digit. The 17 and 18 are chosen because it is common convention to reserve the bottom and top 16 or so IP addresses in any class C block for routers, servers, etc).
So on one one of these twins (let's call it pollux) we'll log in as root and type the command:
ifconfig eth0 192.168.130.17
... and, on the other (which we'll call it castor) we'd issue the command:
ifconfig eth0 192.168.130.18
For a temporary connection that's all we have to do. If we these two systems to be persistently configured for this we edit some file under /etc/sysconfig/network-scripts ... or we use one of Mandrake's little configuration "helper" programs.
I haven't been using Mandrake (or recent versions of Red Hat) and I've never been a fan of GUI configuration tools. So I can't help you with the latter of these. If you are familar with basic text editing then look at the /etc/sysconfig/network-scripts/ifcfg-eth0 script and see if you can guess what needs to be put in there.
You can use a netmask of 255.255.255.0 and a broadcast address of 192.168.130.255 on both of the twins. In fact there are many values you could use for these --- so long as they were consistent with one another and some other arcane rules that I won't cover this morning.
I't also possible for you to connect these to system over a null modem or a "Laplink" (parallel link) cable.
If you were using a serial/null modem cable you'd run the PPP program (direct connection). I definitely don't have time to explain configuring PPP right now; that's the most complicated option. If you connected the two boxes with a parallel link cable you'd use commands roughly like this:
modprobe plip
ifconfig plip1 192.168.130.17
(on pollux) and
modprobe plip
ifconfig plip1 192.168.130.18
... for castor.
Notice that we can use the same IP addresses for our two boxes regardless of what sort of physical connection we use between them. That's the whole point of TCP/IP networking. That was the breakthrough that it made before any of the other networking protocols did.
Once you've done this you should be able to use any standard networking service between your twins.
I'm pretty sure this is covered in the "Linux Installation and Getting Started Guide" (Linux Documentation Project) http://www.linuxdoc.org.
Hope that helps.


Copyright © 2000, James T. Dennis
Published in The Linux Gazette Issue 51 March 2000
HTML transformation by Heather Stern of Tuxtops, Inc., http://www.tuxtops.com/


[ Answer Guy Current Index ] [ Index of Past Answers ] greetings 1 2 3 5
5 6 7 8 9
10 11 12 13 14 15 16 17
18 19 20 21 22


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Linux Gazette FAQ ] [ Next Section ]