|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#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 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. |
|
|
|
|
|
#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 |
|
|
|
|
|
#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. |
|
|
|
|
|
#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:
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:
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|