0

I have 2 LANs:
LAN 1 192.168.2.1/24
LAN 2 192.168.3.1/24

I have a device on tLAN 2 with IP-address 192.168.3.61. My laptop is on LAN 1 with 192.168.2.100. My final goal is to ping the device like it is on the same network, so I want to ping 192.168.2.61 (but the real ip is 192.168.3.61). Is this possible? If yes, what I have to do? My router is an Ubiquiti EdgeRouter Lite.

5
  • 3
    Can you explain your actual problem rather than just your proposed solution? Why do you feel you need to do this? – David Schwartz Oct 12 '15 at 9:18
  • The only solution i can get is this one, requested by a customer. He want to ping 192.168.2.61 but reach 192.168.3.61. that's it. Atleast, not him but he have a PLC always configured in multiple stations with destination panel as 192.168.2.61, so he can have a default ethernet configuration, and then just change the panel software, in order to have like a "standard" . – MattMan Oct 12 '15 at 9:49
  • Why is he pinging things though? What purpose does that serve? – David Schwartz Oct 12 '15 at 9:50
  • Now i'm making tests with my laptop. Ofcourse if i can't ping it with my laptop, my panel wont reach the plc.. and viceversa. – MattMan Oct 12 '15 at 9:56
  • What do mean by "reach"? Are you trying to connect to its web interface? SSH into it? Or what? It seems like you just don't want to describe the actual problem and are focusing on implementation of one solution, but one that might be a really bad one. – David Schwartz Oct 12 '15 at 17:07
1

As both networks are local i would put the two "/24 ranges" under same roof, by changing their subnets from /24 to /23 for example. This will give you a connected network ranging from

192.168.2.0 - 192.168.3.255

The netmask of /23 is 255.255.254.0 - if your devices needs netmask instead of subnetmask.

Your laptop could be configured as below

IP: 192.168.2.100
NM: 255.255.254.0
GW: 192.168.2.1

If you need to do this by the router, you need to make sure it supports BGP (Border Gate Protocol) which can route between the two networks - perhaps it can be configured by the interface of your router.

3
  • I know about changing the mask, but my final target is to ping 192.168.2.61 -> but reach the 192.168.3.61 on the lan 2. With your solution, i keep pinging 192.168.3.61, by the way thanks for the answer. =) – MattMan Oct 12 '15 at 8:50
  • Sorry I didn't understand the question correct. I would stick to my solution though, and ping 192.168.3.61 directly. But I think you can use NAT (Network Address Translation) which should be able to translate a single IP to another aswell as one network to another. – SteffenNielsen Oct 12 '15 at 9:01
  • Ok, thank you for your reply ! I was trying to configure nat at the moment but seems not to work. By the way thanks, i'll try to find a solution about that, now i'm sure that the best way for my answer is to use NAT. ;) – MattMan Oct 12 '15 at 9:11
-1

NAT May be configured on the Router to Translate the Addresses. Also I think you can achieve this using the Hosts file on a PC-by-PC Basis

1
  • Nice for file hosts, but the biggest problem is that a PLC will be connected with a Panel, so i can't use hosts file. By the way, no idea how to configure NAT. Do you have any advice about that? – MattMan Oct 12 '15 at 9:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.