Community discussions

 
Devin
newbie
Topic Author
Posts: 32
Joined: Wed Dec 21, 2011 4:08 pm

BGP Question 2 ISPs 2 Locations 1 Allocation

Mon Mar 04, 2013 10:30 pm

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?
Devin Babb
Network Administrator
Ken-Tenn Wireless
devin@ken-tennwireless.com
 
User avatar
wulfgard
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Wed Oct 17, 2012 1:06 pm
Location: France
Contact:

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Mon Mar 04, 2013 11:46 pm

hello

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

a+
Thierry
System and Network Engineer
Mikrotik Trainer - MTCNA MTCRE
Official French Mikrotik Distributor
 
cupis
Frequent Visitor
Frequent Visitor
Posts: 74
Joined: Sun Apr 10, 2011 1:25 am

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Mon Mar 04, 2013 11:51 pm

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.
 
User avatar
shahbazian
Trainer
Trainer
Posts: 166
Joined: Fri Sep 09, 2011 6:22 pm
Location: Iran
Contact:

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Mon Mar 04, 2013 11:58 pm

Read this article (http://wiki.mikrotik.com/wiki/Manual:Si ... ultihoming) to understand how to do the settings.
Learn MikroTik to improve your network.
( MTCNA, MTCRE, MTCWE, MTCTCE, MTCUME, MTCIPv6E, MTCINE )
MikroTik Certified Trainer & Consultant
RIPE NCC Trainer
 
Devin
newbie
Topic Author
Posts: 32
Joined: Wed Dec 21, 2011 4:08 pm

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Tue Mar 05, 2013 9:33 pm

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.
Devin Babb
Network Administrator
Ken-Tenn Wireless
devin@ken-tennwireless.com
 
cupis
Frequent Visitor
Frequent Visitor
Posts: 74
Joined: Sun Apr 10, 2011 1:25 am

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Tue Mar 05, 2013 10:03 pm

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.
 
User avatar
wulfgard
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Wed Oct 17, 2012 1:06 pm
Location: France
Contact:

Re: BGP Question 2 ISPs 2 Locations 1 Allocation

Wed Mar 06, 2013 2:37 pm

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
System and Network Engineer
Mikrotik Trainer - MTCNA MTCRE
Official French Mikrotik Distributor

Who is online

Users browsing this forum: No registered users and 6 guests