Go Back   PCMech Forums > Linux Support > Linux OS and Software Assistance

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-28-2001, 09:12 AM   #1
Member (7 bit)
 
Join Date: Jul 2000
Location: Australia
Posts: 97
Hi all,

I'm trying connect 3 computers all connected via ethernet cards. Computer 1 is running under windows, computer 2 Linux Mandrake 7.2 and computer 3 windows/Mandrake.

I installed two network cards on computer 2 so that it will act as a router. Computer 3 is connected to the first card ( eth0 ) and computer 1 is connected to the second card ( eth1 ).

My problem is, I can't ping computer 1 from computer 3 and vice versa. Also I can only ping from computer 2, computer 1 which was connected to eth0.

I've managed to ping both computer 1 & 3 by adding :

route -add -host dev eth1

But as for pinging form computer 1 to 3 and vice versa, I had no luck.

I'm not very adept at setting up networks, so any help will be greatly appreciated.

Thanks in advance.
earlboy is offline   Reply With Quote
Old 05-03-2001, 10:30 PM   #2
Registered User
 
Join Date: Mar 1999
Posts: 355
2 things would be helpful

if you could tell us what subnets you have defined and copy and paste your routing table into your next post and maybe we can sort it out.

in the meantime, you might want to look at another(a better?) way to do this at the Linux Documentation Project:

Linux 2.4 Advanced Routing HOWTO
WickedLittleSlaveBoy is offline   Reply With Quote
Old 05-07-2001, 07:11 AM   #3
Member (7 bit)
 
Join Date: Jul 2000
Location: Australia
Posts: 97
Went the easy way out , used a hub instead. Now everything's fine.

Thanks for the help.

Anyway heres how I had it setup before I got the hub ( as far as I can remember ),

Computer 1 ( Windows ) 10.0.0.6 subnet 255.0.0.0
Computer 2 ( Linux ) eth0 10.0.0.3 eth1 10.0.0.4 ( same subnet )
Computer 3 ( Windows/Linux ) 10.0.0.5 ( same subnet )


Computer 1 connected to eth0 of Computer 2
Computer 3 connected to eth1 of Computer 2

Routing Table for computer2

host 10.0.0.6 has a gateway going to 10.0.0.3
host 10.0.0.5 has a gateway going to 10.0.0.4

Computer 1 & 3 have default routing tables ( the one added during the installation )

I managed to fix the problem by adding a route in Computer 1 to route all packets going to 10.0.0.5 to use 10.0.0.4 as the gateway. And in Computer 3 to route all packets going to 10.0.0.6 to use 10.0.0.3 as the gateway.

I was able to telnet, ftp from computer 1 to computer 3, I haven't tried other things since I was able to obtain a hub.

Thanks again for the help.
earlboy is offline   Reply With Quote
Old 05-07-2001, 01:58 PM   #4
Registered User
 
Join Date: Mar 1999
Posts: 355
the problem, as I see it, is that you've only defined one subnet. routing is a way for multiple subnets to be able to communicate with one another....but you only have one subnet defined, so the best you can hope for is a one way street.

you set up the router with a route for a subnet and it will look at all traffic that hits it and route it to the gateway that you have defined for that subnet.

this would mean that if you have something like this:



computer2
eth0 -- gateway -- eth1
10.0.0.3 10.0.0.4
| |
| |
computer1 computer3
10.0.0.6 10.0.0.5



and you add a route from computer2 to computer3:

route add -net 10.0.0.0 netmask 255.0.0.0 dev eth0

using the route command this way, instead of the way you used it more clearly demonstrates where it's breaking.....you can see from this that all traffic that hits the Mandrake box for the 10.0.0.0/255.0.0.0 subnet will be routed through eth0.....so, if computer1 where to send traffic to 10.0.0.5, it would be routed back to the segment attached to eth0.

if you had set up your network with two subnets 10.0.0.0/255.255.255.0 and 10.0.1.0/255.255.255.0:


computer2
eth0 -- gateway -- eth1
10.0.0.1 10.0.1.1
255.255.255.0 255.255.255.0
| |
| |
computer1 computer3
10.0.0.6 10.0.1.5


and added 2 routes:

route add -net 10.0.0.0 netmask 255.255.255.0 dev eth0
route add -net 10.0.1.0 netmask 255.255.255.0 dev eth1

it would have allowed both segments to communicate properly.

anyway, glad to hear it's working now....a hub is definately the way to go.

Last edited by WickedLittleSlaveBoy; 05-07-2001 at 02:03 PM.
WickedLittleSlaveBoy is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:19 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2