i plan to move to a new location and i want to migrate all services without a downtime.
Currently, i am announcing some /24 subnets.
Is there an easy way that the IPs from the /24 Subnet can be used on both locations so i can move all services without a downtime? So that the IP 1.1.1.2 gets rerouted to location B if the ip is used there, and IP 1.1.1.3 stays in location C.
I know that i can announce the subnets on multiple locations, but then it would be like anycast dns - traffic takes the shortest path. The traffic should only get to the location where it should be.
The only way to do this is by having internal connectivity between the two sites and more granular routing internal to your network.
You could do this via a tunnel between the WAN IP addresses of your routers, but this would be horribly inefficient and add latency, etc, whenever a packet happens to arrive at router1 when the destination IP is behind router2.
If both sites are connected to the same carrier, then perhaps the carrier will allow you to advertise private prefixes (public IPs, but they will not share these advertisements with any other networks) that are longer than /24, but /24 is the longest prefix supported on the public Internet. Some will, most won’t.
i have done some progess, i have created a GRE tunnel and i can route the /32 IPs to the GRE, that works perfectly.
But it is too much admin work to add every /32 IP to the tunnel after the migration of the server.
Would it be possible with MPLS+VPLS? Would it be than like a virtual network connection and the IPs can be moved instantly across the datacenters?
You could use OSPF across the tunnel, and let the /32 addresses go into OSPF routing table - the routers will do the rest.
I’d recommend a static /32 route on each router to the other router’s WAN IP so that ospf can’t accidentally try to pull the wan IP of the remote router through the tunnel.