Dinh Tran Posted May 17, 2006 Report Share Posted May 17, 2006 (edited) Hi, I succeed to configure a mandriva as a router for internet sharing but not for connexion between 2LAN. And here's the system that I want to have: Desktop 1 Mandriva <--->Desktop 2 Mandriva with 2 ethernet cards <----> Laptop winXP 192.168.18.1 <--->192.168.18.29 192.168.240.1<---->192.168.240.2 From desktop 1, I can not ping anything, even 192.168.18.29 From desktop 2, I can not ping anything including 192.168.18.1 and 192.168.240.2 From laptop, I can ping 192.168.240.1, 192.168.18.29 but not 192.168.18.1 Between desktop 1 and 2; desktop 2 and laptop, i use non-crossed cables (actually i tried also the crossed ones but it doesnt help) Previously, for internet sharing, my system is Internet <----->Desktop 2 Mandriva with 2 ethernet cards <----> Laptop winXP 192.168.18.1 <--->192.168.18.29 192.168.240.1<---->192.168.240.2 non-crossed cable between desktop 2 and laptop. From the laptop, I can ping any IP and go on internet web pages. But from desktop 2, I can not ping the laptop, even after "route add -net 192.168.240.0 netmask 255.255.255.0 gw 192.168.240.1". Is it normal please? Thanks a lot for helping me out and tell me which cable I should use please, crossed or non crossed one? I am confused ... Best regards, Dinh Tran Edited May 17, 2006 by Dinh Tran Link to comment Share on other sites More sharing options...
ianw1974 Posted May 17, 2006 Report Share Posted May 17, 2006 For pinging the laptop, I think you must have a firewall enabled which is why it doesn't reply to the ping from the mandriva machine. You shouldn't need a route for it, because they are in the same subnet. Do you have link lights on the network cards for machines 1 and 2? If not, then it's either a cable problem, or problem with one of the network cards. To connect machines directly by network cards you have to use cross-over cables. The easiest method though is to use a DSL router, providing of course your internet connection is DSL and not dialup modem. Link to comment Share on other sites More sharing options...
Dinh Tran Posted May 17, 2006 Author Report Share Posted May 17, 2006 Yes I do have red lights on the 2 desktops if they are connected directly to each other. But If I connect them to internet, the lights are green. I checked the cables and nothing's wrong with them. Do you know any other reasons please?? :( I dont have a router and I dont know if I can get one. Thanks, Dinh Tran Link to comment Share on other sites More sharing options...
Gowator Posted May 17, 2006 Report Share Posted May 17, 2006 Oui tu as besoin de une <<fil croise'>> pour une connection direct entre deux ordis (sans passerelle) ... Link to comment Share on other sites More sharing options...
ianw1974 Posted May 19, 2006 Report Share Posted May 19, 2006 The colours normally indicate the connection and link speed: Green = > 100Mbps Yellow = 10Mbps Red = Network Problem therefore, I would suggest you have some sort of problem with the cable you are using to directly connect the machines together. Link to comment Share on other sites More sharing options...
Dinh Tran Posted May 19, 2006 Author Report Share Posted May 19, 2006 (edited) Hi, Bonjour, :D :) thanks so much for all your replies. After disactivating firewall on windows machine, I can ping it. So may be the problem comes from firewall. Concerning the 2 Lan connecting to each other, I can not ping. But using my application, I checked that the communication between Desktop2 and laptop was ok, between the 2 desktops was ok too. I am not yet able to check the one between laptop and desktop 1 :(. I'll let you know if I succeed. If so, it means it's really problem of firewall. By the way, how can we disable all the firewall please? is it in /proc/sys/net/ipv4/conf/all/ and we have to change all the parameter related to firewall to 0? One thing so strange is that I didn't use cross over (thanks for the word :D ) cables for both connexions, but straigh through ones. Thanks again :) Edited May 19, 2006 by Dinh Tran Link to comment Share on other sites More sharing options...
ianw1974 Posted May 19, 2006 Report Share Posted May 19, 2006 The easiest way to disable firewall on Linux is to see if shorewall is running: chkconfig --list if shorewall is on the list, then we need to disable this with: chkconfig shorewall off also maybe: chkconfig iptables off as well since shorewall uses iptables as the firewall. However, this will only take place when you reboot, so to do it manually to save the reboot: service shorewall stop service iptables stop and that's it. Link to comment Share on other sites More sharing options...
Dinh Tran Posted May 30, 2006 Author Report Share Posted May 30, 2006 (edited) Thanks, I got shorewall and iptables all off. But does it exist any other firewall please? Because I run a udp client and server on these 2 mandriva machines (code from here: http://sage.mc.yu.edu/kbeen/teaching/netwo...es/sockets.html ), but server can never receive message from client. However using tcpdump, I see that the packet udp already arrived to server. Would this be a problem of firewall? Thanks, Best regards, Dinh Tran Edited May 30, 2006 by Dinh Tran Link to comment Share on other sites More sharing options...
ianw1974 Posted May 30, 2006 Report Share Posted May 30, 2006 The only other firewall I know of is firestarter. I'm not sure how your network is set up, so if no firewall is running, then can only think it's a routing problem, unless you can ping everything successfully. If you can ping everything, then this would say it's OK. But you'd have to test all machines to make sure they can all ping and receive replies. Link to comment Share on other sites More sharing options...
Dinh Tran Posted June 7, 2006 Author Report Share Posted June 7, 2006 (edited) Hi, Sorry for keep asking about the same problem. My 2 LAN connecting to each other can be represented as below: Windows=================Mandriva1====================Mandriva2 eth1 eth0 eth0 192.168.240.2 192.168.240.1 192.168.242.3 192.168.242.2 From 240.2, I can ping successfully 240.1 and 242.3 but not 242.2. Using tcpdump, I can see the ICMP echo request coming from 240.2 at 242.2 machine, then 242.2 send out a "arp who-has 192.168.240.2 tell 192.168.242.1". 242.2 machine doesnt send back the echo reply. I already set rp_filter to 0. From 242.2, I dont succeed to ping 240.2 neither. I get a Destination Host Unreachable. Using tcpdump, the only traffic displayed is: "arp who-has 192.168.240.2 tell 192.168.242.1". Pinging 240.1 and 242.3 is with success from 242.2 Actually, I am running an application, in which these 3 machines communicate to each other using ICMP and UDP. After the initiation phase, the application should establish an ipip tunnel between 240.1 and 242.2. And I'm supposed to be able to ping between these 3 machines but I got the same error as I described above. Thus, I want to firstly succeed to ping normally from one machine to the others, which still doesnt work for me. Could you help me out please? Thanks a lot for your help, Best regards, Dinh Tran Edited June 7, 2006 by Dinh Tran Link to comment Share on other sites More sharing options...
Recommended Posts