9.5 The BGP Routing Process  
  9.5.2 The BGP routing process model  
To model the BGP process, imagine each BGP speaker having different pools of routes and different policy engines applied to the routes. The model, shown in Figure , would involve the following components:
  • Routes received from peers – BGP receives routes from external or internal peers. Depending on what is configured in the input policy engines, some or all of these routes will make it into the router BGP table.
  • Input policy engine – This engine handles route filtering and manipulation of attributes. Filtering is done based on parameters such as the IP prefix, the AS path, and attribute information.

    The input policy engine is used to manipulate the path attributes and influences the decision process made by BGP. This affects what routes it will actually use to reach a certain destination. For example, if choosing to filter a certain network coming from a peer, it is an indication to BGP that it should not reach that network by way of that peer. A certain route can be given a better local preference than some other path to the same destination. This is an indication that BGP should prefer this route instead of the other available routes.

  • The decision process – BGP goes through a decision process to decide the route or routes it wants to use to reach a certain destination. The decision process is based on the routes that made it into the router after the input policy engine was applied. This is performed on the routes in the BGP routing table. The decision process looks at all the available routes for the same destination, compares the different attributes associated with each route, and chooses one best route. The decision process is discussed later in this module, in the section "The BGP Decision Process".
  • Routes used by the router – The best routes, as identified by the decision process, are candidates to be advertised to other peers. These routes are also presented to the routing engine to be placed in the IP routing table. Not all routes presented to the routing engine will be placed in the routing table. This is because multiple protocols may present the same prefix for installation, and the router must choose among them based on administrative distance. In addition to routes passed on from other peers, the router, if configured to do so, originates updates about the networks inside its own AS. This is how an AS injects its routes into the outside world.
  • Output policy engine – This is the same engine as the input policy engine, applied on the output side. Routes used by the router, the best routes, in addition to routes that the router generates locally are given to this engine for processing. The engine might apply filters and might change some of the attributes, such as AS_Path or metric, before sending the update.

    The output policy engine also differentiates between internal and external peers. For example, routes learned from internal peers cannot be passed on to internal peers.

  • Routes advertised to peers – The routes advertised to peers are routes that made it through the output engine and are advertised to the BGP peers, internal or external.