How to advertise networks in BGP

Hello Sims

This is one of the fundamental differences between IGPs and BGP. To put it more clearly, OSPF will choose the best route to a particular destination found in its database into the routing table.

BGP on the other hand works a little differently. In order for a network to be installed in the BGP table, as it says in the lesson, it must be either installed using the network command or redistributed from another routing protocol. Now as you mention, in the first case, a prerequisite is that the destination address/subnet mask exist exactly in the routing table. (In the second case, since it is being redistributed, you know that it is already in the routing table).

BGP requires that any local configurations used to allow a router to learn of networks must have, as a prerequisite, a route to that network in the routing table. This ensures that any network that is advertised using a specific local configuration (network/redistribution) can indeed be reached from that router.

Now notice I’ve stressed “local configuration” in my statements above, refering to the network and redistribution features of BGP. The reason I have done this is because a router can learn about BGP routes from one additional source: neighboring BGP routers. Any routes that are advertised from neighbors and reach a router are automatically put in the BGP table without the prerequisite of requiring an exact mach in the local routing table. From there, the best match is installed in the routing table.

The result is that any routes in the BGP table that are in there because of the network command or redistribution, never enter the routing table as BGP routes, but either as static routes or routes learned by an IGP. Only BGP routes learned from neighbors actually find themselves in the routing table as BGP learned routes.

I hope this has been helpful!