Border Gateway Protocol (BGP) is effectively the universal navigation system of the Internet, a digital postal service that provides the necessary routing information for public Internet networks, or autonomous systems (AS) to steer traffic to each other. The big challenge is that, although the Internet functions like a single network, it is really a collection of many different administrative domains working in harmony with each other. Without BGP, the Internet wouldn’t work.
Simply put, each AS is an administrative domain of one or several IP address blocks, also known as prefixes, and BGP is used by an AS to tell the rest of the Internet which addresses can be reached through that particular AS. It also provides other mechanisms to influence the way traffic is routed. Specific metrics can be applied, to control things like cost (for example, when prioritizing certain upstream transit providers) and load balancing. Filtering can also be implemented with BGP, providing AS network administrators with a powerful traffic engineering toolkit.
BGP is used to populate and maintain the global Internet routing table - a telephone book, if you like, for the Internet. This is essentially a route matrix that tells edge routers in a specific AS how to send traffic to a destination (IP address) outside the home network. From this, the best route can be established for traffic to take. Due to the vast number of networks connected, and the sheer number network prefixes involved, the global Internet routing table is very large and currently has more than 500,000 entries. It is for this reason that the IP address information communicated is aggregated into blocks or prefixes, and the routing table is only updated when a network communicates a significant change in its logical structure - for example, when a new network block is added or removed.
The size and complexity of the Internet routing table means that powerful routing hardware, capable of processing a very large routing table, is a prerequisite for anyone running their own AS. Because the Internet is a common system, all route information must be available to all networks connected to it.
The following diagram illustrates, in very simple terms, the fundamental model of BGP and how it can be applied to manage routing across multiple paths: