Pages

2/21/2020

Multiple Mutual Redistribution OSPF <> BGP

Nearing the close of a big project.  Connectivity for two nearly equal sized networks:
First is OSPF overlay on dual service provider MPLS WANs advertising a single IP via BGP.  These IP's are used to establish DMVPN connectivity to hub sites.
The other has a very simplified remote office with just a couple VLANs defaulting to a core switch.  That core switch is a BGP neighbor with the single MPLS service provider router. 

Design Goals

1.     Add point to point connection between new routers PRI-P2P and PH-P2P
2.     Add MPLS to Philadelphia site connected to new router PH-L3
3.     Route user traffic primarily over MPLS
4.     Use point to point connection for communication between specific datacenter systems with policy routing.
5.     If MPLS path fails, user traffic should be routed over point to point circuit automatically.
6.     Redistribute OSPF into BGP on:  PRI-P2P & PH-L3.
7.     Redistribute BGP into OSPF on:  PRI-P2P & PH-L3.
8.     Do not redistribute BGP into OSPF for subnets only used for DMVPN.
9.     Prevent redistribution from creating routing loops.  That is, do not allow redistribution of routes that have been redistributed already by the same or another router.
10.  Avoid asynchronous routes between hosts
11.  Do not redistribute default routes

Things I have learned

I have a fair amount of experience but have never done much redistribution.  I had to learn a lot in order to make this work.  I got help from vendor(s) and colleagues.  Did a lot of googling and reading.  The following is an unorganized list of things that I noticed or that helped me once I realized them.
  • Route redistribution might be better called route import because redistribution into a routing protocol is done in the configuration of the protocol intended to receive routes.  That is, ospf configuration would be added to redistribute "into OSPF".
  • Route redistribution does not put routes into the routing table on the router doing the redistribution.
  • Redistribution isn't really the hard part.  It is about figuring out the routing protocols for troubleshooting and manipulating them to avoid loops and so forth.
    • Route filtering
    • Route tagging
    • In addition to routing table, there will be a database of potential routes--only one of which will go into the routing table.  (show ip bgp)
    • Metric
    • I also assume that redistribution behavior has different rules/behaviors according to what routing protocol is pulling in the routes.
    • BGP commands to show route advertisements sent and received
    • timer adjustments.
  • I cannot found an example on internet of mutual redistribution between OSPF & BGP.
  • BGP doesn't have TAGs.  Uses COMMUNITY.  But the idea is the same.
  • Everything seems to work as desired when a state is achieved where, on the router doing redistribution, the routing table holds OSPF routes for all the "native" OSPF locations and BGP routes for all the "native" BGP routes.
  • To prevent routing loops and achieve the state described above it is important to filter route advertisements in/out in addition to applying tagging to the redistribution config.
  • Use traffic steering to determine primary paths.  i.e. OSPF cost & BGP path length.  Remember that OSPF cost required to make this happen could affect the overall design of the network if costs are involved and some existing OSPF configuration may need adjusted on existing more routers.  In TS case, a bigger OSPF cost is needed for sites that are manually configured with higher cost to prefer the TW path.
  • The routes for the BGP MPLS IP's used for DMVPN must not get into the "overlay" routing table.  That is, if BGP routes for the loopbacks used to establish the DMVPN tunnels get into OSPF then OSPF stops working.  "mid-chain attempting to stack…."
  • BGP
show ip bgp neighbors [IP of neighbor] advertised-routes
show ip bgp neighbors [IP of neighbor] received-routes
show ip bgp

No comments: