Having a project requirement which i was labbing up on GNS3 yesterday night. Attaching the diagram.
Routers R1, R2, R3, R4, R5 are running OSPF in area 0.
R4 & R5 are ASBR.
R4, R5 are connected via MPLS to R6 & running BGP.
1) All the traffic originated from R1 should be Source NAT at R4 or R5 from an allocated pool not part of global outside.
2) R4 should be a preferred path for inbound/outbound. Used AS-PATH Prepend on R5 to be less preferred inbound. Redistributed BGP into OSPF with a better cost via R4.
Detailed configuration is attached into this the discussion thread.
BGP is redistributed into OSPF
Source NAT the traffic originated from R1's Loopback 1 interface. Specific ACLs used depending on the destination
Source as seen by R6 is if the destination is set to 172.31.172.66, then the source is 172.31.164.1
Source as seeb by R6 if the destination is set to 172.21.172.66, then the source is 172.21.164.1
As 172.31.164.0 & 172.21.164.0 is not in the routing table, i originated the route using Null interface.
If there is a failure on the last mile of R4, then things are fine. R1 gets to learn about the destinations 172.31.172.66 / 172.21.172.66 via R3 & moves out via R5.
But if there is a failure of R2 or link between R2 & R4, then the issues comes in. Though R1 starts learning the destination routes via R3 & passes through R5 to R6, but the return traffic tries coming back via R4. The reason is, R6 still knows the return path to 172.31.164.0 / 172.21.164.0 via R4.
How to tackle this?
I thought BGP Conditional Advertisement would work for me. I thought of creating a condition on R4 - ADVERTISE 172.31.164.0 / 172.21.164.0 only if a route 100.100.100.0/24 exist in the routing table. (100.100.100.0/24 is a loopback interface created on R1). Now, a good thing is, as soon as i shutdown the interface on R1 connected to R2, the route for 100.100.100.0/24 vanishes from the routing table of R4 & BGP stops advertising the routes set in Advertise-map. But once i bring back the interface, BGP doesn't advertise those routes back. Not sure, if issue could be a GNS3 bug ?
To do a successful conditional advertisement, the route must be present in the BGProuting table. In my case, 100.100.100.0/24 was learnt via OSPF & wasn't redistributed into BGP which stopped the conditional advertisement.
Listen: https://smarturl.it/CCRS9E18Follow us: https://twitter.com/CiscoChampion Reaching the height of your career is no simple feat. It often requires a combination of pursuing the right education, building the right professional network and being ...
In a typical production SD-WAN deployment, we would probably have many remote sites connected via many different Internet connections to a centralized data center or a regional hub. In most regions in the world, Internet providers will always use some typ...
Listen: https://smarturl.it/CCRS9E16 Follow us: https://twitter.com/CiscoChampion
For all end-users across Cisco’s ecosystem, counterfeiting presents serious risks to network quality, performance, safety, and reliability. It is dangerous becaus...