Border Gateway Protocol (BGP) is the postal service of the Internet. When someone drops a letter into a mailbox, the Postal Service processes that piece of mail and chooses a fast, efficient route to deliver that letter to its recipient. Similarly, when someone submits data via the Internet, BGP is responsible for looking at all of the available paths that data could travel and picking the best route, which usually means hopping between autonomous systems.
IGP versus EGP:
IGP | EGP |
---|---|
Interior gateway protocol (IGP) | Exterior gateway protocol (EGP) |
A routing protocol operating within an Autonomous System (AS). RIP, OSPF, and EIGRP are IGPs. | A routing protocol operating between different AS. BGP is an interdomain routing protocol (IDRP) and is an EGP. |
BGP Basics:
- The Internet is a collection of autonomous systems that are interconnected to allow communication among them.
- BGP provides the routing between these autonomous systems.
- BGP is a path vector protocol.
- It is the only routing protocol to use TCP.
- BGP version 4 (BGP-4) is the latest version of BGP, Defined in RFC 4271 that Supports super-netting, CIDR, and VLSM.
- BGP4 and CIDR prevent the Internet routing table from becoming too large.
- Without CIDR, the Internet would have 2,000,000 + entries.
- With CIDR, Internet core routers manage around 300,000 entries.
Autonomous Systems (AS):
- An AS is a group of routers that share similar routing policies and operate within a single administrative domain.
- An AS typically belongs to one organization.
- A single or multiple interior gateway protocol (IGP) may be used within the AS.
- In either case, the outside world views the entire AS as a single entity.
- If an AS connects to the public Internet using an exterior gateway protocol such as BGP, then it must be assigned a unique AS number which is managed by the
- Internet Assigned Numbers Authority (IANA).
AS Numbers:
- AS numbers can be between 1 to 65,535.
- RIRs manage the AS numbers between 1 and 64,512.
- The 64,512 – 65,535 numbers are reserved for private use (similar to IP Private addresses).
- The IANA is enforcing a policy whereby organizations that connect to a single provider use an AS number from the private pool.
Note:
1. The current AS pool of addresses is predicted to run out by 2012.
2. For this reason, the IETF has released RFC 4893 and RFC 5398.
3. These RFCs describe BGP extensions to increase the AS number from the two-octet (16-bit) field to a four-octet (32-bits) field, increasing the pool size from 65,536 to 4,294,967,296 values.
BGP Operational Overview:
When two routers establish a TCP-enabled BGP connection, they are called neighbors or peers. Peer routers exchange multiple connection messages. Each router running BGP is called a BGP speaker.
When BGP neighbors first establish a connection, they exchange all candidate BGP routes. After this initial exchange, incremental updates are sent as network information changes.
BGP Use Between AS:
BGP provides an interdomain routing system that guarantees the loop-free exchange of routing information between autonomous systems.