Complete.Org: Mailing Lists: Archives: linux-help: July 2000:
[linux-help] Re: Can't set up network
Home

[linux-help] Re: Can't set up network

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Re: Can't set up network
From: "Wayne M. White" <WWHITE1@xxxxxxxxxxx>
Date: Fri, 14 Jul 2000 07:55:38 -0500
Reply-to: linux-help@xxxxxxxxx

At 10:46 PM 7/13/00 , you wrote:


Jonathan Hall wrote:

> Why do you have two NICs if you're only using one?

You guessed it at the tail of your message - I want the linux box #1 to become a firewall/server. The eth1 card can be ignored for now - it has no cable on it. If I move the modem to eth1, I lose all internet access - well, I guess I would still
have it on box #1.

Allow me to have a go at this. I think what you want to do is connect eth0 of the
Linux machine that you want to firewall/gateway through to the modem. Then
connect eth1 to the hub. By connecting the modem and all of the computers to
the hub you are allowing each machine to log in and get a IP via the hub. You
can then masquerade Linux #2 and Windows#1 through Linux#1.

On my net I give each machine a static IP for the network and the gateway machine
uses DHCP to acquire an IP from RR. You can load up your /etc/hosts file with
the IPs and names of the various machines and you're in business.


Eth0 on box #1 and Eth0 on box#2 and the windows box are all hooked to the hub. All three can access the internet (through the hub) so it seems logical that they
should be able to speak to each other.

>
> Naturally, the IP address of eth1 will not be pingable thru eth0 unless the
> Linux box is set up as a gateway *AND* the other boxes know to use it as a
> gateway.
>
> Imagine a city block with three houses, each with their own respective
> addresses.... 100 Somestreet, 101 Somestreet and 102 Somestreet.
>
> One of the houses has a backdoor leading to the alleyway.... address 200
> Otherstreet.
>
> Someone trying to find 200 Otherstreet when they're driving down Somestreet
> will get lost.
>
> It sounds like your Linux box has two addresses... the one from RR
> (24.x.x.x) and a private one on eth1 (192.x.x.x).  The reason the other
> boxes cannot ping the 192.x.x.x address is b/c they're on the wrong
> "street"... or, in real-world terms, they're on a different physical
> network.

The two networks can't co-exist. You must separate them by getting the modem
off of the hub. Then you have two separate networks. Your local network
around the hub and the internet via the gateway machine.

>
> You either need to give eth0 the 192.x.x.x address, *OR* (usually
> preferable), plug eth1 into the hub, and use the Linux box as a gateway to
> the 'net (I assume this is what you're trying to accomplish in the longrun
> anyway).
>
> Let me know if I've totally confused you by now... :-)
>

No, I think you cleared something up.  I set up eth0 on both linux boxes to
192.168.1.10 and 192.168.1.12 using netconf. But when I boot up, they both change
to something like 24.92.x.x.  The 192.168 addresses disappear.

This is because they are logging onto RR vis the hub. DHCP will reset your IP to the assigned one every time. Your firewall box has to be between your network and
the modem. Now, you could use the firewall box as a DHCP server and let it
assign IPs to each of the other machines on the network, however I have found
it much simpler, on a small network, to just use static IPs.


15 minutes later: I switched the cables around. Hoorah! I can ping and telnet from box 1 to box2 and box 2 to box 1. Now I need to figure out windows and how to
get mail and internet through the linux box to windows.

Thanks, Jon

With the above described setup each machine will be able to ping each of the
other machines on the network via the network. Each will be able to access the
internet via the firewall/gateway machine. What you're after is an IP Masquerade
setup. That how-to is very helpful, even to setting up the Windows machine.

I hope I haven't just confused things. What you're after is a very nice setup. I run three to five machines on my local network and we can all access the internet
concurrently.

Good luck,

wayne



-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]