cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3021
Views
34
Helpful
35
Replies

Can BGP play nicely with OSPF

trodecke
Level 1
Level 1

We have a somewhat diverse network. On the "legacy" side (consisting of a dark and leased fiber "MAN", PPP circuits, and a gig fiber based LAN) we have OSPF. On the "New" side we have MPLS as a replacement for our Frame Relay infrastructure. Our telco only supports BGP as a routing protocol so we have BGP across the MPLS. The problem we're having is maintaining a consistent routing table across the BGP/OSPF boundaries. We do not redistribute OSPF into BGP. We control BGP announcements with network statements and prepending. We do however redistribute BGP into OSPF. The tricky part is that we have 4 "shared" entry points into the BGP and OSPF networks. We have 4 DS3 connections coming from the MPLS cloud going to 4 of our major data centers. We also have 4 leased fiber connections going to each of those major data centers. The leased fiber is a rung so the fiber entry point to the data centers is one VLAN. We use 3845s for the DS3 connections. The WAN side has BGP and the LAN side has OSPF. The BGP side uses one AS # for the whole shebang. We've not been able to come up with a consistently stable way to get the BGP routes into OSPF and the OSPF routes into BGP. What typically happens is what I've started calling the "Self Serving Routing Loop". Router A gets a route through OSPF and in turn, via a network statement, injects that route ingo BGP. The MPLS network, via BGP, then sends that route to Router B which dutifully picks it up and drops it into OSPF. OSPF then updates Router A which starts the process all over again. Since Router A thinks Router B is destination for the route through BGP and Router B thinks Router A is a good destination through OSPF, we wind up with a routing loop.

My question is, what is the preferred way of keeping a consistent routing table between OSPF and BGP when there are 4 shared entry points into each network? Using eBGP for the MPLS and iBGP for the LAN/MAN isn't an option due to the costs of upgrading 80+ devices to Advanced Enterprise. I apologize if this my explanation is confusing.

35 Replies 35

John,

Not a problem and thanks for your contribution. I find it easier to read a long thread by hitting the Outline link from the OP's post.

Thank you...Nice to see such a smart group of people here.

Thanks. That makes it trickier though as I'd have to enter in all the OSPF routes that aren't local to that location rather than just entering in the routes that are local to it. Is there a way to do it somewhat reverse of what you've entered? Basically, what we want to do (and what we have now) is for the OSPF routes, the 3845s will populate BGP with their local subnets with a single AS prepended but multiple ASs prepended for all other routes. We do it with a route-map statement now but that route-map statement will get very wicked if we're redistributing OSPF into BGP rather than using the network statements that we have now. We've got something in the neighborhood of 1000 subnets in our routing table. Not huge but big enough that I don't really want to list them individually in a prefix list. ;)

Another thing Terry, you may want to consider using E1 vs E2.

E1 takes into account the cost of the link so you can have routes drawn to the closest exit point.

You will have multiple OSPF routes for the same subnet with the new design. Each WAN edge router will be redistributing about the same BGP routes from the remotes into OSPF so a lot of load-balancing will take place.

__

Edison.

Will do. Thanks!

No problem..I wouldnt mind seeing the final results and what you decide to do.

heres just a tip for the route-map policy

Denying the taged routes from the other ASBR routers.

route-map B-->O deny 10 (RTRA)

match tag 2110

route-map B-->O deny 20 (RTRB)

match tag 3110

route-map B-->O deny 30 (RTRC)

match tag 4110

route-map B-->O permit 40

- I think you know were im going with this

You can either use a prefix-list or access-list or nothing to permit the rest of the untagged routes.

When redistributing the BGP routes into OSPF you can do this: Might been stated above but oh well.

router ospf 1

redistribute bgp 1 subnets route-map B-->O tag 1110

verify the tag value

show ip ospf database - Check the LSA type 5 external routes and they should have a tag value...But you also need to check you metric value and what going on there. Just my two cents. Let me know if you have any other questions.

Review Cisco Networking products for a $25 gift card