what-is","metadata":{}}]}}]},"metadata":{"auth":{},"testAttributes":{}},"context":{"page":{"pageUrl":"https://aws.amazon.com/what-is/border-gateway-protocol/"},"environment":{"stage":"prod","region":"us-east-1"},"sdkVersion":"1.0.129"},"refMap":{"manifest.js":"289765ed09","what-is-header.js":"2e0d22c000","what-is-header.rtl.css":"ccf4035484","what-is-header.css":"ce47058367","what-is-header.css.js":"004a4704e8","what-is-header.rtl.css.js":"f687973e4f"},"settings":{"templateMappings":{"category":"category","headline":"headline","primaryCTA":"primaryCTA","primaryCTAText":"primaryCTAText","primaryBreadcrumbText":"primaryBreadcrumbText","primaryBreadcrumbURL":"primaryBreadcrumbURL"}}}

Border Gateway Protocol","metadata":{}}]}},{"fields":{"faqQuestion":"Why is Border Gateway Protocol important?","faqAnswer":"

Border Gateway Protocol (BGP) makes the internet work through data routing. BGP routing is critical because, at its core, the internet is made of hundreds of thousands of autonomous systems. \n

An autonomous system is a smaller network under the control of a single administrative entity. You can uniquely identify such networks by their autonomous system number assigned by the Internet Assigned Numbers Authority (IANA). Data travels between autonomous systems as it moves from source to destination. \n

BGP supports every autonomous system to do the following. \n

Find the best route \n

As data travels across the internet from source to destination, every autonomous system in between has to decide where the data packet should go next. \n

The decision is based on several factors like geographical location, network congestion, and data transfer cost. BGP routing considers these factors and helps determine the next best autonomous system so that data travels on the shortest route from source to destination. \n

Discover network connection changes \n

The structure of the internet is dynamic. New autonomous systems are being added, and old ones are being removed constantly. Every autonomous system must stay updated with information regarding new and obsolete routes. BGP helps systems to discover and remain updated on such network changes. \n

Administer network policies \n

BGP has the flexibility to allow autonomous system administrators to implement their own routing policies. \n

For example, you can configure a router running BGP to distinguish between the routes that are internal and external to the autonomous system. The administrator can set rules to determine whether data should be routed internally or externally. \n

Add a layer of network security \n

BGP supports security in your network management. For example, BGP can authenticate messages between routers using preconfigured passwords. Administrators can verify BGP messages that come from legitimate autonomous systems and filter out unauthorized traffic.","id":"seo-faq-pairs#why-is-border-gateway-protocol-important","customSort":"2"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#border-gateway-protocol","name":"border-gateway-protocol","namespaceId":"seo-faq-pairs#faq-collections","description":"

Border Gateway Protocol","metadata":{}}]}},{"fields":{"faqQuestion":"How does the Border Gateway Protocol work?","faqAnswer":"

Border Gateway Protocol (BGP) works using a mechanism called peering. Administrators assign certain routers as BGP peer or BGP speaker routers. You can think of peers as devices on the edge or boundary of an autonomous system. \n

BGP peers perform the following main functions. \n

Route discovery \n

BGP peers exchange routing information with neighboring BGP peers through network-layer reachability information (NLRI) and path attributes. NLRI includes connectivity information about neighbors. Path attributes include information like latency, hop count, and cost of transmission. \n

After they exchange information, each BGP peer can then construct a graph of network connections around it. \n

Route storage \n

During the discovery process, every BGP router collects route advertisement information and stores it in the form of routing tables. It uses the routing table for path selection and also updates it frequently. \n

For instance, the BGP router receives keep-alive messages every 30 seconds from neighboring routers. It updates the stored routes accordingly. \n

Path selection \n

BGP routers use the stored information to route traffic optimally. The primary factor in path selection is the shortest path, as determined by the stored route graphs. When a destination is reachable from multiple paths, BGP selects the best one by sequentially evaluating other path attributes.","id":"seo-faq-pairs#how-does-the-border-gateway-protocol-work","customSort":"3"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#border-gateway-protocol","name":"border-gateway-protocol","namespaceId":"seo-faq-pairs#faq-collections","description":"

Border Gateway Protocol","metadata":{}}]}},{"fields":{"faqQuestion":"What are the types of Border Gateway Protocol?","faqAnswer":"

Border Gateway Protocol (BGP) is classified as internal and external, depending on where the data is being routed. \n

External BGP routers connect an autonomous system to the global internet. However, large autonomous systems are themselves made up of smaller autonomous systems within them. Internal BGP routes data within a system. \n

External BGP vs. internal BGP \n

The main difference between internal and external BGP peering is the way the BGP route received from one peer is propagated by default to other peers. Here’s an explanation: \n

Next Steps on AWS

Sign up for a free account

Instant get access to the AWS Free Tier.

Sign up 
Start building in the console

Get started building in the AWS management console.

Sign in