Maintain the same IP even in different networks
-
@darkcorner I agree, discussion on which device 'connects' or the ip address is all besides the point but i'm curious with your line that no hostname is used otherwise it would have been solved - why is that?
There may well be some creative workaround which i cannot immediately think of but it seems to me the simplest solution is to have another router/modem to be carried around with your device which initiates a connection to the HQ network (think OpenVPN) and your device sites behind it. This 'middleman' can be any small portable router that creates a VPN tunnel over the LAN network back to the HQ office and need not go over the internet itself (or you can of course). It need not be a pfsense box but any small form factor device running either opensource or propriety software that has VPN software baked in. The end result being that you keep the same IP and it does not matter where the device is as long as it is either connected via its HQ LAN or remotely via the tunnel.
-
@darkcorner said in Maintain the same IP even in different networks:
The point is that device A must be able to contact device B on the same network even if B is located in a different location.
And that is not how networking works..
If you have 2 devices A and B that talk to each other that are on the same network.. You can't just move the device to some remote network and expect them to talk to each other like they are on the same network.. For that to work you would have an extended L2 network between location 1 and where ever this remote location 2 is.
Unfortunately the address is registered in the application and cannot be changed
Not a networking problem - you have an application problem.. If you have some application that needs to talk to some box.. And this box is going to move to different locations.. Your application is borked.. Your application should point a fqdn, that you can resolve to whatever IP this device is on be locally, or remote.
And the device that needs to move to different locations but can't change its IP is also borked.. Never heard of a printer that can not change its IP..
Your trying to solve a problem that is an application problem.. With networking tricks.. If you need to have this device on IP X and it needs to move about.. You need a 2nd device along with this device that will vpn into your hq and create an extended L2 ie a bridge so that this 192.168.0 network seems to be local to HQ..
Keep in mind that another aspect of devices moving about - your latency is going to change.. While your device is local the latency between the device and the server is couple ms tops.. Now it might be 30 ms away, 60 ms away - more? Applications designed to work with its piece parts all local tend not to like that so much..
-
Of course, it is an application problem which however I have to solve (if possible, obviously) at the network level.
The application is not editable. There's no point in discussing it.
The application "prints" to a hostname, this can be done.
On Windows it is \\server\device-name.
The problem is that the application (I repeat, not editable) only uses this reference, but this reference changes when it moves.
If it is in HQ, then \server\device-name = 192.168.0.111
If it is in Office1, then \server\device-name = 192.168.1.111
If it is in Office2, then \server\device-name = 192.168.2.111And so it's always an IP address problem.
If I could always keep \server\device-name = 192.168.0.111 even when I'm in the other two offices, the problem would be solved.Which means that the application always prints to \server\device-name which, maintaining its IP, is perfectly reachable also in other locations.
-
@darkcorner said in Maintain the same IP even in different networks:
If it is in HQ, then \server\device-name = 192.168.0.111
If it is in Office1, then \server\device-name = 192.168.1.111
If it is in Office2, then \server\device-name = 192.168.2.111Are there 3 identical devices on these 3 networks ?
or
... no not or. I can't image how "192.168.0.111" "192.168.1.111" "192.168.2.111" can all be the same physical device. But, let presume. In that case :On HQ, place a host override : \server\device-name => 168.0.111
On Office1, place a host override : \server\device-name => 168.1.111
On Office2, place a host override : \server\device-name => 168.2.111 -
@Gertjan said in Maintain the same IP even in different networks:
Are there 3 identical devices on these 3 networks ?
No! There are not 3 devices with the same IP.
There is only one device, which is used in HQ on Monday, in Office1 on Tuesday, in Office2 on Wednesday, in Office3 on Thursday and in Office4 on Friday.
But in all 5 days it must always have the same IP. -
@darkcorner still trying to understand... the "laptop" must be assigned the same IP at each of these sites?
Are there separate routers at each of these sites?
Are the device(s) you are connecting to in each of these offices requires the "laptop" to have this IP to connect?
-
I can't make myself understood.
It is not the laptop that must always have the same IP assigned, but this device (this printer, in the example).
They are separate offices in separate cities, so obviously each has its own router and firewall.I'll try to generalize the matter, hoping to simplify it and not complicate it.
Each office has its own class of addresses:- HQ: DHCP on 192.168.0.0
- Office1: DHCP on 192.168.1.0
- Office2: DHCP on 192.168.2.0
But there are also subnets.
In HQ the network is from 192.168.0.1 to 192.168.0.191.
Then in Office1 there is also the network from 192.168.0.192 to 192.168.0.223
and in Office2 there is also the network from 192.168.0.224 to 192.168.0.255It can be done? How can I do it?
If this can be done, then it will be the router/firewall in HQ that will direct the traffic from 192.168.0.192 to 255 towards Office1 and Office2.
At the same time in Office1 and Office2 all traffic towards the addresses from 192.168.0.1 to 192.168.0.191 will be directed towards HQ. -
@darkcorner
Yes, i apologize for not understanding. I am going to make some assumptions from your description.It sounds like the "printer is being moved about. It also sounds like the "host override" suggested above is not the solution.
From my perspective, not knowing much but the little i have, if you are moving it to other locations why not create new separate LAN segments at each office with it's own AP and own ARP/Static mapping for this device and direct with a port rule on the other LAN segments to this device. Then install a shared printer.
Assuming it is installed at the headquarters and accessed by each remote site on the given days; I would create it's own LAN segment - like above - set up a site-to-site VPN and write a port rule on the VPN interface to the "printer" and at the remote sites install a shared network printer.
Probably not what you want to hear.
-
@The-Party-of-Hell-No said in Maintain the same IP even in different networks:
Probably not what you want to hear.
Reply
No, in fact, because I keep repeating that it is the device that moves, not the people and not even the application.
It is a very particular and very expensive device.
It is used with an application installed on the central server that does not move from the rack in HQ. It is this application that communicates with the device and not the device that communicates with the application. For this reason I gave the example of the printer.Instead, it is the device that moves between locations, but nevertheless must maintain the same IP.
-
@darkcorner
So my first solution of setting up a separate LAN segment at each office just for this device would be viable.So finally, the device moves to the remote sites, but it is accessed from an app at the central office; do I finally have it right?