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.
Cisco DNA Software Demo Series - Cisco ThousandEyesRegister nowWednesday, May 12, 202110:00 am Pacific Daylight Time(San Francisco, GMT-07:00)SaaS applications and cloud-based services are increasingly critical for on-campus users, but they can be challen...