cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2945
Views
14
Helpful
31
Replies

BGP route reflection problems

j.restaino
Level 1
Level 1

Hi,

I'm having trouble with BGP's route selection criteria. I have a network with NCS 5500; one of them is route reflector and receives route 1.46.0.0/19 via iBGP through three of my routers (R1, R2 and R3) with the following metric.

R1:
AS-PATH: 2914 10089 9587 24378
MED: 30263
IGP Metric: 12609

R2:
AS-PATH: 6939 10089 9587 24378
MED: 2179
IGP Metric: 13103

R3:
AS-PATH: 6939 10089 9587 24378
MED: 3664
IGP Metric: 952

My route reflector is choosing R2's route as best.

I understand the Route Reflector is comparing the route with next hop R2 and R3 through the MED, but it is not comparing the route of R1. I understand that this behavior should not be appropriate, since R1's route is learned by AS 21914 and not 6939, so the selected route should be that of R3 due the lower IGP Metric.

routeFlaps1.png

The problem that is arising is that when router R3 receives from the reflector that the best route is that of R2, MED assumes that the one it learns through iBGP is better and stops announcing the route to the reflector. This has the consequence that the reflector now receives the routes of R1 and R2 and between the two it takes the route of R1 as the best, thereby announcing the route to R3 with next hop R1. This causes R3 to announce the route again since the one learned by eBGP is preferred over the one learned by R1.

routeFlaps2.png

This situation is constantly repeating itself, so my routers have the route in the routing table for a few seconds and are constantly changing.

I would appreciate if someone can help me understand how to solve this problem.

Kind regards
José

31 Replies 31

Ok'

there are 5/6 paths 

The important is path1'2'3

The router select path2 even if the med is higher.

Did you apply med compare in RR??

The RR scape med step until I think it reach router-id.

Hi @j.restaino ,

Thanks for the additional information. Analyzing the output you just provided, I see a couple of weird things:

- The preferred path is from R1.

Path #2: Received by speaker 0
Flags: 0x2000000085058205, import: 0x9f
Advertised to update-groups (with more than one peer):
0.3 0.4 0.5 0.6
Advertised to peers (in unique update groups):
192.168.197.72
2914 10089 9587 24378, (Received from a RR-client), (received & used)
192.168.194.1 (metric 12608) from 192.168.194.1 (192.168.194.1), if-handle 0x00000000
Received Label 24001
Origin EGP, metric 30263, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 2716483273
Community: 6057:1010 6057:32306
Extended community: RT:6057:6057
best of AS 2914, Overall best
Source AFI: VPNv4 Unicast, Source VRF: Internet, Source Route Distinguisher: 7167:6057
- Two paths are received from R1. One from AS2914 and the other from AS6939.

- According to the last topology you provided, the path from AS6939 with a MED of 2179 is received from R2, not R1.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Sorry @Harold Ritter, i attached the wrong file. Here i go again.

Regards

 

Hi @j.restaino ,

It looks like the best path is the one received from R1. So it is correct, right?

Path #2: Received by speaker 0
Flags: 0x2000000085058205, import: 0x9f
Advertised to update-groups (with more than one peer):
0.3 0.4 0.5 0.6
Advertised to peers (in unique update groups):
192.168.197.72
2914 10089 9587 24378, (Received from a RR-client), (received & used)
192.168.194.1 (metric 12608) from 192.168.194.1 (192.168.194.1), if-handle 0x00000000
Received Label 24001
Origin EGP, metric 30263, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 2716483273

Regards,

 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

You need to start searching in RR and R1 and R2.

The MED is 6th in best path order. And also there is prefix not enter in best path selection.

So check weight check LP check AS-path check reachability of prefix next-hop.

Note:- metric to next-hop of prefix is come later all above criteria can effect selection of best path.

Hi @MHM Cisco World 

I did, but looking the documentation i do not understand why the router choose that route.

Regards
José

Can you share 

Show ip bgp x.x.x.x <- x.x.x.x is the prefix you face problems with 

I will test this and check. But I don't think it MED issue. 

So what do you think is the issue here?

Thanks @MHM Cisco World, i will appreciate if you can help us.

Regards
José

MHM

there are two approach here, 

R4 set MED 2000 toward R2 and MED 3000 toward R3 
R6 set MED 500 toward R5

we want RR and R5 path for LO 44.44.44.44 be via R5->R6 then config always med in R5 and RR only 
this make RR have three path (show ip bgp) and select lowest MED 

we want RR and R5 and R2 and R3 path for LO 44.44.44.44 be via R5->R6 then config always med in all routers (R5,R1:RR:,R2,R3)

Screenshot (1068).pngScreenshot (1069).png

@MHM Cisco World  Thanks for the time that you take it did the test. It´s much clear now how "always med" works; but we don´t want to use due the different criteria that our serveral Carriers are using.

Regards

 

BGP routing table entry for 1.46.0.0/19, Route Distinguisher: 7167:6057
Versions:
  Process           bRIB/RIB  SendTblVer
  Speaker         2716599647  2716599647
    Flags: 0x00363201+0x00010000; multipath; 
Last Modified: Oct 18 09:23:07.418 for 03:52:51
Paths: (6 available, best #2)
  Advertised to update-groups (with more than one peer):
    0.3 0.4 0.5 0.6 
  Advertised to peers (in unique update groups):
    192.168.197.72  
  Path #1: Received by speaker 0
  Flags: 0x2000000084028205, import: 0x94
  Not advertised to any peer
  6939 10089 9587 24378, (Received from a RR-client), (received & used)
    192.168.194.1 (IGP metric 13102) from 192.168.194.1 (192.168.194.1), if-handle 0x00000000
      Received Label 16 
      Origin EGP, MED metric 2179, localpref 100, valid, internal, import-candidate, imported
      Received Path ID 0, Local Path ID 0, version 0
      Community: 6057:1002 6057:33323 6057:48401
      Extended community: RT:6057:6057 
      Source AFI: VPNv4 Unicast, Source VRF: Internet, Source Route Distinguisher: 7167:6057
  Path #2: Received by speaker 0
  Flags: 0x2000000085058205, import: 0x9f
  Advertised to update-groups (with more than one peer):
    0.3 0.4 0.5 0.6 
  Advertised to peers (in unique update groups):
    192.168.197.72  
  2914 10089 9587 24378, (Received from a RR-client), (received & used)
    192.168.194.1 (IGP metric 12608) from 192.168.194.1 (192.168.194.1), if-handle 0x00000000
      Received Label 24001 
      Origin EGP, MED metric 30263, localpref 100, valid, internal, best, group-best, multipath, import-candidate, imported
      Received Path ID 0, Local Path ID 1, version 2716483273
      Community: 6057:1010 6057:32306
      Extended community: RT:6057:6057 
      best of AS 2914, Overall best
      Source AFI: VPNv4 Unicast, Source VRF: Internet, Source Route Distinguisher: 7167:6057
  Path #3: Received by speaker 0
  Flags: 0x2000000084018205, import: 0x96
  Not advertised to any peer
  6939 10089 9587 24378, (Received from a RR-client), (received & used)
    192.168.194.11 (IGP metric 12608) from 192.168.194.11 (192.168.194.11), if-handle 0x00000000
      Received Label 24003 
      Origin EGP, MED metric 2354, localpref 100, valid, internal, multipath, import-candidate, imported
      Received Path ID 0, Local Path ID 0, version 0
      Community: 6057:1002 6057:33351
      Extended community: RT:6057:6057 
      iBGP multi-path
      Source AFI: VPNv4 Unicast, Source VRF: Internet, Source Route Distinguisher: 7167:6057

path 2 have higher MED than path 3 
but both have equal IGP metric  so 
path 2 have lowest router ID so it select as best 
and paht 3 is also select as ibgp multipath  since you config multipath iBGP.
there is nothing I see wrong 
you dont config MED compare in RR and what you see normal 

Thanks for your response @MHM Cisco World .I undestand that Path 1 and 3 could be compare using MED because they have the same AS-PATH, but Path 2 comes from a different AS, so Path 1 and 2 could not be compare using MED. I don´t have configured "always compare med"