< Back to Tech Corner

Why Is BGP the King of Routing Protocols?

Why Is BGP the King of Routing Protocols - a brief overview

Routers must be aware of all networks within the enterprise premises and the available routes to reach them to provide full network connectivity. For that purpose, routing protocols are used such as OSPF, EIGRP, or RIP, to dynamically exchange information and perform appropriate recalculations when network changes happen.

However, these protocols are internal routing protocols and are beneficial only when used inside the networks. When data needs to be sent to an external network, such as a partner network or the public internet, another solution is required.

In the early 1990s, the solution came in the form of a routing protocol that supports external routing without any limitations or setbacks. This protocol is called Border Gateway Protocol (BGP).

In this article, we provide an overview of BGP and the differences from the other internal routing protocols, the benefits it provides, as well as the characteristics and unique approach it has.

Dynamic routing overview flowchart highlighting the BGP exterior routing protocol

Explore your options here at PivIT. Click below to learn more about the router solutions we can bring to your network, whether it be the hardware itself, maintenance, or the field services you need to get online. 

Explore Routers

BGP Overview

Unlike OSPF and EIGRP, which are protocols primarily designed for internal routing inside the enterprise premises, BGP is an exterior routing protocol developed with the single purpose of exchanging data across the internet.

In fact, BGP is the only exterior routing protocol available today and the primary goal is to exchange routes between Autonomous Systems (AS). For context, an AS is defined as a collection of networks under a single technical administration domain.

Usually, this is a service provider, but sometimes even large companies might participate in BGP when they need to communicate publicly without any help from service providers.

In addition, BGP is heavily used in Multi-Protocol Label Switching (MPLS) deployments and is usually part of a service provider's network implementations.

BGP data transfer between two autonomous systems

The main reason why BGP was developed is that interior routing protocols were not designed to work in large networks. So, you might be wondering, what would you define as a large network? Well, we are not talking about the large and complex networks that big companies have, but rather the global public network or the internet.

The main purpose of the interior routing protocols is to learn and, more importantly, converge as quickly as possible when there are network changes. However, they can learn and store network information only to a certain point.

So, how will this work on the internet? The quick answer is…it cannot. This is the reason why we use BGP. It was designed to work fluently and without any limitations in extremely large networks, such as the internet. Moreover, it can store all information about the networks available on the internet, which is a huge improvement over interior routing protocols.

For context, at the time of writing this article in 2022, the BGP table currently contains around 900,000 entries. Without the proper approach, a BGP router will have to make a lot of recalculations when there is a network change, which will result in being extremely resource-intensive on the routers.

For achieving satisfactory optimization, BGP was designed to work very slowly and not react immediately to each network change but wait an extended period before performing any appropriate action. The trade-off of better optimization for slower convergence makes BGP an inappropriate routing choice for inside a network.

As part of PivIT's EXTEND, we offer a secure, isolated, and remote environment to pre-configure your network, compute, and storage hardware prior to deployment to your locations around the world using our out-of-band (OOB) management platform. Find out more about how our Remote Staging Environment works.

BGP Characteristics

Unlike OSPF and EIGRP, which are operating as protocols by themself, BGP uses TCP as a transport mechanism (port 179 to be more precise). The reason for using TCP is the large amount of data it supports to be sent at once before an acknowledgment is received from the receiving router.

This approach provides better optimization because it allows more data to be exchanged during updates, without too many acknowledgments involved in the process.

Like OSPF and EIGRP, which use hello messages to keep the relationship active between the routers, BGP uses a method where periodic TCP keepalive messages are sent every 60 seconds by default.

If the connection is stable, the hold time will never expire and the BGP connection will stay active and continue operating.

After a BGP connection is established between two routers, they exchange their complete routing tables. However, only triggered updates are sent afterward when network changes happen and, as a result, a lot of resources are spared on the routers.

____________

Before we get into the functionalities of BGP, it is important to determine whether you have the knowledge and resources to configure BGP on your devices. Ask yourself the following questions:

  • Do I have the time to handle configurations?
  • Do I have the bandwidth to configure my devices? 

If you answered "No" to either of these questions, consider PivIT's SmartHands through EXTEND. Hire an expert routing engineer to take on these configurations and more. Click below to learn more about SmartHands.

View SmartHands Offerings

____________

BGP Functionalities

BGP operates and functions unlike any other protocol, which makes it unusual and special in many ways. So, what does this mean? Each interior routing protocol is using a unique method to calculate the best route to each network.

For example, RIP uses hop-count, where the shorter the path, the better the route. OSPF and EIGRP use different approaches, yet both rely on the bandwidth parameter of the links, which results in the fastest route being selected for each destination.

BGP is a path vector protocol, so it is quite different than distance vector or link-state routing protocols. Instead of relying on a single parameter making path decisions, such as bandwidth or hop-count, BGP running on Cisco routers uses 11 different criteria called attributes to select the best route. These attributes are:

  1. Weight
  2. Local preference
  3. Local routes > learned routes
  4. AS path
  5. Origin
  6. MED (metric)
  7. EBGP > IBGP path
  8. Closest IGP neighbor
  9. Oldest EBGP path
  10. Lowest neighbor BGP router ID
  11. Lowest neighbor IP address

When several routes are available to reach a network, BGP compares the attributes for each one and always selects the best. Consequently, it is not possible to have two or more equally valued routes and perform load balancing like with other routing protocols.

Furthermore, the implementation process of BGP is also different than with the other internal protocols and requires additional configuration steps. The relationship establishment is not dynamic, and each neighbor must be manually specified on the routers.

Moreover, the networks enabled on the interfaces and running BGP are not dynamically advertised to the neighbors. For that reason, you must define each network that you want to share with the rest of the routers in the AS. Based on the location of the routers forming the relationship, BGP will function as External BGP (EBGP) and Internal BGP (IBGP).

When Is BGP Appropriate to Use?

In the end, even though BGP can be used as a routing protocol in any network irrelevant to the size, it is mainly implemented by service providers and used as a tool for exchanging large amounts of routes publicly.

BGP complexity, architecture, approach, and supported features make this protocol unique. However, implementing BGP is not recommended without having a sufficient background of the basic functionalities it provides and the configuration steps involved in the process.

We hope this article helped you gain knowledge around routing protocols and BGP itself. Continue checking out the Tech Corner where we continually add more content.