Cisco Border Gateway Protocol (BGP) is a complex topic that often overwhelms those just getting into the network arena. It also can be a confusing topic to cover, especially because it differs from many of the well-known routing protocols being used on most internal networks. The purpose of this article is to give a brief overview of BGP, where it is typically deployed, and how it can be helpful to any large-scale networking deployment.
Unlike commonly known routing protocols like RIP, EIGRP, and OSPF, BGP is different fundamentally in how and where it operates. RIP, EIGRP, and OSPF are each considered Internal Gateway Protocols (IGP) — in other words, these protocols are intended to be used on the inside of a network and not necessarily between routing domains.
BGP, on the other hand, is an External Gateway Protocol (EGP), which was designed with the intention of connecting multiple large scale networks. Because of this assumption, BGP is exceptionally well suited for dealing with large-scale networks and a very large routing table while still being able to operate efficiently. The biggest example of a BGP deployment is the Internet, which is exclusively routed using BGP between all core connection points as well as between many of the smaller access points. BGP is also different from other routing protocols because it runs on top of TCP (port 179); this means that BGP neighbors don’t have to be directly connected (okay, this is an overstatement, but for the purposes of this article it will suffice).
BGP is a path vector protocol, which means when BGP neighbors exchange routing information, there are many different pieces of information (vectors) that influence path selection. Some of these vectors include reachable networks, path specific attributes (more about this later), and a list of Autonomous System Numbers (ASN).
ASNs are used by a BGP to define routing domains (similar to EIGRP); typically a company will be assigned a specific personal ASN. A BGP device can then determine how many different external routing domains must be traversed to reach the intended destination simply by looking at the number of different ASNs that exist in the path attribute information. This also makes route loop prevention rather easy, because as long as the local ASN is not seen in a network update, then the path does not contain a loop. For example, say the local ASN is 10 and there are other ASNs that connect to various other routing domains. As long as the ASN 10 does not show up in the path attribute information to a specific destination (as in, go outside and come back through the local ASN), then the path to the destination is loop free.
BGP also includes support for Classless Interdomain Routing (CIDR). This allows networks to be summarized at the highest boundary possible through supernetting. The main advantage to this is that it greatly limits the number of routes that exist in the BGP tables. Just imagine trying to maintain a single routing table that had a route to all existing networks using no summarization.
As I mentioned, there are large numbers of different path attributes that can be used by BGP to control how the traffic for a specific network is routed. These attributes are ordered so a priority exists if multiple routes to the same destination exist, and these will be analyzed in order until the tie is broken (some minor difference occur depending on the platform vendor).
Even broken down like this, BGP is simply a beast; many network engineers can go through their whole networking careers without ever having to deal with a BGP network. For those looking to work at larger enterprises and service providers, however, a close familiarity with BGP is essential. Hopefully the content in this article will get the reader started and begin the long path towards becoming BGP expert.