What is BGP (Border Gateway Protocol)? Definition and use

The Border Gateway Protocol is used online as a path vector and routing protocol. It forms the basis for exchanging data about the reachability of available routers and managing data packets. BGP can connect internally and externally autonomous systems and provides network stability in the event of router failures.

$1 Domain Names

Register great TLDs for less than $1 for the first year.

Why wait? Grab your favorite domain name today!

Matching email
SSL certificate
24/7/365 support

What is a BGP?

The Border Gateway Protocol is used to stabilize the internet network of the global routing system. Abbreviated to BGP or BGP protocol, it’s a path vector protocol that provides and exchanges information about reachable or failed routing paths. It provides better networks stability by acting as an exterior gateway protocol and an interior gateway protocol.

With BGP, autonomous systems can be connected internally and across systems in order to exchange data packets efficiently. The BGP basics, including the current version BGPv4, are defined in detail in RFC 1163. BGP routing uses TCP port 179 to exchange data and information. The basis for networking using BGP is the standardized internet protocol under the abbreviation TCP/IP.

When is BGP used?

The Border Gateway Protocol is used as external BGP (eBGP) and as internal BGP (iBGP). Being the only external gateway protocol on the internet, it’s used for routing and managing data exchange between and within autonomous systems. By making decisions based on policies and rules defined by network administrators, it guarantees better network stability. This is possible, for example, by allowing routers to flexibly adapt in case of failures and to choose other logical routing paths available via BGP for exchanging packets. In addition, BGP updates enable routers to add new ones to the default routing table in use.


The IPv6 addressing type anycast is closely related to the BGP protocol. BGP routing is used to enable communication between computers in anycast networks.

How do BGP networks work?

BGP networks use a routing table to control and manage data packets for networking and data exchange between routers. Routers generate the table’s BGP information with incoming router information and the RIB (Routing Information Database) stored on the router. The RIB not only includes information about external and internal peers, but also updates the routing table based on new information about the current BGP peer group and available or no longer available paths, routers and peers. BGP routers use TCP connections and TCP port 179 to exchange messages and data, for example:

  • OPEN: starts the exchange of information of a BGP session
  • UPDATE: transmits information about modified or new paths
  • KEEPALIVE: regular KEEPALIVE messages acknowledge OPEN messages and inform connected routers that a session should be maintained
  • NOTIFICATION: used to delete routing paths or to abort a session if the KEEPALIVE message fails to appear

BGP determines the best path for data exchange based on the routing table and corresponding path attributes such as:

  • Reachable autonomous systems (AS_PATH)
  • Required hops or intermediate nodes (Next Hop)
  • Cost (IGP metric)
  • Prioritized parallel connections (multi-exit discriminator)

BGP routing can be applied with IPv4 and IPv6 and other internet protocols or MPLS labels. In addition, BGP works according to the OSI model on the OSI transport layer to control the network layer

Providing a constant exchange to available or new paths via BGP, BGP routers can create graphs to map networked paths within or between autonomous systems. This ensures reliable data and information exchange in networks, improves network stability and prevents loop formation.

What’s the difference between internal and external BGP?

The distinction between external BGP (eBGP) and internal BGP (iBGP) depends on whether networks share data between different autonomous systems and BGP peer groups or within an autonomous system (AS) with internal peer groups.

Where routers are networked within an AS, either the OSPF protocol (Open Shortest Path First), based on the mesh principle, or iBGP as the Interior Gateway Protocol (IGP) are used for the shortest path between all internal routers meshed via BGP. Route reflectors can prevent scaling problems in large networks. Connection to the route reflector is sufficient for BGP routers. In turn, these forward learned route information to internal AS routers via the external BGP. In order to avoid a single point of failure due to route reflectors, these are usually used as clusters.

Issues of security and problems caused by the Border Gateway Protocol

When it comes to network security, BGP routers are quite vulnerable to attacks such as Denial of Service (DoS). This is where routers are flooded with packets. Another BGP routing vulnerability is BGP hijacking, where hackers impersonate the AS and routing source to intercept or redirect traffic.

BGP service issues and error or subcode for possible timeout or processing issues may result if:

  • information exchange fails due to incorrectly formatted or incomplete/false router information.
  • memory or working memory is insufficient.
  • updates are too slow.

Professional Email Address & Personal Domain Name

Get an email address as professional and unique as you are including a free matching domain!

Address book
Virus protection
We use cookies on our website to provide you with the best possible user experience. By continuing to use our website or services, you agree to their use. More Information.