cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1298
Views
0
Helpful
5
Replies

Redistribution of OSPF into BGP Issue

wmstanfor
Level 1
Level 1

We have two main sites, site A and site B, that communicate via point to point WAN links using BGP. We have two routers, Site A (route1 and Router20 and Site B (Router1 and Router2) at each site with four differant AS numbers. We use OSPF as our IGRP and redistribut it in BGP on our core routers.

Site A, Router 2 is learning the internal subnets for Site a via OSFP. It is puting the routes in the BGP tabel as local with a higher weight. Site A, Router 2 is then advertising it to both routers as Site B. Site B is then acvertising Site A's routes back to Site A, Router1. Site A, Router 1 now thinks the local networks are now accross the WAN and is breaking connectivity

I need to find out why Site A, Router1 is not redistributing OSPF in to BGP as a local route.

5 Replies 5

Richard Burts
Hall of Fame
Hall of Fame

William

I do not understand the logic of having 4 routers each with a unique AS number running BGP within a single organization and I believe that this is part of the cause of your issue. When each router has a unique AS number then all the BGP sessions are EBGP which has an administrative distance of 20 and this is more attractive than the AD of OSPF.

If you want to continue to use unique AS number on each router then a solution might be to implement route filtering on each of the routers so that it would deny routes advertised to it that had the AS number of the other router at its site in the AS path.

Another potential solution might be to configure route maps on each router and used in BGP to assign better weight or local preference to routes advertised by its peer at the same site as compared to advertisements from the routers at the other site.

HTH

Rick

HTH

Rick

I agree that there is no need for two routes at each site, but will not be able to change it. The problem I have is that one of the routers is working. Router2 is putting the OSPF learn route into BGP as a Local and setting the weight higher automaticaly. Router 1 is not doing this on it's own. I am trying to figure out why one router works the way I want it to and the other does not.

SiteA-Router1#show ip bgp 10.10.10.10.

BGP routing table entry for 10.10.10.0/24, version 14350

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

  Advertised to update-groups:

     104        108      

  65012 65016, (received & used)

    10.20.20.6 from 10.20.20.3 (172.20.20.2)

      Origin incomplete, metric 100, localpref 100, valid, external

      Community: 0:88

  65009 65016, (received & used)

    10.20.20.22 from 10.20.20.18 (172.20.20.10)

      Origin incomplete, localpref 100, valid, external

      Community: 0:88

  65011 65016, (received & used)

    10.20.20.6 from 10.20.20.2 (172.31.4.2)

      Origin incomplete, localpref 100, valid, external, best

      Community: 0:88

  65010 65016, (received & used)

    10.20.20.22 from 10.20.20.19 (172.20.20.10)

      Origin incomplete, metric 100, localpref 100, valid, external

      Community: 0:88

SiteA-Router2#show ip bgp 10.10.10.10

BGP routing table entry for 10.10.10.0/24, version 25461

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

  Advertised to update-groups:

     100        105      

  Local

    10.20.20.50 from 0.0.0.0 (10.20.20.163)

      Origin incomplete, metric 100, localpref 100, weight 32768, valid, sourced, best

      Community: 0:88

William

I am puzzled about a couple of things, which might or might not be important for this discussion, and hope that you can clarify them:

- you have described 4 routers but there are 5 AS numbers that show up in the AS path advertisement (65009, 65010, 65011, 65012, and 65016). I deduce that 65016 should be site A router 2, but what are the other 4?

- I would have expected to see one advertisement that had a single AS in the AS path, which would have been router 2 advertising to router 1 at site A. But there is not anything like that. Do router 1 and router 2 peer with each other?

- each router has two different update groups,  104 and 108 on router 1, and 100 and 105 on router 2. What are the differences in update groups?

My thinking about this is based on a couple of assumptions, but there is not information in the post to tell me whether they are accurate or not. So I hope that you can verify them or can correct them:

- I am assuming that the configuration of BGP on both router 1 and router 2 is the same (with the obvious difference of separate AS numbers). Do they have the same network statements and the same redistribute statements? Do they do their peering in the same way?

- I am assuming that both router 1 and router 2 are learning the same routes in OSPF and are redistributing the same OSPF routes into BGP in the same way.

My theory of the problem is that it is a question of which router got to the routes first. In this case it seems to be router 2. Whichever one got the routes first advertised them to its peers and the peers advertise them back. Whichever router was second receives the advertisement of the route and puts it into the BGP table. The router that got them first receives the advertised routes but since its AS number is already in the AS path it does not accept the advertisement and it has only the local entry.

I am guessing that if you were to shut down interfaces that would isolate router 2 or were to reboot router 2, then router 1 would get the local entry and when router 2 became active again that it would have multiple entries.

HTH

Rick

HTH

Rick

Both router1 and router2 are configured the same except AS number. They are both learning the same routes from OSPF. The thing that is really confusing me is that some of the routes are learned in the BGP table both from BGP peers and from OSPF. So that on the networks that are working properly, we see the Local, route learned from OSPF and from other BGP peers. This is what I expect to see for all my routes. The Local is always used due to the fact that BGP edits the weight so that it is preferred.

What I can not figure out is why it works for some networks, but not for others. Everything is the same and I would expect the same behavior for all networks.

Hello William,

I agree with Rick your scenario is uncommon, because the use of iBGP would be more appropriate meaning the use of a single AS number on all routers.

What you are facing is a race condition the first router to advertise in BGP the networks and to have them propagated via all the other eBGP peers win the race. The co-located router installs the eBGP routes as they have AD 20 < OSPF AD 110.

Redistribution is a dynamic process.

As noted by Rick to solve your issue you need to implement appropriate route filtering routers of Site 1 should never learn routes of Site 1 from their eBGP peers or they know them via OSPF or the local node is isolated from the internals of the site.

So in this example siteA router 1 should not accept a route for 10.10.10.0/24 from any eBGP peer.

ip prefix-list DENY-LOCAL-ROUTES permit 10.10.10.0/24

route-map INBOUND deny 10

match ip address prefix DENY-LOCAL-ROUTES

route-map INBOUND permit 20

router bgp XX

neighbor x.x.x.x route-map INBOUND in

neighbor y.y.y.y route-map INBOUND in

...

A similar but more scalable result can be achieved by filtering based on BGP communities that 0:88 community could be used to deny routes with that BGP standard community.

Hope to help

Giuseppe