BGP4 -  Border Gateway Protocol( version 4)

Motivation

Basic Operation

Each BGP speaker has a Routing Inforamtion Base ( RIB ), where the it stores the routes it received from other BGP speakers. There are three types of RIBs in a BGP speaker
(1) Adj-RIBs-In :
Contains the routing info received from all the BGP speakers. A decision process is applied to the routes in this RIB to construct the local RIB. There is a Adj-RIBs-In assocaited with each BGP peer connection(?).

(2) Local-RIB:
Contains the routes that are used by the local BGP process.

(3) Adj-RIBs-In :
Contains list of routes that are to be sent to the BGP speakers peers.

Message Types

There are four types of BGP packets

(1) OPEN

The OPEN message is sent after the tcp connection is successful. the OPEN message contains the version number, AS number, hold timer, BGP identifier and other optional parameters. the BGP version to be used is decided by exchanging the OPEN pmackets. the The hold timer is decided as the smallest configured value in both the BGP speakers. The OPEN message may alos contain the authentication information.


 (2) KEEPALIVE

Once the BGP peer connection is established the connection is maintained by sending the keepalive messages. There are the Hold Timer and the Keep Alive timer which are maintained regarding the sending and receiving of KeepAlive Packets.


 (3) UPDATE

The Update packets are sent to advertize or withdraw routes to the peer. In each update packet only one route is advertised, each route has a set of PATH Attributes associated with it. But many routes can be withdrawn using the Update packet.
(4) NOTIFICATION
A Notification packet is sent whenever a error occurs. the various types of errors are
  (a) Message Header Error
  (b) OPEN Message Error
  (c) UPDATE message Error
  (d) HOLD Time expired
  (e) FSM Error
  (f) Cease
     Along with the error code there is a error subcode field and a optional data field.

Path Attributes

Since BGP is based on policy, when it advertises a route to its peer it sends
a route with associated path attributes. the path attributes can be used for
various purposes like route selection, route filtering, control of inbound and
outbound traffic flow, etc.

The various attrubutes arecan be classified as below
 1.    Well-Known Mandatory

 (2) Well-Known Discretionary  (3) Optional Transitive  (4) Optional Nontransitive


The various path attributes are discussed below

 (1) ORIGIN
     It is a wellknown mandatory attribute and it indicates from where the route is be generated - IGP, EGP and from other sources.

 (2) AS_PATH
     The AS_PATH attribute is a wellknown mandatory attribute that
     should be send to along with the route. It indicates the list of Autonomous
     systems through which I can reach destination network. the list of AS is
     either represented as a sequence or a set. A sequence can be used to list the
     path taken. A set is used if the exact path is not known but know the list of
     AS through which we can reach the detination network.

 (3) NEXT_HOP
     The NextHop attribute is used to indicate the border router to
     which the packet has to be sent.

 (4) Multi-Exit-Disc (MED)
     The MED is used by routers to choose among the multiple entry
     points to a AS. By setting the MED properly, we can direct the OUT-BOUND traffic
     accordingly.

 (5) LocalPreference
     The local preference is used within the AS to choose between
     multiple routes to same destination. It is used to direct the IN-BOUND traffic
     accordingly.

 (6) AtomicAggregate
     The atomic attribute is set if the route advertised is an aggreate
     of many more specific routes.

 (7) Aggregator
     It is the router which last performed the aggregation of routes.
 

 There are various other optional attributes like communities, etc.
 

Finite State Machine(FSM)


The BGP process goes through various states and the state changes according to
various events.

Decision Process


A BGP Router is configured with a Policy Information Base and the decision process involves the information in the PIB. The decision process operates on
the Adj-RIBs-In, Local RIB,  Adj-RIBs-Out. The Decision process follows three phases
 

General Configuration of BGP for Networks


( Soon.............)