LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-30-2003, 04:35 PM   #1
gr8razorx
LQ Newbie
 
Registered: Nov 2003
Posts: 12

Rep: Reputation: 0
3 PCI Network Cards....... 2 For Home computers and 1 for an Cable Modem


I have managed to get 2 of them working the internet link and one home computer.. But to get all three of them working at the same time has proved impossible. I am using Mandrake 9.2 and I have configured everything using harddrake. A very nifty program nonetheless, but i cannot get internet sharing working on the 2 home computer just the one. I have two windows boxes and the linux box which my internet runs to..

Now i can get all the network cards up and running but the last one on the line of them has a LINK but there is never activity. This is odd but the way i have it set up now it




internet---------linuxbox-------first windows box-----------second windows box
I have the second windows box hooked to my first one through internet sharing....


I need it so that i can plug windows box 1 and windows box 2 directly into linux box and have both the windows box share of the linux box with the internet connection....

I am using webmin to do everything.. Is there a possibility of webmin and mandrakes personal tools of messing eachother up?
 
Old 11-30-2003, 06:03 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Is there a reason why you're not using a switch or a hub to share the connection? You can plug a cable from the Linux box into the uplink port on a switch, then plug both Windows boxes into the switch. As long as you have NAT configured correctly on the Linux box, and you don't have any IP conflicts on the NICs plugged into the switch, and they're all on the same IP network, you should be set.

By the way, perhaps the problem is DNS? You might have have DNS configured correctly on one of the Windows boxes so it might seem like it can't get to the Internet simply because you can't resolve any DNS names. Try testing connectivity using IPs (i.e. ping 216.239.57.99 instead of ping google.com).
 
Old 11-30-2003, 06:09 PM   #3
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
The NIC that has no activity, does the system see it? If so, can you simply ping from the Windows machine to the Linux box?
 
Old 11-30-2003, 06:20 PM   #4
gr8razorx
LQ Newbie
 
Registered: Nov 2003
Posts: 12

Original Poster
Rep: Reputation: 0
I am not using a router or a switch because I figured i could run the internet feed to the 2 separate lan'd computers through network cards.. Sorta like a bridge i guess.. but i figure it should be easy to hook 2 nics up to 2 different computer and then 1 internet nic and share the internet link to the two other computers. The system does see the non active nic card and says it is up but there is no activity on it.. no packets sent or anything it is wierd.
 
Old 11-30-2003, 06:21 PM   #5
gr8razorx
LQ Newbie
 
Registered: Nov 2003
Posts: 12

Original Poster
Rep: Reputation: 0
i think i shall try foing pings through i.p and not through hostnames.. and see what happens if it does work then i guess I will no the problem hehe
 
Old 11-30-2003, 06:51 PM   #6
dubman
Member
 
Registered: Jan 2003
Distribution: Redhat 9, Fedora Core 1, Suse 8
Posts: 188

Rep: Reputation: 30
I would suggest getting yourself a switch ($19.99), and setting up the linux system as a router/firewall. This is a much better way to accomplish what you want, not to mention far more secure. What would happen if PC3 tried to connect when PC2 was turned off? It wouldnt. Time for a Switch.

--hope this helps
 
Old 11-30-2003, 07:18 PM   #7
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Ooh, I know what the problem is. It became clear to me after I thought about it. You need to set the netmask specially each of the "LAN" NICs. Normally when you setup Internet sharing you're sharing the outside NIC with an entire LAN network, which is reachable via one NIC. In this case you're expressly NOT sharing it with a network, you're sharing it with exactly two hosts.

What probably happened when you ran the Internet sharing wizard on Mandrake was that it assigned the whole 192.168.0.0/16 (or /24) to the first LAN NIC. Now you plug in a second computer with an IP on the same network (say your second Windows box has 192.168.0.4) and your Linux box is trying to reach that IP via the logical place, eth1 (plugged into the first Windows box) because you told Mandrake that all of 192.168.0.0/16 were available via LAN NIC one.

Ironically, it would have been much more simple to go with the switch configuration. However, you can still make this odd setup work (I would suggest going with a switch for your LAN and reserving the third network card for a future DMZ instead).

Below I'll use examples. For the sake of the example, let's pretend that your ISP uses 2.0.0.0/8 and the IP you get is from that netblock.
eth0 = 2.0.0.100
eth1 = 192.168.0.1
eth2 = 192.168.0.5
Win1 = 192.168.0.2
Win2 = 192.168.0.6

ifconfig eth1 192.168.0.1 netmask 255.255.255.252
ifconfig eth2 192.168.0.5 netmask 255.255.255.252

Now it should work. NOTE: you have to use 192.168.0.2 for Win1 and 192.168.0.6 for Win2 or else this setup will not work properly.
 
Old 11-30-2003, 08:10 PM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Sorry I cut that last post a little short. What I would recommend is configuring the two "inside" NIC for two different networks, i.e. one on 192.168.0.1 as your LAN and one on 172.16.0.1 as your DMZ. For right now you could plug a switch into the NIC on 192.168.0.1 and connect your LAN to that switch. If you ever added more boxes, or decided to configure one as a web server, etc, you could move it to a switch connected to the interface with 172.16.0.1 and set that up in iptables as your DMZ (separated from your LAN).
 
Old 12-01-2003, 08:30 AM   #9
gr8razorx
LQ Newbie
 
Registered: Nov 2003
Posts: 12

Original Poster
Rep: Reputation: 0
thanx you very much and I will get right on trying that. I knew it was possible just haven't the slightest clue hehe I am net to all this stuff.. Thank you very much again
 
Old 12-01-2003, 08:37 AM   #10
jdh77
Member
 
Registered: Nov 2003
Location: Texas, where calls to Heaven are but local calls.
Distribution: RH7.1, 7.3, 9.0 Lindows4,5 OpenBSD3.4
Posts: 42

Rep: Reputation: 15
I think gr8razorx may have drawn an incorrect diaghram if I'm reading correctly.

The cable modem is the bridge to the internet.

The linux box is the router/switch/firewall? (No additional switch nor hub needed.)

The two window$ (yuck!) machines are nodes. (each directly off the linux router.)

L R |-------cable modem (eth0)
I O |
N U |-------M$WINDO$_#1 (eth1)
U T |
X E |-------M$WINDO$_#2 (eth2)
_ R

Is this not correct gr8razorx?

Last edited by jdh77; 12-01-2003 at 08:41 AM.
 
Old 12-01-2003, 08:50 AM   #11
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
jdh77 it doesn't matter. Read my post to see why.
 
Old 12-01-2003, 09:23 AM   #12
jdh77
Member
 
Registered: Nov 2003
Location: Texas, where calls to Heaven are but local calls.
Distribution: RH7.1, 7.3, 9.0 Lindows4,5 OpenBSD3.4
Posts: 42

Rep: Reputation: 15
I had intended to point to your post but forgot at the last minute.

My crude attempt at semi-ASCII art was intended to give some of those not so familiar, a perhaps better "picture" of the physical layout/connection scheme.

I am about to post a very similar problem.

Rather than corrupting this thread I'll start a new one.

I hope to see your suggestions as I am stupified.
 
  


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
see other computers on home network daedalusonlinux Linux - Networking 4 11-19-2005 05:40 PM
discovering computers on home network? mma8x Linux - Networking 7 11-07-2005 09:23 PM
Can I network two computers with a USB A-A cable? pembo13 Linux - Networking 3 01-08-2005 04:03 PM
Can't share a cable modem over more then 2 network cards KingofBLASH Linux - Networking 1 11-01-2003 11:07 PM
cable modem / network cards + auto neg. dunkyb Linux - Hardware 3 04-09-2003 05:27 AM


All times are GMT -5. The time now is 12:43 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