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 the 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 attribute manipulation.
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 influence BGP's decision process,
which affects what routes it will actually use to reach a certain
destination. For example, if you choose to filter a certain network
coming from a peer, it is an indication to BGP that it should not
reach that network via that peer. Or, if you give a certain route a
better local preference than some other path to the same
destination, it is an indication that BGP should prefer this route
over the other available routes.
- The decision process - BGP
goes through a decision process to decide the route(s) 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, and 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
chapter, 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 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.
|