The internet is complex, messy, and at times, inefficient.
The use of border gateway protocol (BGP) contributes to this.
Created in 1989, BGP is designed through pragmatism. Though, today’s internet complexity asks for more control of BGP. To understand why we need to understand a few fundamentals about BGP.
Here, we are going to take a look at 10 things to know about border gateway protocol.
Best Path Selection By Default
All traffic run through the public internet goes over BGP best path selection. BGP best path selection uses many criteria to create the best path for internet traffic.
BGP best path selection provides internet service providers (ISPs) and network engineers many network route options. Internet traffic is presented many routes. There is route criteria, such as weight and locality, to determine the best routes.
If there is no criteria assigned, then traffic routes the shortest logical distance over the internet.
Shortest Logical Distance
By default, all internet traffic routes over the shortest logical distance. This is in reference to the fewest number of autonomous system (AS) hops.
At Datapath.io we discuss at length how this is not the optimal system for routing internet traffic. Sending all traffic by shortest logical distance can cause network congestion or jitter. Also, this may not be the fastest route to a destination.
Shortest logical distance being the main criteria provides significant opportunity to improve internet routes.
Border Gateway Protocol Provides Detailed Information
In order for BGP to understand where to send internet traffic next, it needs to reference a data set. The data set provides information for the next hop selection.
The information stored within BGP is through BGP routing tables. BGP routing tables compiles data necessary for BGP best path selection to make routing decisions. The BGP routing tables contain some of the following information:
- Local preference
- Locally generated
- AS_Path length
- Origin type
- Multi-exit discriminator (MED)
- eBGP over iBGP
- IGP metric
- BGP multi-path
- External paths
- Router ID
- Cluster list
- Neighbor address
We discuss each BGP routing table criteria in detail in our BGP best path selection post.
Also, BGP routing tables are regularly published, which you can view the publications here.
Border Gateway Protocol Needs Multiple Internet Connections
As BGP uses path selection, it needs multiple paths to choose from. If you are running BGP in your enterprise network or data center as Bare Metal, you need multiple internet upstream providers to choose from.
The typical number of upstream providers is going to be three. This provides the opportunity, depending on where your internet traffics end destination is, that BGP has options to select the provider with the shortest path.
The other option you have with multiple upstream’s is adjusting your BGP. You can select the internet upstream provider that specifically suits your needs. This is what Datapath.io provides with network optimization.
Peering Agreements Get Preference
If you send enough internet traffic, peering agreements can provide improved performance. Also, peering can provide better internet transit costs.
BGP allows you to give precedence to peering agreements. Thus, engaging in peering agreements becomes advantageous.
A peering agreement is an agreement between two ISPs, content providers or an ISP and content provider. The agreement allows for the exchange of internet traffic between the two free of charge. There are variations of peering agreements, but BGP will allow you to give preference to your providers with agreements.
Internal and External Network Capability
BGP allows for both internal and external networking capabilities.
BGP is most known for being an external network protocol, but if within a data center or enterprise network, you also have the ability to use BGP.
BGP works for an internal network for the sole purpose of connecting autonomous networks. Although there are more internal network protocols, BGP is able to integrate for use with WAN and MPLS networks. Both of which are popular.
Not the Only Networking Protocol
Although used for the public internet, BGP is not the only external network routing protocol.
One reason BGP is used is due to its ability to see all the different prefixes on the internet. This ability lets you understand what networks and network options are on the internet.
Another external network protocol was the exterior gateway protocol (EGP). Although obsolete with use in favor of BGP, it was an early attempt at routing traffic over the internet. EGP only allowed for tree-like topologies. BGP replaced this, as BGP is a distance-vector and path-vector protocol.
There are more protocols for internal networks than external networks.
Autonomous Systems are the BGP Foundation
The whole principle behind BGP is that it is connecting autonomous systems, which are groups of network prefixes. This can be public internet autonomous systems or private network autonomous systems.
It allows you to exchange specific information between an AS and make routing decisions. Autonomous systems, at the beginning, needed to be controlled by larger ISPs. Now, an organization can run many autonomous systems.
For BGP, there are registered autonomous system numbers (ASNs), which correlate to the AS. This provides the information required by BGP to correctly route internet traffic.
You Can Use Specific Routing Criteria
As mentioned above, BGP provides detailed information about how internet traffic can be routed. Currently, traffic is routed the shortest logical distance, with some consideration for peering agreements.
With BGP routing table information, you can extract the cost of particular internet routes, as well as bandwidth. This can provide the option to select internet paths based upon bandwidth and cost.
This is the model that we at Datapath.io have built the company. Using the extensive data and providing better internet routes to suit specific business needs.
You Can Write Your Own BGP
BGP is flexible. With software defined networking, you can write your own version of border gateway protocol. This can be done through OpenFlow, which is how we implement BGP.
Adjusting your own network will become more common place as the adoption of network functions virtualization (NFV) and SDN become more integrated in networks. Soon, we will move past just configuring firewalls with SDN.
BGP has many complexities, but its versatility makes it the protocol of the internet. Although some functions are out of date, like shortest logical distance, SDN provides a framework to make adjustments to suit specific business needs.
To learn more about BGP, download the AWS Network Optimization Whitepaper.