cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3671
Views
10
Helpful
18
Replies

wrong BGP Path Selection?

kfr
Level 1
Level 1

Hello,

we have a BGP Router with the full Internt Routing Table, which is connected to an internal BGP Route-Reflector and an Internet Exchange.

In the follwing output i'm wondering why the Router has elected the path via AS 20676, although it`s an internal learned Route and there's another external path:

#show ip bgp 195.160.248.0/22

BGP routing table entry for 195.160.248.0/22, version 369303261

Paths: (5 available, best #4, table default)

  Not advertised to any peer

  8881 34161

    80.81.203.35 (metric 20) from XX.XX.XX.67 (XX.XX.XX.67)

      Origin IGP, metric 90, localpref 90, valid, internal

      Community: 0:174 0:1299 0:3356 0:15169 XXXX:1102 XXXX:1820 XXXX:1999 43252:43252

      Originator: XX.XX.XX.82, Cluster list: 0.0.0.20

  8881 34161

    80.81.192.80 from 80.81.193.157 (80.81.193.157)

      Origin IGP, metric 101, localpref 90, valid, external

      Community: 0:174 0:1299 0:3356 0:6762 0:8391 0:8442 0:9189 0:12329 0:12355 0:12654 0:15169 0:16276 0:20633 0:21263 0:41039 6695:6695 XXXX:1105 XXXX:1810 XXXX:1999

  8881 34161

    80.81.192.80 from 80.81.192.157 (80.81.192.157)

      Origin IGP, metric 101, localpref 90, valid, external

      Community: 0:174 0:1299 0:3356 0:6762 0:8391 0:8442 0:9189 0:12329 0:12355 0:12654 0:15169 0:16276 0:20633 0:21263 0:41039 6695:6695 XXXX:1105 XXXX:1810 XXXX:1999

  20676 34161

    XX.XX.XX.76 (metric 2) from XX.XX.XX.66 (XX.XX.XX.66)

      Origin IGP, metric 0, localpref 90, valid, internal, best

      Community: XXXX:1100 XXXX:1810 XXXX:1999

      Originator: XX.XX.XX.76, Cluster list: 0.0.0.20

  1299 20676 20676 20676 34161

    213.248.73.137 from 213.248.73.137 (80.239.146.37)

      Origin IGP, localpref 80, valid, external

      Community: XXXX:1000 XXXX:1810 XXXX:1999

According to http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml,

rules 1-5 cannot be used for an best path selection, because all attributes are equal.

Rule 6 should not be relevant, because the MED are only be compared if the first AS in the path is the same. but in this case the chosen Path over AS20676 has another first AS comparing to the Path over AS8881.

Rule 7 should be the tie-breaker in this case, because the path over AS20676 is an internal route (learned via iBGP from a Route-Reflector).

The result should be, that the external learned path over AS8881 should be chosen and prefered over internal routes!!!

The Router is an 7600/SUP720 with IOS 1.2(33)SRE

18 Replies 18

Thank you very much Giuseppe!

have a great weekend.

Regards,

Soroush.

Hope it Helps!

Soroush.

mohammad saeed
Level 5
Level 5

I don't think that

refer the path with the lowest multi-exit discriminator (MED).

Note: Be aware of these items:

  • This comparison only occurs if the first (the neighboring) AS is the same in the two paths. Any confederation sub-ASs are ignored.In other words, MEDs are compared only if the first AS in the AS_SEQUENCE is the same for multiple paths. Any preceding AS_CONFED_SEQUENCE is ignored.
  • If bgp always-compare-med is enabled, MEDs are compared for all paths.You must disable this option over the entire AS. Otherwise, routing loops can occur.
  • If bgp bestpath med-confed is enabled, MEDs are compared for all paths that consist only of AS_CONFED_SEQUENCE.These paths originated within the local confederation.
  • THE MED of paths that are received from a neighbor with a MED of 4,294,967,295 is changed before insertion into the BGP table. The MED changes to to 4,294,967,294.
  • Paths received with no MED are assigned a MED of 0, unless you have enabled bgp bestpath med missing-as-worst .If you have enabled bgp bestpath med missing-as-worst , the paths are assigned a MED of 4,294,967,294.
  • The bgp deterministic-med command can also influence this step.Refer to How BGP Routers Use the Multi-Exit Discriminator for Best Path Selection for a demonstration.

and KFR didn't enabled bgp always-compare-med to make MED are prefared!

Also he wants to go to this Network 195.160.248.0/22 and not Downstream! also kfr changed the Local Pref. to go out no come in!! So External metric will not share!! Also this sentence"Not advertised to any peer"  should not appear even in Route reflector router! and I haven't seen this sentence in any scenario even in roue reflector client!

I imitate this scenario and I got the external router prefered the best path.

mohammad saeed
Level 5
Level 5

This Link will help you kfr to troubleshoot "Not advertised to any peer"!

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800945ff.shtml

Hello,

I think I have an explanation here

P1 Vs P2  - P1 because of low MED ( since next AS is same for both)

P1 VS P3 - P1 because of low MED ( since next AS is same for both)

P1 VS P4 - P1 because of lower metric to next hop

P1 Vs P5 - P1 because P1 is shortest AS PATH

Kindly correct me if Iam wrong.