Previous Table of Contents Next


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's BGP table.

Input Policy Engine

This engine handles route filtering and attribute manipulation. Filtering is done based on different parameters such as IP prefixes, AS_path information, and attribute information. BGP also uses the Input Policy Engine to manipulate the path attributes to influence its own decision process and hence affect what routes it will actually use to reach a certain destination. If, for example, BGP chooses to filter a certain network number coming from a peer, it is an indication that BGP does not want to reach that network via that peer. Or, if BGP gives a certain route a better local preference (this attribute is discussed later on), it is an indication that BGP would like to prefer this route over other routes.

The Decision Process

BGP goes through a decision process to decide which 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. The decision process 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, after coverage of attributes.

Routes Used by the Router

The best routes, as identified by the decision process, are what the router itself uses and are candidates to be advertised to other peers and also to be placed in the IP routing table.

In addition to routes passed on from other peers, the router (if configured to do so) originates updates about the networks inside its autonomous system. 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

This is the set of routes that made it through the Output Engine and are advertised to the BGP peers, internal or external.

Example Routing Environment

Figure 5-9 illustrates routing in an example environment. In the figure, AS5 is receiving routes from both AS1 and AS2 and is originating its own routes (172.16.10.0/24). To simplify, consider just the flow of updates in one direction, left to right. By applying the engine model to AS5, you will get the following.


Figure 5-9  Example routing environment.

Routes received from peers (these are the routes coming from AS1 and AS2):

  192.213.1.0/24 via AS1.
  0/0 (this is a default route) via AS1.
  193.214.10.0/24 via AS2.
  0/0 (this is a default route) via AS2.
  192.213.1.0/24 via AS2.

Input Policy Engine:

  Do not accept default route 0/0 from AS1.
  Give route 192.213.1.0/24 coming from AS1 better preference than route 192.213.1.0/24 coming from AS2.
  Accept all other routes (this will accept 193.214.10.0/24).

The decision process:

  Because 192.213.1.0/24 has better preference via AS1, I will reach 192.213.1.0/24 via AS1.
  I will reach 193.214.10.0/24 via AS2.
  I will accept 0/0 via AS2.

Routes used by the router:

  I will use 0/0 as default from AS2.
  I can reach 192.213.1.0/24 via AS1.
  I can reach 193.214.10.0/24 via AS2.
  Network 172.16.10.0/24 is one of my local networks that I want to advertise.

Output Policy Engine:

  Do not propagate the default route 0/0.
  Do not advertise 193.214.10.0/24 to AS4.
  Give 192.213.1.0/24 a metric of 10 when sent to AS3.

Routes advertised to peers:

  Toward AS3:
  192.213.1.0/24 via (AS5 AS1) (this means, first AS5 then AS1) with a metric of 10.
  172.16.10.0/24 (via AS5).
  193.214.10.0/24 (via AS5 AS2).
  Toward AS4:
  192.213.1.0/24 (via AS5 AS1).
  172.16.10.0/24 (via AS5).

Controlling BGP Routes

The preceding section discusssed the existence of policy engines that provide attribute manipulation and route filtering. This section discusses attribute manipulation and route filtering, the keys to controlling routing information, in detail. Each BGP attribute is examined to determine what it does and how to use it.

Traffic inside and outside an AS always flows according to the road map laid out by routes. Altering the routes translates to changes in traffic behavior. Among the questions that organizations and service providers ask about controlling routes are: How do I prevent my private networks from being advertised? How do I filter routing updates coming from a particular neighbor? How do I make sure that I use this link or this provider rather than another one? BGP provides the necessary hooks and attributes to address all these questions and more.

BGP Attributes

The BGP attributes are a set of parameters that describe the characteristics of a prefix (route). The BGP decision process uses these attributes to select its best routes. Remember that attributes are part of each BGP UPDATE packet. The next few sections cover these attributes and how they can be manipulated to affect the routing behavior.


Troubleshooting:  
Example: Ch. 10 pp. 326-342. BGP Attributes


Previous Table of Contents Next