LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-15-2006, 10:21 AM   #1
mac1234mac
Member
 
Registered: Sep 2005
Posts: 183

Rep: Reputation: 30
sharing internet connection by three boxes


Hello

I've got problems with installing internet on three boxes.
I've already got internet on two of them. One is Aurox 11.0 Linux and that's where internet gate is (two net adapters, one for internet the other for Win XP), another is Win XP. It's working fine, but I'd want to add third box to this configuration. I added third adapter to Linux box and it has installed fine but when I plug third computer (Win 98) there is no internet on both boxes behind Linux.

Here is my config with two boxes:

10.0.9.12 - IP address required by my provider (eth0)
255.255.255.0 - mask

192.168.0.1 - IP of the card used to connect to Win XP (eth1)
255.255.0.0 - mask


192.168.0.2 - IP of Win XP
255.255.0.0 - mask

now I added third net adapter and gave it following IP:

192.168.0.3 - eth2
255.255.0.0

and configured Win98 adapter as 192.168.0.4

The result is that there is no internet on both XP and 98.
There even is no ping response between Linux and 98.

What's going on?.
In advance, thanks for response.

Cheers
 
Old 09-15-2006, 12:37 PM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Is there a reson that you don't connect all the machines to a single network switch so you don't need 4 nics in the linux machine? They are all on the same 192.168.0 subnet so it would seem logical to hook them up that way.

Also, If you don't mind dedicating the linux machine as router, then you could install a firewall distro like ipcop. It takes the work out of configuring iptables.
 
Old 09-15-2006, 04:23 PM   #3
mac1234mac
Member
 
Registered: Sep 2005
Posts: 183

Original Poster
Rep: Reputation: 30
Yea, I know of shortcommings of my solution but I have no router but I have enough net adapters to do it the way I depicted. I don't mind one (Linux) box having to be turned on to have internet on other boxes but I want to have full-fledged Linux on it. As far as I know IPCop is cut version used only for router purposes.

I have switch (but not installed) but with it I could have internet only on one box, either one or another, never both. Isn't it strange?.
 
Old 09-16-2006, 11:21 AM   #4
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by mac1234mac
..I'd want to add third box to this configuration.
How were you doing your internet sharing earlier with XP box ?

Quote:
Originally Posted by mac1234mac
There even is no ping response between Linux and 98.
*Could possibly be a routing error.//#route -n
*Firewall can also block this.// Check the status of firewall & rules.
*Bad cross cat5/6 UTP network cable or crimping can also result in this.//Check with another cross cable.
*Interchange the ethernet interface for XP & 98 @ linux box.
 
Old 09-30-2006, 12:05 AM   #5
Kahless
Member
 
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

Rep: Reputation: 30
I would set up the hardware this way:



Client1--------|
Client2--------|Switch|-------|Linux-Box|----------{Internet}
Client3--------|



Then using your choice of software, set up IP masquerading, and possibly dhcp on the LAN side of your linux box. What this will do is turn your linux box into a server for your lan, and at the same time make adding more machines later much simpler.... just keep plugging them into your switch until the ports are all full.


Good luck, and if you need more help with the sofware side, or this doesnt make sence, just let us know`

Last edited by Kahless; 09-30-2006 at 12:06 AM.
 
Old 09-30-2006, 10:03 AM   #6
drhart4000
Member
 
Registered: Aug 2006
Distribution: Centos, Fedora, Ubuntu, Slackware
Posts: 51

Rep: Reputation: 15
i think what this guy is tring to accomplish is to setup a home network without breaking down and buying a switch...

wich is fine i don't linke to spend money when i dont HAVE TOO.

what you need to do is bridge the conections.

how did you orriginaly setup the first two nics?

do the third the same way and all should work fine.

eth0 - ip: 10.0.9.12

and i would set all the others to the same ip:
eth1 - 192.168.1.1
eth2 - 192.168.1.1
eth3 - 192.168.1.1

etc..


i beleave this would work if not the just do:
eth1 - 192.168.1.1
eth2 - 192.168.1.2
eth3 - 192.168.1.3

etc...

i've never done this before but i know its possible it just needs to be set right...
after all what do you think routers do... you can surf the web for linux router howtos...
i beleve there is a distro made just for this purpose...

although you can dothis with any linux distro...
you do it by bridging connections and transfering packets using IPtables...

i've been thinking about making a linux firewall/router too... GOOD LUCK...

this might be a helpful source:
http://www.linuxguruz.com/iptables/howto/

Ill help out as much as i can...

Last edited by drhart4000; 09-30-2006 at 10:16 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet connection sharing fdawy Linux - Networking 22 10-06-2005 09:23 AM
ad-hoc connection (and internet sharing) between two linux boxes. A complex question. riccisit Linux - Wireless Networking 1 09-29-2005 09:02 AM
SHaring internet connection bart59 Linux - Networking 1 01-27-2005 07:24 AM
Internet connection sharing enragedchip Linux - Networking 1 03-24-2004 05:43 AM
Internet connection sharing - How to? Byte3 Linux - Networking 2 10-19-2003 11:54 AM


All times are GMT -5. The time now is 07:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration