Community discussions

MikroTik App
 
User avatar
edurosso
just joined
Topic Author
Posts: 6
Joined: Tue Sep 24, 2019 3:25 am
Location: Santa Maria - RS - Brasil

Migrate BGP to another company address

Mon Nov 08, 2021 3:09 pm

Hi all,

Currently, we're an AS with a /24 prefix. We're advertising these IPs through 2 peers.
The problem is that we'll need to move our datacenter, physically, to the new company address.

What is the best solution to this case? We bought another CCR just in case we need to keep it powered on in the new location.
Is there a way we can advertise the same /24 on this router too, simultaneously? Or is it best to establish BGP session but not advertise the prefixes yet?
 
mducharme
Trainer
Trainer
Posts: 1777
Joined: Tue Jul 19, 2016 6:45 pm
Location: Vancouver, BC, Canada

Re: Migrate BGP to another company address

Wed Nov 10, 2021 2:57 am

Is there a way we can advertise the same /24 on this router too, simultaneously? Or is it best to establish BGP session but not advertise the prefixes yet?
You could only advertise the same /24 if the two locations are connected by some other means (ex. layer 2 circuit between them), or at least some kind of tunnel over IPs that are not part of that /24. Otherwise you could have packets returned to datacenter B that are meant for datacenter A and the other way around, without a way of getting the packets to the correct place.
 
User avatar
edurosso
just joined
Topic Author
Posts: 6
Joined: Tue Sep 24, 2019 3:25 am
Location: Santa Maria - RS - Brasil

Re: Migrate BGP to another company address

Fri Nov 19, 2021 1:57 am


You could only advertise the same /24 if the two locations are connected by some other means (ex. layer 2 circuit between them), or at least some kind of tunnel over IPs that are not part of that /24. Otherwise you could have packets returned to datacenter B that are meant for datacenter A and the other way around, without a way of getting the packets to the correct place.

Thanks @mducharme.
So, if we got a L2 communication between the two sites, how the BGP configuration will look like? I mean, we currently have two peers on site A, how can I advertise the same /24 network to the same peers (ISPs) on site B? There is a need for iBGP here? Or are you referring to only establish a BGP session on site A and transport the routes stacticaly to site B?

Or, even is it a better approach to establish a BGP session on both sites, but with peer 1 on site A and peer 2 on site B only?
 
millenium7
Long time Member
Long time Member
Posts: 539
Joined: Wed Mar 16, 2016 6:12 am

Re: Migrate BGP to another company address

Fri Nov 19, 2021 4:37 am

I would do this by simply advertising the /24 at both physical locations. And then have your own connection between these 2 locations and run iBGP or OSPF between the routers (you can use EoIP or any other tunnel for this in the meantime)

so i.e. you have 1.2.3.0/24 advertising out both locations, but .0-.192 are physically still at LocationA and .193-.255 are physically at LocationB
Start with just regular BGP at both locations, you aren't able to control where traffic comes in, sometimes traffic destined for .167 hits LocationB but its ok because B knows that it lives on A via OSPF/iBGP and just sends the traffic over the tunnel. And the opposite occurs for traffic destined to i.e. .223

Once its all working and you are happy, you can AS-prepend at A to lower the priority of incoming traffic (you could also make B the preferred default route from A, so ALL outgoing traffic goes to B first)
Then once most traffic is moved just stop advertising BGP at A entirely, wait till traffic dies off completely and then remove the router
 
mducharme
Trainer
Trainer
Posts: 1777
Joined: Tue Jul 19, 2016 6:45 pm
Location: Vancouver, BC, Canada

Re: Migrate BGP to another company address

Fri Nov 19, 2021 4:50 am

If you are using full tables, OSPF can't handle those, so you will want to iBGP peer those two routers to make sure that they have the same view of the global routing table. If you are only getting a default route, that probably isn't necessary.
 
millenium7
Long time Member
Long time Member
Posts: 539
Joined: Wed Mar 16, 2016 6:12 am

Re: Migrate BGP to another company address

Fri Nov 19, 2021 4:54 am

If you are using full tables, OSPF can't handle those, so you will want to iBGP peer those two routers to make sure that they have the same view of the global routing table. If you are only getting a default route, that probably isn't necessary.
I wouldn't be advertising the BGP table across the link, no no, just advertise the specific /32 addresses of the /24 block (and any other infrastructure/private IP's) between the 2 edge routers so traffic gets to where it has to
the eBGP routes stay on each router they don't advertise those to each other

Who is online

Users browsing this forum: No registered users and 11 guests