Network Layer – Border Gateway Protocol (BGP)

In the previous posts we have seen RIP and OSPF protocol in detail. Now let us explore the next important protocol in the network layer i.e. Border Gateway Protocol (BGP) . Border Gateway Protocol is an interdomain (exterior) routing protocol using path-vector routing. It is used for the inter-autonomous system routing i.e. routing among different autonomous systems. 

Let us first recap some of the basic terms related to this concept. As we learned before(in old posts), the internet is divided into hierarchical domains called autonomous systems (AS) .  For example, a large organization that manages its own network and has full control over it is an autonomous system.

A local ISP that provides services to local customers is an autonomous system. We can divide autonomous systems into further categories . 

Now let us understand the concept of path vector routing (basic pillar of BGP) . Distance vector and link-state routing are both intradomain (interior) routing protocols (explained in the previous posts). They can be used inside an autonomous system, but not between any autonomous systems.

These two protocols are not suitable for interdomain routing mostly because of scalability. Both of these routing protocols become intractable when the area of operation becomes large. Distance vector routing is prone to instability if there are more than a few hops (junctions of hosts) in the domain of operation . 

Path vector routing has been proved to be useful for interdomain routing. The principle of path vector routing is similar to that of distance vector routing. In path vector routing, we assume that there is one node (there can be more, but one is enough for our understanding) in each autonomous system that acts on behalf of the entire autonomous system.

We can call it the speaker node. The speaker node in an AS creates a routing table and advertises it to speaker nodes in the neighboring ASs .

Each entry in the routing table will have the information about the destination network, the next router and the path to reach the destination:

 

Network Layer - Border Gateway Protocol (BGP)

Path Vector Messages in BGP (Border Gateway Protocol)

Let us understand this in simple points :

The autonomous boundary routers participate in path vector routing. Their job is to advertise the reachability of networks present in their A.S. to the neighbour autonomous boundary router.

Each router that receives a path vector message verifies whether or not the advertised path is according to its policy ( based on the rules imposed by the router controlling administrator) .

If yes then the router will update its routing table and will modify the message before it is sent to the next neighbour . 

In this modified message it sends its own AS number and replaces the next router entry simply with its own identification. 

Network Layer - Border Gateway Protocol (BGP)

Types of Messages in BGP (Border Gateway Protocol)

BGP uses four different types of messages :

Open message : A BGP router creates a neighbourhood relationship with its neighbour by opening a connection and sending an open message to the intended neighbour.

Update message : This is the most important BGP message. It is used by a BGP routers for one or both the tasks i.e In order to withdraw the destinations that were announced earlier or Announcement of a route to new destination.

Keep-alive message : All the BGP routers (also called as peers) exchange these messages among them regularly so as to convey an information that they are alive (active).

Notification massage : A BGP router (peer) would send the notification method under the following circumstances i.e error condition or while closing the connection.

BGP Header format

All BGP message types use the basic packet header. Open , update , and notification messages have additional fields, but keep-alive messages basically use only the basic packet header. Each BGP packet mainly contains a header whose primary purpose is to identify the function of the packet . the various fields are :

Network Layer - Border Gateway Protocol (BGP)

 

  • Marker : This is a 32 bit field. It contains an authentication value that the message receiver can predict.
  • Length : This is a 16 bit field which indicates the total length of the message in bytes. The value of the length field must be in between 19 and 4096.
  • Type : Type is an 8-bit field that specifies the message type as one of these i.e open , update , notification and keep alive.
  • Data : Contains the upper layer information in this optional field. 

Operation of Border Gateway Protocol (BGP) 

Routing involves two basic activities: determination of optimal routing paths and the transport of information groups (i.e. packets) through an internetwork.

To send and receive packets through an internetwork is relatively straightforward. However, deciding the path or route for the packets can be very complex. Today this has been implemented by means of BGP protocol.

The BGP has been designed to perform the interdomain routing in Transmission Control Protocol Internet Protocol (TCP/IP) networks . 

BGP is an exterior gateway protocol (EGP), which means that it performs routing between multiple autonomous systems (ASs) or domains and exchanges routing and reachability information with other BGP systems.

BGP was developed to replace the Exterior Gateway Protocol (EGP), which is now obsolete as the standard exterior gateway-routing protocol used on the global Internet.

BGP performs three types of routing i.e. inter-autonomous system routing, intra-autonomous system routing, and the pass-through autonomous system routing.

Inter autonomous system routing would take place between two or more BGP routers in different autonomous systems. Peer routers in these systems use BGP so that they can maintain a consistent view of the internetwork topology.

Intra-autonomous system routing takes place between two or more BGP routers that are located within the same autonomous system. Peer routers within the same autonomous system use BGP so that they can maintain a consistent view of the system topology.

The pass-through autonomous system routing takes place between two or more BGP peer routers that exchange traffic across an autonomous system that does not run BGP.

In a pass-through autonomous system environment, the BGP does not deal with the traffic that originates within the autonomous system in question and is not destined for a node in the autonomous system. BGP must have to interact with whatever intra-autonomous system routing protocol is being used to successfully transport the BGP traffic through that autonomous system.

BGP also is used in order to determine which router will serve as the connection point for specific external autonomous systems. The Internet itself is an example of inter-autonomous system routing.

Similar to any routing protocol, BGP maintains routing tables, transmits routing updates, and makes the routing decisions based on routing metrics. The main function of a BGP system is to exchange network-reachability information, which includes the information about the list of autonomous system paths, with other BGP systems.

Finally we reached the end of this post. Stay tuned for more interesting stuff of the network layer protocols.

Spread the Wisdom !!

Techie Aric

Aric is a tech enthusiast , who love to write about the tech related products and 'How To' blogs . IT Engineer by profession , right now working in the Automation field in a Software product company . The other hobbies includes singing , trekking and writing blogs .

Leave a Reply

Your email address will not be published. Required fields are marked *