cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1215
Views
0
Helpful
6
Replies

BGP Aggregation and Path Selection Issues

kradjesh13
Level 1
Level 1

We have 2 CE routers which peers with the PE router and we aggregate 172.29.190.0/19 on both the CE routers under BGP by using the "aggregate-address" statement. Then BGP is redistribute into OSPF Area 0 to reach the internal networks and we use ospf interface costs to steer the traffic internally and the preferred internal path is through R1 and S1.

We are having some issues with the routes, for some reason the aggregate route which originate from R2 is preferred over R1 eventhough the route is originated locally. The outputs and a diagram has been attached for understanding.

 

Outputs from R1

R1#sh ip route 172.29.192.0

Routing entry for 172.29.192.0/19

  Known via "bgp 65000", distance 200, metric 0, type internal

  Redistributing via ospf 1

  Last update from 172.29.32.10 0w6d ago

  Routing Descriptor Blocks:

  * 172.29.32.10, from 172.29.32.10, 0w6d ago

      Route metric is 0, traffic share count is 1

      AS Hops 0

R1#

R1#sh ip bgp 172.29.192.0

BGP routing table entry for 172.29.192.0/19, version 1971668

Paths: (2 available, best #1, table default)

Not advertised to any peer

Local, (aggregated by 65000 172.29.32.10), (received & used)

   172.29.32.10 (metric 8) from 172.29.32.10 (172.29.32.10)

     Origin IGP, metric 0, localpref 100, valid, internal, atomic-aggregate, best

Local, (aggregated by 65000 172.29.32.2)

   0.0.0.0 from 0.0.0.0 (172.29.32.2)

     Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, maxas-limit

R1#

Outputs from R2


R2#sh ip route 172.29.192.0
Routing entry for 172.29.192.0/19
  Known via "bgp 65000", distance 200, metric 0, type locally generated
  Redistributing via ospf 1
  Advertised by ospf 1 subnets route-map BGPtoOSPF       <=========== Only difference between R1 and R2 show results.
  Routing Descriptor Blocks:
  * directly connected, via Null0
      Route metric is 0, traffic share count is 1
      AS Hops 0
R2#

R2#sh ip bgp 172.29.192.0         
BGP routing table entry for 172.29.192.0/19, version 2674
Paths: (1 available, best #1, table default)
  Advertised to update-groups:
     2        
  Local, (aggregated by 65000 172.29.32.10)
    0.0.0.0 from 0.0.0.0 (172.29.32.10)
      Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, best
R2#

The route map  BGPtoOSPF is used to filter and allow 172.29.192.0/19 network from BGP to OSPF and with a metric of 15 at R2 and 5 at R1.

Any help will be appreciated.

Thanks

6 Replies 6

Hi,

Can you share the sanitise configs please.

As it appears that some issue with configuration on R1.

Regards,

Smitesh

Hi,

One more thing, you have put your /19 aggreate pointing at Null 0 on R2.

As per BGP path selection criteria, one of them is also that prefer shortest IGP cost to NEXT-HOP.

Since, in your case, that /19 prefix is learned from R2, it will include that cost as well.

Whereas on R2, it is pointing to Null 0, which is directly connected.

Try putting that /19 to Null 0 on R1 and check after soft clearing bgp.

Regards,

Smitesh

milan.kulik
Level 10
Level 10

Hi,

as I see

R1#sh ip bgp 172.29.192.0

BGP routing table entry for 172.29.192.0/19, version 1971668

Paths: (2 available, best #1, table default)

Not advertised to any peer

Local, (aggregated by 65000 172.29.32.10), (received & used)

172.29.32.10 (metric 8) from 172.29.32.10 (172.29.32.10)

Origin IGP, metric 0, localpref 100, valid, internal, atomic-aggregate, best

Local, (aggregated by 65000 172.29.32.2)

0.0.0.0 from 0.0.0.0 (172.29.32.2)

Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, maxas-limit

it looks like you are using "bgp maxas-limit..." command on your R1 router?

And possibly "aggregate address ...  as-set"?

This command combination could cause the locally aggregated prefix to be ignored as exceed the maximum number of AS numbers permitted within the AS_PATH attibute.

And then the aggregated subnet received from the R2 iBGP neigbor would be preferred.

(The AS set should have been shown in { } within the sh ip bgp 172.29.192.0/19 command output though.)

HTH,

Milan

Hi Milan,

I saw the "maxas-limit" from the output and searched the routers configuration and i cound not find any lines of code in the running config which has "bgp maxas-limit" and i dont know why it appears there. I am going to double check the running configuration tomorrow morning for maxas.

Thanks Guys

Hi All,

A router reboot has fixed the issue.

I don’t have a clue why this happened in the first place or what caused to trigger this to happen. Considering the intensity of the issue, since around 1000 sites are using this links to access their servers, Internet etc.. I am happy the issue got fixed by a reboot.

Thanks

Hi,

possibly the "maxas-limit" had been configured originally and was removed later and the prefix remained ignored by BGP for some strange reason?

BR,

Milan

Review Cisco Networking products for a $25 gift card