I am currently announcing 8 /24 Subnets over BGP. I am planning to move our servers to a other datacenter, but i want to keep all IPs.

Is it possible that i announce the prefixes on 2 locations and tell that traffic from IP should go to location A and traffic from IP should go to location B?

There is no direct connection between the 2 datacenters, no traffic exchanger is possible.

Location A isnt stable, there are nearly everyday network problems. Location B is stable and should not get disturbed because of location A.

I know i can announce the prefix on multiple locations, but then the shorter path will be used. I need a way to tell other routers that the IP X is on location A and IP Y is on location B.

What would be the best way to perform this using BGP?

  • 2
    In theory, you could announce /32 routes, but practically speaking, you can't: ISPs do not advertise prefixes longer than /24. So you would have to advertise blocks of /24 in different locations
    – Ron Trunk
    Feb 18, 2016 at 1:18
  • @RonTrunk you mean i cant realize this? Feb 18, 2016 at 1:34
  • I can't think of a way using BGP. Is it possible to re-address these servers?
    – Ron Trunk
    Feb 18, 2016 at 1:36
  • @RonTrunk - not really possible. There are over 4k customers using this ips. Feb 18, 2016 at 1:58

3 Answers 3


Possible script:

  1. Move every /24 prefix in BGP one at a time.
  2. Before moving the first /24 prefix, establish an IP tunnel between the two locations.
  3. When you need to move one IP of a given /24 prefix, make location A to forward that address (a /32 route) thru the tunnel to location B.
  4. As soon as every address from one /24 prefix is going to location B via tunnel, move its BGP prefix announcement from location A to B.
  5. Repeat steps 3-4 for every /24 prefix.
  6. Bring down the tunnel.
  • Which tunnel you would recommend? I think a GRE tunnel would be the best? Feb 18, 2016 at 2:05
  • Yes, GRE is fine.
    – Everton
    Feb 18, 2016 at 2:52
  • Would it be possible with MPLS+VPLS? Feb 23, 2016 at 15:16
  • MPLS over the Internet? Not possible, unless you use other underlying tunnel. But then one layer of tunneling is all you need.
    – Everton
    Feb 23, 2016 at 15:39

If both sites use the same ISP, and the ISP's AS is the same at both sites, this may be possible. You could work with the ISP to announce to it some /32 addresses on a temporary basis. The ISP's AS would still announce to the Internet that it has your /24, but it can route longer prefixes internally. This is not something that you can just assume the ISP will do, but some ISPs may accommodate such things from time to time. An ISP typically will not help you at all to move to a different ISP.


What you can do is advertise the prefix to a second ISP and then monitor if the prefix propagates to at least part of the rest of the world. (Some networks will prefer the path over your first ISP; this is normal.) Then ask your first ISP to stop advertising the prefix, and make sure that they propagate your own advertisement through them.

  • With servers in the same prefix on two different ISPs, this won't work. The users could get to one of the servers, but not the other.
    – Ron Maupin
    Feb 18, 2016 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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