Routing – BGP – how does IGP know the right route

bgpigpospfrouting

Let's consider a host A in an autonomous system AS100. Suppose it wants to communicate with host B in another AS, say, AS200. In AS100 there are several routers. Within one AS, the rotuing protocols used are Internal gateway protocols such as OSPF or RIP.

AS100 needs to know the path through other AS-es to AS200, so the edge routers in AS100 are BGP routers, BGP is an external gateway protocol used for routing between autonomous systems.

If AS100 is connected to, say, two ASes (it has two eBGP routers), how does host A inside AS100 know which BGP router to talk to, in order to communicate with host B in AS200? Host A tells its router that it wants to communicate with host B. Now, that router would need to know the path to host B. But host B is outside AS100.

Do eBGP routers send their routing tables to all routers (both BGP and IGP) in one AS? I mean, 'normal' routers inside AS have to know a lot, they have to choose the appropriate border router so that host A can calk to host B.

If all routers know the same thing, then why would anyone need iBGP? Generally BGP routing tables are big, so it's probably a false statement, but I'm not sure how could host A know the right path if its neighbour routers didn't know all the routes the border routers have.

Best Answer

There are multiple ways to do this.

The other ASes could be sending a default route, or the router in AS100 could just have a default route configured.

The other ASes could just advertise their own routes through BGP.

The other ASes could advertise full BGP routes to AS100.

BGP has many factors which could play into the decision of which way to switch traffic destined to another AS. This is the subject of entire books, and it is beyond the scope of this site. It is far more complicated than IGP routing protocols, and it may involve many steps to determine the best path. Often is just boils down to how many AS hops away it is to get to the other AS.

You may be confused about the role of iBGP. The distinction of iBGP and eBGP is whether or not the neighbor is in the same AS. An AS will almost always have more routers than just the routers connecting to other ASes. The routers internal to the AS would have the same AS number as their neighbors, so they would use iBGP.

It would also be a huge discussion about how design within an AS. Again, you could have default routes, full or partial routing tables, a combination, etc., or a mix of IGP and iBGP (which is involved because you could use a full-mesh, route reflectors, confederations, etc.).

What BGP neighbors send each other can be controlled. It could be full routing tables, or it could be whatever the AS owner decides is appropriate. there is no one answer to this question.

Related Topic