BGP Protocol 

BGP Protocol is the one in charge of all internet traffic decissions. It maintain a table of IP networks wich designate network reachability among autonomous systems(AS). This is an path vector protocol. What it means that? It means that maintains the path information that gets updated dynamically. Updates which have looped through the network and returned to the same node are easily detected and discarded. This algorithm is sometimes used in Bellman–Ford routing algorithms. Each entry in the routing table contains the destination network, the next router and the path to reach the destination.

Path Vector Messages in BGP: The autonomous system boundary routers (ASBR), which participate in path vector routing, advertise the reachability of networks. Each router that receives a path vector message must verify that the advertised path is according to its policy. If the messages comply with the policy, the ASBR modifies its routing table and the message before sending it to the next neighbor. In the modified message it sends its own AS number and replaces the next router entry with its own identification.

BGP neighbors, or peers are stablished by manual configuration between routers to create a TCP session on port 179. A BGP speaker will periodically send 19-byte keep-alive messages to maintain the connection(60 seconds by default). When BGP is running inside an AS, it is refered to as Internal BGP(IBGP). When it runs between autonomous systems, it is External BGP(EBGP). In the IBGP the default administrative distance is 200.

Routing decisions based on path, network policies and/or rulesets.

BGP peer uses a simple finite state machine(FSM), that consists in six states:

  • Idle
  • Connected
  • Active
  • OpenSent.
  • OpenConfirm
  • Established.

For each peer-to-peer session, a BGP implementation maintains a state variable that tracks which of these six states the session is in. The BGP protocol defines the messages that each peer should exchange in order to change the session from one state to another. The first state is the “Idle” state. In the “Idle” state, BGP initializes all resources, refuses all inbound BGP connection attempts and initiates a TCP connection to the peer. The second state is “Connect”. In the “Connect” state, the router waits for the TCP connection to complete and transitions to the “OpenSent” state if successful. If unsuccessful, it resets the ConnectRetry timer and transitions to the “Active” state upon expiration. In the “Active” state, the router resets the ConnectRetry timer to zero and returns to the “Connect” state. In the “OpenSent” state, the router sends an Open message and waits for one in return. Keepalive messages are exchanged and, upon successful receipt, the router is placed into the “Established” state. In the “Established” state, the router can send/receive: Keepalive; Update; and Notification messages to/from its peer.

BGP maintains its own “master” routing table, called the Loc-RIB (Local Routing Information Base), separate from the main routing table of the router. For each neighbor, the BGP process maintains a conceptual Adj-RIB-In (Adjacent Routing Information Base, Incoming) containing the NLRI received from the neighbor, and a conceptual Adj-RIB-Out (Outgoing) for NLRI to be sent to the neighbor.

Most common problems within BGP protocol are:

  • Configuration problem. Human errors are always in the air.
  • Problems with neighbors establishments.  Could be associated with the above problem, network traffic….

– Transit traffic saturating resources in a multihomed network.

– High volume of routing information, which requires a large amount of memory. As huge as the network as huge as the technology that you should use.

– Routes missing from the BGP or routing table due to issues with advertising or redistributing routes.

  • MTU ( Maximum Transmit Unit) mismatch issues. It is quite important set the correct MTU.

In general, both problems are associated to a human errors. Because the administrators should make an scalable configuration.

Today in a job interview, the interviewer asked me  “-What do you know about BGP?” and I told him: ” I do not know”.

Sometimes when you are not using a technology even if you were using it before, it is easy that you can forget it. But with a simply concept review, in less than 1 hour you can be up to date in that technology because you are just reviewing concepts that you were studying before. But if you do not know about this technology it is difficult to understand in one hour. Anyway….., that’s why I have posted about BGP.

As I always say: “Take the positive things”. In that contest, the positive is that I should study a bit more. 😉

Honestly, thanks interviewer!!