Community discussions

MikroTik App
 
bradnz
newbie
Topic Author
Posts: 27
Joined: Mon Jan 22, 2018 4:34 am

BGP Import Priority

Mon Jul 30, 2018 5:40 am

Hi

I am learning BGP routes from the same router, via 2 different paths, a primary and secondary route. I then export these routes, and import them into a different VRF on the same router. The issue I have is that one route (the secondary) is preferred over the primary route when importing (or exporting, I'm not sure which), and it just happens to be the WRONG route (its the secondary and not the primary like it should be)! Not matter what I do, I can't change this. I have tried changing the secondary routes AS-path, local preference, distance, all kinds of things, but no matter what I do the primary never is imported as a priority route! If I drop the secondary route (i.e. drop the peer providing this route, the primary will then be imported and will actually operate fine. Here is the routes from the originating VRF:

PRIMARY:
ADb dst-address=1.1.1.2/31 gateway=172.18.1.62 gateway-status=172.18.1.62 on vrf02 reachable via vlan121.168 distance=20 scope=40 target-scope=10 routing-mark=vrf02 bgp-as-path="65000" bgp-med=0 bgp-origin=igp bgp-communities="" bgp-ext-communities="RT:65000:2" received-from=aucak1rt01-BGP-PEER

SECONDARY:
Db dst-address=1.1.1.2/31 gateway=172.21.16.6 gateway-status=172.21.16.6 recursive via 103.19.103.42 vlan461 distance=200 scope=40 target-scope=30 routing-mark=vrf02 bgp-as-path="65000" bgp-local-pref=100 bgp-med=0 bgp-origin=igp bgp-ext-communities="RT:65000:2"


This is how it looks in the final VRF (vrf01) I am trying to import it into:

59 ADb dst-address=1.1.1.2/31 gateway=172.21.16.6 gateway-status=172.21.16.6 recursive via 103.19.103.42 vlan461 distance=200 scope=40 target-scope=30 routing-mark=vrf01 bgp-as-path="65000" bgp-local-pref=100 bgp-med=0 bgp-origin=igp bgp-ext-communities="RT:65000:2"

This is the wrong import. As you can see the distance is higher, the local_preference is lower (100). Im not sure what else I can do.

Any ideas on this one? note, I have changed the destination IP address for the purposes of obscurity only - the subnet is right though.

Thanks
Brad
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7052
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP Import Priority

Mon Jul 30, 2018 11:51 am

Both peers that receive the route are from the same BGP instance?
 
bradnz
newbie
Topic Author
Posts: 27
Joined: Mon Jan 22, 2018 4:34 am

Re: BGP Import Priority

Thu Aug 02, 2018 6:19 am

Sorry for the slow response.

This is all happening on the same router. The two routes in the VRF02 being learned are in the same BGP instance though, if that makes sense, being learned from peers in the same instance.

I should note that the PRIMARY route is being learned from the directly connected peer (on a VLAN interface). The secondary is being learned from a PE connected across a MPLS link (and therefore imported using the RT details).

I hope this makes sense, and happy to provide whatever details you need to help fix this issue.
 
bradnz
newbie
Topic Author
Posts: 27
Joined: Mon Jan 22, 2018 4:34 am

Re: BGP Import Priority

Tue Aug 14, 2018 4:05 am

Is there anyone that can help?!

I have been working on this for days now, and what I have found is that one route to the same destination is ALWAY preferred over the other when importing into another VRF. I cant change this no matter what I do and its going to heavily impact my abilities to be able to provide failover to customers that is reliable because its ALWAYs the secondary that is preferred. Its weird because in the originating VRF, the right BGP route is Active, but that isnt reflected in the VRF route tables the routes are imported into. This was never a problem with our CISCO kit.

I hope that makes sense. Im lost....

Who is online

Users browsing this forum: No registered users and 11 guests