old-www/LDP/LG/issue51/tag/6.html

263 lines
9.3 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.3C.e">
<TITLE>The Answer Guy 51: Two Node Network: How</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Guy</font>
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
LinuxCare,
<A HREF="http://www.linuxcare.com/">http://www.linuxcare.com/</A>
</H4>
</center>
<p><hr><p>
<!-- endcut ======================================================= -->
<!-- begin 6 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>Two Node Network: How</H3>
<p><strong>From Rich on Sun, 30 Jan 2000
</strong></p>
<!-- ::
Two Node Network: How
~~~~~~~~~~~~~~~~~~~~~
:: -->
<P><STRONG>
Answer guy
</STRONG></P>
<P><STRONG>
I have looked everywhere for some basic instructions on setting up a two
system soho network and can't seem to find any information.
</STRONG></P>
<P><STRONG>
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.
</STRONG></P>
<P><STRONG>
Thanks
Rich
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
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.
</BLOCKQUOTE>
<BLOCKQUOTE>
That takes care of the physical layer. If you don't
get that far then you'll need some phone or in person
support.
</BLOCKQUOTE>
<BLOCKQUOTE>
Next you have to configure the two systems to talk
to one another.
</BLOCKQUOTE>
<BLOCKQUOTE>
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:
</BLOCKQUOTE>
<BLOCKQUOTE><BlockQuote><code>
192.168.*.*
<br>10.*.*.*</code>
<br>and: <tt>172.16.*.*</tt> through <tt>172.31.*.*</tt>
</BlockQuote></BLOCKQUOTE>
<BLOCKQUOTE>
... 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).
</BLOCKQUOTE>
<BLOCKQUOTE>
So on one one of these twins (let's call it pollux)
we'll log in as root and type the command:
</BLOCKQUOTE>
<BLOCKQUOTE><BlockQuote><Code>
ifconfig eth0 192.168.130.17
</Code></BlockQuote></BLOCKQUOTE>
<BLOCKQUOTE>
... and, on the other (which we'll call it castor)
we'd issue the command:
</BLOCKQUOTE>
<BLOCKQUOTE><BlockQuote><Code>
ifconfig eth0 192.168.130.18
</Code></BlockQuote></BLOCKQUOTE>
<BLOCKQUOTE>
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 <TT>/etc/sysconfig/network-scripts</TT>
... or we use one of Mandrake's little configuration
"helper" programs.
</BLOCKQUOTE>
<BLOCKQUOTE>
I haven't been using Mandrake (or recent versions of
<A HREF="http://www.redhat.com/">Red Hat</A>) 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 <TT>/etc/sysconfig/network-scripts/ifcfg-eth0</TT> script
and see if you can guess what needs to be put in there.
</BLOCKQUOTE>
<BLOCKQUOTE>
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.
</BLOCKQUOTE>
<BLOCKQUOTE>
I't also possible for you to connect these to system
over a null modem or a "Laplink" (parallel link) cable.
</BLOCKQUOTE>
<BLOCKQUOTE>
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:
</BLOCKQUOTE>
<BLOCKQUOTE><BlockQuote><Code>
modprobe plip
<Br>ifconfig plip1 192.168.130.17
</Code></BlockQuote></BLOCKQUOTE>
<BLOCKQUOTE>
(on pollux) and
</BLOCKQUOTE>
<BLOCKQUOTE><BlockQuote><Code>
modprobe plip
<br>ifconfig plip1 192.168.130.18
</Code></BlockQuote></BLOCKQUOTE>
<BLOCKQUOTE>
... for castor.
</BLOCKQUOTE>
<BLOCKQUOTE>
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.
</BLOCKQUOTE>
<BLOCKQUOTE>
Once you've done this you should be able to
use any standard networking service between your
twins.
</BLOCKQUOTE>
<BLOCKQUOTE>
I'm pretty sure this is covered in the "Linux Installation
and Getting Started Guide" (Linux Documentation Project)
<A HREF="http://www.linuxdoc.org"
>http://www.linuxdoc.org</A>.
</BLOCKQUOTE>
<BLOCKQUOTE>
Hope that helps.
</BLOCKQUOTE>
<!-- sig -->
<!-- end 6 -->
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2000, James T. Dennis
<BR>Published in <I>The Linux Gazette</I> Issue 51 March 2000</H5>
<H6 ALIGN="center">HTML transformation by
<A HREF="mailto:star@tuxtops.com">Heather Stern</a> of
Tuxtops, Inc.,
<A HREF="http://www.tuxtops.com/">http://www.tuxtops.com/</A>
</H6>
<P> <hr> <P>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<TABLE WIDTH="95%"><TR VALIGN="center" ALIGN="center">
<TD colspan="2" rowspan="2"><A
HREF="../lg_answer51.html"
><IMG SRC="../../gx/dennis/answernew.gif"
ALT="[ Answer Guy Current Index ]"></A>
<TD colspan="2" rowspan="2"><A
HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answertoc.gif"
ALT="[ Index of Past Answers ]"></A></td>
<TD WIDTH="11%"><A HREF="../lg_answer51.html#greeting"><img
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A></TD>
<TD WIDTH="11%"><A HREF="1.html">1</A></TD>
<TD WIDTH="11%"><A HREF="2.html">2</A></TD>
<TD WIDTH="11%"><A HREF="3.html">3</A></TD>
<TD WIDTH="11%"><A HREF="4.html">5</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="11%"><A HREF="5.html">5</A></TD>
<TD WIDTH="11%"><A HREF="6.html">6</A></TD>
<TD WIDTH="11%"><A HREF="7.html">7</A></TD>
<TD WIDTH="11%"><A HREF="8.html">8</A></TD>
<TD WIDTH="11%"><A HREF="9.html">9</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="10%"><A HREF="10.html">10</A></TD>
<TD WIDTH="10%"><A HREF="11.html">11</A></TD>
<TD WIDTH="10%"><A HREF="12.html">12</A></TD>
<TD WIDTH="10%"><A HREF="13.html">13</A></TD>
<TD WIDTH="11%"><A HREF="14.html">14</A></TD>
<TD WIDTH="11%"><A HREF="15.html">15</A></TD>
<TD WIDTH="11%"><A HREF="16.html">16</A></TD>
<TD WIDTH="11%"><A HREF="17.html">17</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="10%"><A HREF="18.html">18</A></TD>
<TD WIDTH="10%"><A HREF="19.html">19</A></TD>
<TD WIDTH="10%"><A HREF="20.html">20</A></TD>
<TD WIDTH="10%"><A HREF="21.html">21</A></TD>
<TD WIDTH="11%"><A HREF="22.html">22</A></TD>
</TR></TABLE>
</TR><TR VALIGN="center" ALIGN="center">
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<P> <hr> <P>
<!-- begin lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<A HREF="../index.html"
><IMG SRC="../../gx/indexnew.gif" ALT="[ Table Of Contents ]"></A>
<A HREF="../../index.html"
><IMG SRC="../../gx/homenew.gif" ALT="[ Front Page ]"></A>
<A HREF="../lg_bytes51.html"
><IMG SRC="../../gx/back2.gif" ALT="[ Previous Section ]"></A>
<A HREF="../../faq/index.html"
><IMG SRC="../../gx/dennis/faq.gif"
ALT="[ Linux Gazette FAQ ]"></A>
<A HREF="../lg_tips51.html"
><IMG SRC="../../gx/fwd.gif" ALT="[ Next Section ]"></A>
<!-- end lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<!--endcut ========================================================= -->