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

Re: bentley and FC3



On Tue, 2004-12-21 at 16:27, bentley_rhodes wrote:
> i am an ignorant little Linux User, who has dabbled in FreeBSD and 
> Redhat,Mandrake, and Windows.  Bottom line is that i am ignorant and 
> learning.  i might take a programming class to learn how to write some, 
> or something similiar to, shell scripts.  however, here are the answers 
> to the previous letter.

The Windows to UNIX terminology barrier takes a bit.  In fact, several
has stated that its easier to learn UNIX if you don't know much about
Windows.  Here at the Orlando LUG, we had a daughter of a LUG member who
_never_ used Windows until she got to college.  Talk about seeing it in
reverse!  We'd get a kick out of her rhetorically asking, "why does
stupid Windows do this?!"

> i have six 3com ethernet 10/100 or whatever they are, ethernet cards.  
> Four of these are in the Machine downstairs (two for spares).  I have 
> one Linksys ethernet 10/100 card in the machine.   This means i have 
> five cards in the machine downstairs that are purely ethernet cards.  
> the linksys is the internet/ gatekeeper, the 3com's are for home use.

So you do have 5 physical NICs in the system, 4 of the same model. 
Okay.

Now understand that _both_ Linux _and_ NT driver would assign the NICs
in order of _PCI_slot_ -- PCI #1, then #2, etc...  So the 3com card in
the _lowest_ PCI slot is considered the first NIC for that driver, the
next lowest for the second NIC for that driver, etc...  This is not the
OS, but PCI doing this.

> i do not know what you mean by lowest and highest nic aliases.

eth0, eth1, eth2, eth3, eth4

They are "aliased" to the driver (kernel module) in the file
/etc/modprobe.conf.  E.g.,

  alias eth0 3c59x
  alias eth1 3c59x
  alias eth2 3c59x
  alias eth3 3c59x
  alias eth4 tulip

Red Hat's Kudzu should set these up for you.  Again, what eth0 is
depends on what PCI slot it is in.  The lower the PCI slot number, the
lower the alias -- for the _same_ driver.  You have 4 NICs using the
_same_ driver.

> i know what a nic is, i do not know about aliasing.

Aliasing is where you tell the Linux kernel that "eth0" uses driver
"3c59x" (3com) or "tulip" (Linksys).  For example, you _could_ change it
so it was:  

  alias eth0 tulip
  alias eth1 3c59x
  alias eth2 3c59x
  alias eth3 3c59x
  alias eth4 3c59x

And the Linksys would be eth0.  But the other cards will be assigned by
PCI slot number, lowest first.

> Do you mean that the lowest alias would be 0 or 4?

eth0 is lowest/first.  eth4 is highest/last.

> 4 would seem to be higher than 0 to me, but i am ignorant again i work
> in surgery and, sometimes, 0 is bigger than 4.  Usually 4-0 is smaller
> than 0 and 4 is bigger than 0.  Sorry!    I want the machine to
> function foremost as a router.  then as a machine that i can put my
> external usb2.0 hard drive on.  i have already discovered how to use
> the fstab file and parted to partition and make the entries into the
> fstab so i may access the drive at boot without actually having to go
> through /media all the time.

Actually, /media was just introduced to make it easier for users to
access drives.  But that's another story.

> when you say Physical connections to each, i'm confused.  all i know is 
> the following:  eth4 is connected to my aDSL modem.  eth4 is setup for 
> auto DHCP configuration.
> i setup another connection to use eth4 to dial 
> the aDSL modem and reconnect if needed.  so eth4 is physically connected 
> to the internet if i understand correctly.  eth4 works, and i have 
> updated the computer over the internet.

That's good.  Your DHCP devices should be the higher eth# numbers.

> eth3 and eth2 are physically connected to two different computers.

Unless you are ready to subnet your home into 2+ different IP networks,
in addition to the Internet, you probably don't want to do this.  There
are advantages to doing this, but it's probably overkill for what you
want.

Just plug the "Internet" systems eth0 into a switch with _all_ other
systems.

> eth1 and eth0 are not connected to anything, no wires in other words.

I'd always have eth0 as your private LAN IP that connects to the rest of
the systems in your house.  It's easier if eth0 on any "Internet" system
is _always_ a static (fixed) IP.

Then leave eth1-3 without any connections.  Consider removing cards if
you think you will never use them for anything else (DMZ, WLAN, etc...).

> i thought that if i did the eth3 and connected it to my computer,
> then i could automatically connect to the internet through the other
> computer by auto-DHCP'ing to the downstairs computer.

No.  By default, for security reasons, Linux doesn't do this.  It will
not pass DHCP from your ISP to that box, and there is various reasons
for this.  It doesn't matter if you use Linux, Windows, etc...

You must configure this explicitly.  There are several steps.  Look up
"Linux Internet Connection Sharing" in Google.  There are a few steps
involved.  To summarized:

  1.  Come up with an internal LAN IP address scheme.  Setup all NICs
connected to this private LAN with an address in this network.

For your "Internet" system with 5 NICs, physically connect eth0 into the
same hub/switch as all other systems.  Give eth0 a _static_ (fixed) IP
address.

  2.  From the menu, select "System Settings -> Security Level"

Make sure the Firewall is "Enabled" and select "eth0" as a trusted
device and _no_ others.  Click OK when done.

  3.  You must append a "POSTROUTING" rule to the "NAT" table of the
kernel Netfilter stack (it does all that fancy routing stuff ;-)

This basically tells Linux how to translate the private LAN IPs into
public Internet ones.  Here's an example set of rules (enter at the
command line as root):  

  /sbin/iptables --flush -t nat
  /sbin/iptables --table nat --append POSTROUTING \
     --out-interface eth4 -j MASQUERADE
  /sbin/iptables --append FORWARD --in-interface eth0 -j ACCEPT

Add those lines to the file "/etc/rc.d/rc.local" so they are run at
startup.

  4.  When you are ready to try it all (enter at the command line as
root):  

  echo 1 > /proc/sys/net/ipv4/ip_forward

Also add those lines to the file "/etc/rc.d/rc.local" so they are run at
startup.
  
> However, i'[m thinking i have to supply IP address,subnet address,
> and default gateway address.

Yes.  You will need to setup IP addresses on all the other systems with
private IPs, and then use the private IP address on the "Internet"
system's eth0 as the "default gateway" for each.

> i do not know if the IP address and the Default gateway address need
> be the same or not, 

IP Addresses must _always_ be unique on a network.  Never forget that
rule.  ;->

The Default Gateway address will be the IP address of the "Internet"
system's eth0.

> for instance 192.168.0.1 or if the IP be *.*.0.2 and the gateway *.*.0.1

If you decide your private LAN subnet will be network/netmask
192.168.0.0/255.255.255.0, then pick something for the "Internet"
system's eth0.  E.g., 192.168.0.254.  That is now the "default gateway"
for _all_ other systems.

Now pick something _else_ for _each_ of the system.  Set their "default
gateway" to the "Internet" system's eth0.

> i was reading in the DUMMIES book that the gateway upstairs needs to 
> match my IP downstairs.  but it never mentioned what the IP upstairs was 
> supposed to be.

It means the IP address of the "Internet" system's eth0, which is the
wire that is connected to the hub/switch of all other, private LAN
systems.

> i'm starting to think i should attend some of these meetings and see 
> whats going on!

This isn't really Linux-specific, it's basic Internet Protocol (IP)
networking.  If you want a Linux distro designed _specifically_ for
this, check out IPCop:  
  http://www.ipcop.org/  

A brief intro article to IPCop 1.3 is here (fairly applicable to IPCop
1.4):  
  http://www.samag.com/documents/sam0402a/  


-- 
Bryan J. Smith                                    b.j.smith@ieee.org 
-------------------------------------------------------------------- 
Subtotal Cost of Ownership (SCO) for Windows being less than Linux
Total Cost of Ownership (TCO) assumes experts for the former, costly
retraining for the latter, omitted "software assurance" costs in 
compatible desktop OS/apps for the former, no free/legacy reuse for
latter, and no basic security, patch or downtime comparison at all.




-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.