Community discussions

MikroTik App
 
gjnardoni
just joined
Topic Author
Posts: 22
Joined: Sat Dec 11, 2010 5:20 am

BGP + OSPF (RR instead of "full mesh").

Sun Sep 27, 2015 7:54 am

NETWORK-STRUCTURE-PHY.png
Hello friends.
I have this situation, which is my real (i mean, physical) network structure and what I want to achieve is to establish a fully meshed network. It should be capable to self routing when a link becomes offline.
I tried lots of configurations using RR but everytime I try a new configuration I finish in an eternal loop. I really don't know where is the problem.
Can you lend me a hand?

First of all, every link you see in the draw is a phisical link in FO or Wireless Link.

My ASN = 100

R0-OUT-01 is connected to 2 peers. The first one, let's say ASN 10 is the Internet connection; the second one, let's say ASN 20 is the IXP.
Both of them send me full prefix table.

R0-OUT-02 is EQUAL to R0-OUT-01 with the same ASN for Internet and IXP but it is in another city.

R1 and R5 are connected each other directly and through R6 as you can see.

The same situation happen with R1 and R2 or R1 and R3; of course R4 are connected to R3 and R2.

What I do?:
First I set up a Loopback interface (bridge with mac) on every box and assign a /32.
Second, I create a static route to reach every connected destination (R1-R2, R1-R3, R4-R3, R4-R2, R1-R5, R1-R6, R6-R5) I used 100.64.0.0/10 range to do that. (yes I know).
I used OSPF to connect transit networks, then I establish a peer connection between every direct peer, R1-R2 but NEVER R1-R4.
Third, I create a bgp peer R1-R2, R1-R3, R1-R5, R4-R3, R4-R2, R1-R5, R1-R6, R6-R5)
After that (I suppouse to propagate the prefix received from R0...) I've tried to set up client-to-client-reflection = yes (and no), and Route-reflector= yes (and no) but no matter what I do I always finish in a loop.

I think I have a very issue with the understanding of RR!!!
OSPF works perfectly fine!.

If you need more information (which I think you need) let me know.

Thanks in advance.
You do not have the required permissions to view the files attached to this post.
 
User avatar
shaoranrch
Member Candidate
Member Candidate
Posts: 184
Joined: Thu Feb 13, 2014 8:03 pm

Re: BGP + OSPF (RR instead of "full mesh").

Mon Sep 28, 2015 2:18 am

Hello,

One question, why are you establishing iBGP peering sessions with each one of your routers? Unless you use a Route Reflector, which I don't see you're using, you'll need a full mesh, and that's a pain the configure even for just a few routers.

What I'd do is:

1.- Establish an iBGP session between your border routers (R0-OUT-01 and R0-OUT-02)
2.- Establish some sort of tunnel between them (GRE, IP-IP, etc...) the important part here, is that the tunnel must travel from your internal network
3.- Add OSPF (why static routes??? you're already using OSPF), include the tunnel's networks too
4.- Make R0-OUT-01 and R0-OUT-02 publish a default route, this way, your users will get to the internet over the nearest one
5.- In case there are some routes R0-OUT-01 doesn't know, but 02 does, it can send the traffic to it over the tunnel
6.- In case R0-OUT-01 or 02 goes down, due to you publishing the default routes and using OSPF, the traffic would get re-routed to the nearest exit

This would achieve what you're looking for.

Hope this helps
 
gjnardoni
just joined
Topic Author
Posts: 22
Joined: Sat Dec 11, 2010 5:20 am

Re: BGP + OSPF (RR instead of "full mesh").

Mon Sep 28, 2015 9:21 pm

Hello shaoranrch,

At first, thanks for replying me.

Regarding you asking ...why are you establishing iBGP...., that's exactly what I want to achieve (my final goal). I tried lots of different configurations to use Route Reflector but I always finish in a routing loop. That's because of my "lack of understanding" the way RR actually works.

As you well see I want to propagate full routes between the routers and then, depends on various things, for example link capacity, choose route on.
Real case:
R4 receive full routing from R3 and R2 and prefer R3 link than R2 one, but if link R1-R3 fails, of course all traffic, including R3 will flow through R2.

The same happen on R2, it prefers routes comming from R4-R3-R1 than R2-R1 because of the link capacity and quality and if just R4-R2 link fall down, then, R2 will send and receive all traffi to and from R1 (R2-R1 link).

3- Yes, I use OSPF to route internal links, I just use static routes to reach destination even if OSPF takes "a long" time to become up. I already delete those static route.

4- Atually R0-OUT-01 and R0-OUT-02 publish default route. That's not the problem.
5 and 6 - Works fine.

Thanks again!
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: BGP + OSPF (RR instead of "full mesh").

Mon Sep 28, 2015 9:54 pm

The link below is a great place to start when trying to figure out route reflectors.

http://wiki.nil.com/BGP_route_reflectors

The biggest problem you are probably running into is using static routes for your loopbacks and transit subnets when OSPF is always the preferred method within a MikroTik based network. Then you can form BGP peerings over loopbacks with the proper loop prevention in place in OSPF and BGP.

Here is a network design we presented at the 2013 USA MUM that walks you through an iBGP network design with route reflection. We build extremely stable ISP and Data Center networks all over the world using those basic design principles for BGP RRs.

http://mum.mikrotik.com/presentations/US13/kevin.pdf

Clustering and In-path vs. out of path.

There are several decisions you have to make when building more than one route-reflector.

1. Clustering - Although in Cisco circles, clustering is considered an out-dated practice due to enhancements in their implementation of BGP for loop avoidance, in MikroTik based networks, clustering is still considered a best practice if you are going to have more than one router reflect routes for the same peers.

2. In Path vs Out of Path - Route reflectors can be put in or outside of the data path and both are valid depending on the design objectives.

In-path - reachability to the next hops being advertised is through the RR - this is common when the RR is also a transit router to reach other networks or in the case of a WISP, typically, a point where several legs of tower networks converge.

Out of path - Routers are in the same switched LAN segment and the RR reflects the next hop of the router that actually has the route and traffic flows via the two forwarding routers and never touches the RRs.

Who is online

Users browsing this forum: No registered users and 20 guests