Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Access PC on different LAN from LAN1


  • Please log in to reply
4 replies to this topic

#1 Novice PC User

Novice PC User

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:12:15 AM

Posted 15 July 2010 - 10:34 AM

We have a computer, COMP1 on LAN. COMP1 has two ethernet cards and one of them is connected to LAN(IP 10.66.25.100). To this COMP1, we connected a Linux server through COMP1's second ethernet card. The second IP of COMP1 is 192.168.1.12. Linux Server is configured with IP Address 192.168.1.10. This linux server is not in any LAN. It is connected ONLY to COMP1.

Now, sometimes I want to access this Linux server ( 192.168.1.10 ) via COMP1. I have physical access to COMP1. Is there any thirdparty tool etc, that can be installed on COMP1 so that I can ping to 192.168.1.10 ?

Edited by hamluis, 15 July 2010 - 10:41 AM.
Moved from XP to Networking ~ Hamluis.


BC AdBot (Login to Remove)

 


#2 Orecomm

Orecomm

  • Members
  • 261 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Roseburg, Oregon
  • Local time:11:45 AM

Posted 16 July 2010 - 02:14 PM

From your description this should already be working. Do you get a link light on the NICs ? If not you may need a crossover cable. Once you get link up, as long as the two devices are on the same subnet with matching masks they should be able to communicate. There isn't anything special needed for most computers (even Windows) to recognize and use local connections to multiple networks on different interfaces. Note that nobody else on your 10.66.25.x network will be able to see or access your Linux server unless they log into the dual-Nic box first, but that seems to be your intent.

#3 Novice PC User

Novice PC User
  • Topic Starter

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:12:15 AM

Posted 16 July 2010 - 08:43 PM

From your description this should already be working. Do you get a link light on the NICs ? If not you may need a crossover cable. Once you get link up, as long as the two devices are on the same subnet with matching masks they should be able to communicate.

This is happening already. I am able to communicate with Linux server from COMP1
I want to ping to linux server from another COMP2, IP 10.66.25.120, sometimes. What software do I need ?

#4 Orecomm

Orecomm

  • Members
  • 261 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Roseburg, Oregon
  • Local time:11:45 AM

Posted 20 July 2010 - 05:29 PM

Ah. So you need COMP1 to be a router. This is doable using features built into Windows, but there are some sticky points and risks involved. Make sure you understand what is happening before you start.

First of all, make sure there is no other 192.168.1.x network connected anywhere to the 10.66.25.x network. If there is, chances are you are going to break it and someone in a bad mood is going to come looking for you. It would be a lot easier to change your 192.168.1.x network to something else at this point than later. Just for discussion, we will assume there is no potential conflict.

Now we need to start the routing process so COMP1 knows how to pass packets from one network to another. Rather than typing in a lot of stuff I will point you to this Tutorial. Be sure you check the Tips and Warnings at the bottom of the page.

Now there is just one key piece that is missing - how to tell the other computers to use COMP1 to talk to each other. This is easy on your Linux machine. Since there is only one way to any other network you can use the address of COMP1 as your default gateway and all will be well. Of course, this eliminates any isolation of your Linux box from the outside world that may have been the reason you connected it this way in the first place, but you can't have it both accessible and not accessible at the same time.

Your COMP2 machine, however, is a bit trickier. It probably already has a default route on the 10.66.25.x network. That route will be used for all networks other than the local, including 192.168.1.x, which will ship our packets intended for the Linux machine into network nothingness (or the other 192.168.1.x network that may exist connected to that gateway). We need to tell COMP2 where the router is to reach your 192.168.1.x Linux network. This is done by adding a Static Route on COMP2. Note that doing this will drive someone crazy if, in the future, this machine is moved to another network, particularly if that network is or is connected to a 192.168.1.x network. Put a big sticker somewhere on the machine to remind the owner that this route exists and must be removed manually if the machine is relocated, network wise. Really. Now on COMP2 go into the cmd screen and type "route print". You should see a short list of known network routes. If you see an entry for 192.168.1.x STOP. It should not exist, and if it does you are about to break something. Assuming all is well, type "route -p add 192.168.1.0 mask 255.255.255.0 10.66.25.100" where 10.66.25.100 is the address of COMP1, your router. This adds a persistent (doesn't get deleted on reboot) route to the 192.168.1.0 subnet via your COMP1 "router" at 10.66.25.100. This will override the default route on COMP2 only for that subnet. You should now be able to ping back and forth and access whatever is living on your Linux box. Note that your Linux box should also be able to access everything on the 10.66.25.x network and beyond, but chances are you won't get a response from anything beyond the 10.66.25.x because nobody except COMP2 knows the return path to route packets back to your "private" 192.168.1.x network.

By the way, the command to delete the route added above is "route delete 192.168.1.1 mask 255.255.255.0".

Good Luck!

#5 Novice PC User

Novice PC User
  • Topic Starter

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:12:15 AM

Posted 20 July 2010 - 08:51 PM

Ah. So you need COMP1 to be a router. This is doable using features built into Windows, but there are some sticky points and risks involved. Make sure you understand what is happening before you start.


Now there is just one key piece that is missing - how to tell the other computers to use COMP1 to talk to each other. This is easy on your Linux machine. Since there is only one way to any other network you can use the address of COMP1 as your default gateway and all will be well. Of course, this eliminates any isolation of your Linux box from the outside world that may have been the reason you connected it this way in the first place, but you can't have it both accessible and not accessible at the same time.

By the way, the command to delete the route added above is "route delete 192.168.1.1 mask 255.255.255.0".

Good Luck!


I will go through the link you gave me and do that, after understanding it completely.
Thanks :thumbsup:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users