old-www/HOWTO/Home-Network-mini-HOWTO-2.html

65 lines
3.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Red Hat Linux 6.X as an Internet Gateway for a Home Network: Plugging Things In</TITLE>
<LINK HREF="Home-Network-mini-HOWTO-3.html" REL=next>
<LINK HREF="Home-Network-mini-HOWTO-1.html" REL=previous>
<LINK HREF="Home-Network-mini-HOWTO.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="Home-Network-mini-HOWTO-3.html">Next</A>
<A HREF="Home-Network-mini-HOWTO-1.html">Previous</A>
<A HREF="Home-Network-mini-HOWTO.html#toc2">Contents</A>
<HR>
<H2><A NAME="s2">2. Plugging Things In</A> </H2>
<P>Depending on whether you are using a hub or not, your network topology
will differ slightly. I am only covering networking with RJ45 cabling (the
stuff that looks like phone cables on steroids) and not covering thin coax.
With thin coax you can network multiple machines without requiring a hub, but
have to be more careful about terminating connections and so on. If you know
networking already, these instructions will be largely redundant.
<H2><A NAME="ss2.1">2.1 With a Hub</A>
</H2>
<P>If you have a hub, your network will look like
<A HREF="http://www.coastnet.com/~pramsey/linux/w_hub.gif">this</A>.
<P>Connect the <CODE>eth0</CODE> card on the Linux box to the cable modem or ADSL box using
the cable supplied by the service provider during their install (or one you
know works in that configuration. This is important because sometimes cable
modems like to be connected with a crossover and sometimes they like a straight-through
through cable: the one the company gives you is the one you want to use.
<P>Connect the <CODE>eth1</CODE> card on the Linux box to the hub with a straight-through
cable. Connect all your other computers to the hub with straight-through cables.
<H2><A NAME="ss2.2">2.2 Without a Hub</A>
</H2>
<P>If you do not have a hub, you can still connect one computer to your Linux
box, using a crossover cable. Your topology will look like
<A HREF="http://www.coastnet.com/~pramsey/linux/wo_hub.gif">this</A>.
<P>Connect the <CODE>eth0</CODE> card on the Linux box to the cable modem or ADSL box using
the cable supplied by the service provider. Connect the <CODE>eth1</CODE> card on the Linux
box to the other computer with a crossover cable.
<H2><A NAME="ss2.3">2.3 With Only One Network Card</A>
</H2>
<P>This is not a recommended configuration (in this configuration your internal
and external networks are on the same physical network, and are therefor theoretically
more susceptible to cracking; in reality, the risk is probably very low), but
it <EM>can</EM> be done. Your mileage may vary.
<P>The Linux kernel includes support for "IP aliasing", which allows an ethernet
card to service two different IP addresses simultaneously. The stock kernels
shipped with Red Hat and Mandrake include support for IP aliasing by default.
To set up your gateway with only one ethernet card, in all the subsequent code
examples, simply replace <CODE>eth1</CODE> with <CODE>eth0:0</CODE>.
<P><EM>In a single-card situation, running a DHCP server is </EM>not<EM> recommended.</EM>
<P>Plug all your machines and your cable modem or ADSL box into the hub. Cross
your fingers and continue.
<HR>
<A HREF="Home-Network-mini-HOWTO-3.html">Next</A>
<A HREF="Home-Network-mini-HOWTO-1.html">Previous</A>
<A HREF="Home-Network-mini-HOWTO.html#toc2">Contents</A>
</BODY>
</HTML>