Border Gateway Protocol (BGP) (original) (raw)

Last Updated : 10 Oct, 2025

Border Gateway Protocol (BGP) is an Exterior Gateway Protocol (EGP) used to connect autonomous systems (AS) in any topology. Each AS must have at least one BGP-enabled router connected to another AS’s BGP router. Its primary function is to exchange network reachability information between BGP systems. It is a path-vector routing protocol (unlike distance-vector or link-state protocols).

Note: Border Gateway Protocol constructs an autonomous systems graph based on the information exchanged between BGP routers.

Characteristics of Border Gateway Protocol (BGP)

**Example: A router running BGP can be configured to distinguish between the routes that are known within the AS and that which are known from outside the AS.

Functionality of Border Gateway Protocol (BGP)

BGP peers perform 3 functions, which are given below:

Importance of Border Gateway Protocol(BGP)

Types of Border Gateway Protocol

1. External BGP

It is used to interchange routing information between the routers in different autonomous systems, it is also known as eBGP(External Border Gateway Protocol). The below image shows how eBGP interchange routing information.

eBGP

External BGP

2. Internal BGP

It is used to interchange routing information between the routers in the same autonomous system, it is also known as iBGP(Internal Border Gateway Protocol). Internal routers also ensure consistency among routers for sharing routing information. The below image shows how iBGP interchange routing information.

iBGP

Internal BGP

Elements of BGP

Some elements of BGP are assigned to each path and these elements help routers to select a path from multiple paths. Here below are some elements of BGP:

BGP Route Information Management Functions

Difference Between BGP and OSPF

BGP OSPF
It follows the Path Vector Routing Algorithm It follows the Link State Routing Algorithm
The speed of convergence is very slow in BGP The speed of convergence is fast in the case of OSPF
BGP is also called inter-domain routing protocol OSPF is also called intra-domain routing protocol
In BGP routing operation is performed between two AS In OSPF routing operation is performed inside an AS
In BGP, TCP protocol is used In OSPF, IP protocol is used