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.

1 Answer 1


You should connect R1 and R2 via iBGP (this doesn't require a direct physical connection). BGP will install the best route for each destination network in the routing tables. Since the routes originate via eBGP, the AD on the routes will be 20, which is normally far less (more preferred) than any IGP or iBGP AD.

Then, simply getting the traffic to one of the WAN routers via IGP will result in the traffic being sent out the correct WAN router because the best path will be chosen from the BGP routes installed in the routing table.

  • BGP by default will install the best route for each destination only in BGP routing tables, not in IP routing tables. IP tables of IGP routers see the default route towards external destinations. If traffic comes to R1 instead R2 , and they aren't connected, R1 could send back packets to the previous hop (from which they was received) along his path to R2. The result in this case is that packets bounce between R1 and the previous IGP hop. In your example, WAN routers are IGP 'backbone' routers running iBGP? In this case ok, they know how choose the correct border router..
    – Alessandro
    Aug 1, 2017 at 8:49
  • However this implies running iBGP not only between border routers, but also in some internal router, correct?
    – Alessandro
    Aug 1, 2017 at 8:54
  • No. You can simply run iBGP on the two WAN routers. You have an IGP that can let the TCP from the two routers connect.
    – Ron Maupin
    Aug 1, 2017 at 12:17
  • BGP is like any other routing protocol in that it installs the best routes in a routing table, and it can have other, backup routes in its database, ready to install in the routing table should the primary route fail. If you receive the same route through both WAN routers, then only one can be installed in the routing table. When it fails, the other is installed. Seriously, this is very elementary BGP stuff. I'm not sure you should be messing with BGP without some expert guidance. The ISPs take a dim view of amateurs doing BGP, and messing it up can get you cut off by an ISP.
    – Ron Maupin
    Aug 1, 2017 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .