2 Remote Sites, 2 Different Subnets, with interconnectivity. How to create a single subnet for servers at both locations?

Current Environment:

We currently have 2 remote sites, both with their own LAN subnet and servers hosted at each site. Currently each site is using 1 subnet for the clients and servers. Both sites are directly connected to each other over an ISP provided LAN extension. There is connectivity between both sites and servers/clients can all communicate with each other.

Question:

When we migrate our virtual servers from one site to another, we have to change the IP address of each server that is moved to reflect the destination subnet. I know DHCP can handle this, but I would like to keep the IP addresses the same, regardless of which site the servers are in. This also adds steps to the migration process

Is it possible to create a VLAN on both sites with the same subnet information and have the servers in this VLAN? I know how to do this for a single site, but what if Server1 @ Site 1 (192.168.50.20) gets moved to Site 2? How will the router know where to route the traffic for Server1? Static routes just direct traffic to a gateway and if there are 2 subnets with the same network configuration, how will the router know where to route traffic if the IP it is trying to route traffic for doesn't exist in that gateways network?

We are using FortiGate 51E's at each site with FortiSwitch 248D's at each site. Both environments have ESXi 6.7 servers.

Below is a picture of the environment I'd like to have.

enter image description here


I would like to keep the IP addresses the same, regardless of which site the servers are in

That is a very, very bad idea unless you migrate the server subnet in whole.

You don't want your routing to be ambiguous, requiring cumbersome workarounds like NAT, proxy ARP and such. In your diagram, if 192.168.50.10 wanted to talk to 192.168.50.20 - assuming /24 subnets - it would assume to be talking to a direct neighbor and try to ARP 192.168.50.20. With both servers in different broadcast domains that simply fails.

You could bridge the server VLAN across the LAN extension but then again, it's bad practice to extend L2 segments across WAN/VPN (for manageability, scalability, resilience, ...).

Instead, make sure that your servers are always referred to by DNS name, then changing the IP address behind that name is a breeze.