I know that there are substantially two ways in which BGP and IGP can interact:
1) Distribution of default 0/0 route into IGP (for example OSPF, IS-IS, RIP,..)
2) Injection of BGP-learned route into Interior Gateway Protocol. I've read that the latter is not recommended because it adds an excessive overhead over interior routing protocols, that is not designed to handle such a burden of routes.
However, in some situations, I can't find a valid alternative solution. Consider for example, an AS 'MY AS' multi-homed to two providers:
- R1 connect MY AS with AS1
- R2 connect MY AS with AS2.
- R1 filters and deny some destinations D announced by AS1, basing for example on AS_PATH attribute, but it still accepts other Internet routes.
- R2 receives the same destinations D above, but with different AS_PATH, according with MY AS routing policies.
If both R1 and R2 injects only a default 0/0 route into IGP and they not redistribute any BGP-learned route, internal routers who want to reach external destination D (only matching 0/0 prefix) will follow the shortest path for destination 0/0 with next-hop either R1 or R2.
Suppose that there isn't a direct connection between R1 and R2, what happens if packets for D are forwarded to R1 instead to R2?
The only solution I have in mind is to redistribute something from BGP to IGP..What is the proper command in a Cisco equipment? Anyone has had the same doubt?
Thank you.