Page 1 of 1

BGP Question 2 ISPs 2 Locations 1 Allocation

Posted: Mon Mar 04, 2013 10:30 pm
by Devin
This will be first time for me setting up BGP with 2 peers, but on two separate networks(locations). Here is a diagram of what I have, and what I am trying to accomplish.(these are dummy ips of coarse)
Image

Is this even possible to do this? Or am I on the right track?

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Posted: Mon Mar 04, 2013 11:46 pm
by wulfgard
hello

"no problemo" you can do this but you need knowledge about BGP and IGP

a+
Thierry

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Posted: Mon Mar 04, 2013 11:51 pm
by cupis
This will be first time for me setting up BGP with 2 peers, but on two separate networks(locations). Here is a diagram of what I have, and what I am trying to accomplish.(these are dummy ips of coarse)
Is this even possible to do this? Or am I on the right track?
You are on the right track. The main thing you need to ensure if that all of your BGP routers within the same AS are peered with each other. Typically you will assign each router a loopback address (on a bridge in MikroTik-land) and the routers would advertise this into your IGP (OSPF) and then BGP peer with the other routers using the loopback addresses. If you (will) only have two routers you could do this another way, using a direct link between the routers or a VLAN etc.

Not sure where you are going with "be able to set prefered gateway" - if you are getting partial/full routes to your border routers let BGP control where you are routing traffic off of your network.

Give it a go and if you get stuck come back with specific details for help - there are also lots of guides online for this type of setup.

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Posted: Mon Mar 04, 2013 11:58 pm
by shahbazian
Read this article (http://wiki.mikrotik.com/wiki/Manual:Si ... ultihoming) to understand how to do the settings.

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Posted: Tue Mar 05, 2013 9:33 pm
by Devin
This will be first time for me setting up BGP with 2 peers, but on two separate networks(locations). Here is a diagram of what I have, and what I am trying to accomplish.(these are dummy ips of coarse)
Is this even possible to do this? Or am I on the right track?
You are on the right track. The main thing you need to ensure if that all of your BGP routers within the same AS are peered with each other. Typically you will assign each router a loopback address (on a bridge in MikroTik-land) and the routers would advertise this into your IGP (OSPF) and then BGP peer with the other routers using the loopback addresses. If you (will) only have two routers you could do this another way, using a direct link between the routers or a VLAN etc.

Not sure where you are going with "be able to set prefered gateway" - if you are getting partial/full routes to your border routers let BGP control where you are routing traffic off of your network.

Give it a go and if you get stuck come back with specific details for help - there are also lots of guides online for this type of setup.

I have over 60 routers on the network between the two. What I was thinking was running iBGP on the same AS between the two routers over the network. Then peering with the upstream and try to watch the load balance over the gateways. Does this sound more like a solid plan? What I was meaning by preferred gateway is....

Upstream 1 ---> RTA ---> RTB ---> RTC ---> RTG
--------------------------------------------|---> RTD ---> RTF ---> Upstream 2

The default route that RTG has currently is RTC then RTC has a choice ok send traffic to RTB or RTD. BGP will have a full route table on both RTA and RTF. I will have OSPF redistribute BGP internally. So I want RTG's traffic to go out Upstream 1, thats what I mean by preferred gateway.

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Posted: Tue Mar 05, 2013 10:03 pm
by cupis
I have over 60 routers on the network between the two. What I was thinking was running iBGP on the same AS between the two routers over the network. Then peering with the upstream and try to watch the load balance over the gateways. Does this sound more like a solid plan?
Absolutely, yes. When you say that there are 60 routers *between* the two BGP routers - you will need to make sure the two BGP routers can see each other and neighbours - this may mean a VLAN or tunnel depending on your specific architecture.
What I was meaning by preferred gateway is....

Upstream 1 ---> RTA ---> RTB ---> RTC ---> RTG
--------------------------------------------|---> RTD ---> RTF ---> Upstream 2

The default route that RTG has currently is RTC then RTC has a choice ok send traffic to RTB or RTD. BGP will have a full route table on both RTA and RTF.
Okay. You also want to make sure that if one of the border routers dies that the routers will "failover" to using the remaining router/connectivity.
I will have OSPF redistribute BGP internally. So I want RTG's traffic to go out Upstream 1, thats what I mean by preferred gateway.
Don't leak/distribute the full internet routing table into your IGP unless you want your network to die. Use OSPF for router loopbacks so your routers can find each other, and use BGP between your "internal" routers to distribute your own routes only - then only have the full internet routing table on your two "border" routers.

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Posted: Wed Mar 06, 2013 2:37 pm
by wulfgard
Hello

you can do simplier but with less specific route
1) use OSPF as IGP in your internal network
2) setup IBGP between both BGP routers
3) push a default route from BGP routers into OSPF with a different TAG ( exemple TAG=10 for BGP1 and TAG=20 for BGP2 )
4) filter default route in all OSPF routers assignig a different cost so you select the default BGP you want for outgoing on every OSPF router
5) do PREPEND on BGP routes in advertise ( minimum is /24 ) accordingly to your needs

BUT NEVER ADVERTISE FULL BGP TABLE TO OSPF

a+
Thierry