{"id":202,"date":"2018-07-31T10:07:52","date_gmt":"2018-07-31T10:07:52","guid":{"rendered":"https:\/\/www.imperva.com\/learn\/?post_type=application_security&#038;p=202"},"modified":"2022-08-08T13:04:23","modified_gmt":"2022-08-08T13:04:23","slug":"border-gateway-protocol-bgp","status":"publish","type":"ddos","link":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/","title":{"rendered":"Border Gateway Protocol (BGP)"},"content":{"rendered":"<h2>What Is BGP?<\/h2>\n<p>Border Gateway Protocol (BGP) is the routing method that enables the Internet to function. Without it, it would not be possible to search on Google or send an email.<\/p>\n<p>BGP is a routing protocol. Here is a simple definition of network routing from John F. Shoch, an American computer scientist who developed the predecessor to <a href=\"https:\/\/www.imperva.com\/learn\/ddos\/tcp-transmission-control-protocol\/\">TCP\/IP<\/a>:<\/p>\n<p><i>\u201cThe <\/i><b><i>name <\/i><\/b><i>of a resource indicates what we seek, an <\/i><b><i>address <\/i><\/b><i>indicates where it is, and a <\/i><b><i>route <\/i><\/b><i>tells us how to get there\u201d.<\/i><\/p>\n<p>The BGP protocol helps find the best route for network traffic seeking to reach an autonomous system (AS). An AS can be an Internet Service Provider or a large organization that controls a network prefix, representing a range of IP addresses. An autonomous system has a unique number called an ASN. BGP determines the best path to the ASN, depending on the topology of network nodes and current network conditions.<\/p>\n<p>To use an analogy, an AS is like a city with many streets. A network prefix is one street, and an IP address is one particular house. Network packets are like cars traveling from one house to another, and BGP is like a navigation app that helps them take the best possible route.<\/p>\n<h2>A Brief History of Internet Traffic Routing<\/h2>\n<p>In the early days of the Internet, there were only a few networks connected to each other. As a result, routing between network nodes was quite static. All that needed to be done to set up routing was to define network nodes and make connections between them as needed.<\/p>\n<p>However, the Internet grew quickly, adding more and more networks, which necessitated a more dynamic routing system. EGP (External Gateway Protocol) was invented to do the job.<\/p>\n<p>EGP is a simple routing protocol based on tree-like hierarchical topologies. In modern networks, tree topologies have become fully connected mesh topologies to allow for maximum scalability.<\/p>\n<p><b>Tree-like vs. full mesh topologies<\/b><\/p>\n<table>\n<tbody>\n<tr>\n<td><img class=\"aligncenter size-full wp-image-2442 lazyload\" alt=\"tree like network topology\" width=\"265\" height=\"236\" data-src=\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg\" \/><\/td>\n<td><\/td>\n<td><img class=\"aligncenter size-full wp-image-2443 lazyload\" alt=\"full mesh network topology\" width=\"265\" height=\"236\" data-src=\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/full-mesh-network-topology1.jpg\" \/><\/td>\n<\/tr>\n<tr>\n<td>In a tree-like topology, to reach E or F, A will have to go through B, C and D.<\/td>\n<td><\/td>\n<td>In a full mesh topology, nodes have many paths to reach each other.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>The Need for BGP<\/h2>\n<p>As the Internet continued to expand, it became increasingly difficult to keep track of all the routes from one network to another. The solution was to transition to an Autonomous System (AS) architecture.<\/p>\n<p>An AS can be an Internet Service Provider, a university or an entire corporate network, including multiple locations (IP addresses). Each AS is represented by a unique number called an ASN. Each AS controls a collection of connected routing prefixes, representing a range of IP addresses. When traffic reaches the ASN, it determines the routing policy inside the network.<\/p>\n<p>As the number of autonomous systems on the internet grew, the drawbacks of EGP became more pronounced. Its hierarchical structure hampered scalability and made it difficult to connect new networks in an efficient manner. It was necessary to define an exterior routing protocol that is more scalable and provides more advanced capabilities.<\/p>\n<p>This new protocol, known as the Border Gateway Protocol, was formalized in 1989.<\/p>\n<h2>BGP Technical Deep Dive<\/h2>\n<p>BGP is designed to exchange routing and reachability information between autonomous systems on the Internet.<\/p>\n<p>Each BGP speaker, which is called a \u201cpeer\u201d, exchanges routing information with its neighboring peers in the form of network prefix announcements. This way, an AS doesn\u2019t need to be connected to another AS to know its network prefix.<\/p>\n<p><img class=\"aligncenter size-full wp-image-2441 lazyload\" alt=\"how border gateway protocol works\" width=\"598\" height=\"476\" data-src=\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/how-border-gateway-protocol-works1.png\" srcset=\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/how-border-gateway-protocol-works1.png 598w, https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/how-border-gateway-protocol-works1-300x239.png 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/p>\n<p>The BGP decision-making mechanism analyzes all the data and sets one of its peers as the next stop, to forward packets for a certain destination.<\/p>\n<p>Each peer manages a table with all the routes it knows for each network and propagates that information to its neighboring autonomous systems.<\/p>\n<p>In this way, BGP allows an AS to collect all the routing information from its neighboring autonomous systems and \u201cadvertise\u201d that information further. Each peer transfers the information internally inside its own autonomous system.<\/p>\n<p>Just like in real life, usually more than one route exists to reach a given destination. BGP is responsible for determining the most suitable route according to the information collected and an organization\u2019s routing policy, which is based on cost, reliability, speed, and other factors.<\/p>\n<div class=\"ddos-banner\"><div class=\"wrap\"><p>See how Imperva DDoS Protection can help you with BGP routing.<\/p>\n<div class=\"cta-container\">\n                                                    <a class=\"impv-yellow-btn\"  event-action=\"Click\"  event-category=\"LC Banner\"  event-label=\"Request demo\"  gtm-track  target=\"_self\" href=\"javascript:openModal('modalid3533', '\/learn\/banner\/virtual\/request-demo\/', 'Personal Demo Request | Imperva');\">Request demo<\/a>\n                                                    <a class=\"gst-yellow-dark-text-btn\"  event-action=\"Click\"  event-category=\"LC Banner\"  event-label=\"Learn more\"  gtm-track  target=\"_self\" href=\"https:\/\/www.imperva.com\/products\/ddos-protection-services\/\">Learn more<\/a>\n                                                <\/div><\/div><\/div><h2>Imperva DDoS Protection<\/h2>\n<p>BGP rerouting can enable powerful protection against <a href=\"https:\/\/www.imperva.com\/learn\/ddos\/denial-of-service\/\">distributed denial of service<\/a> (DDoS) attaks. BGP rerouting can mitigate direct-to-origin <a href=\"https:\/\/www.imperva.com\/learn\/ddos\/ddos-attacks\/\">DDoS attacks<\/a> by screening all incoming network traffic before it reaches its target. It functions at the network level by rerouting malicious network packets to security providers before they can reach DNS servers or other computing resources.<\/p>\n<p>BGP routers can redirect high volumes of traffic to centralized data scrubbing centers used by a security provider. The scrubbing center analyzes traffic and filters out malicious DDoS attack traffic using deep packet inspection. It then allows healthy traffic to pass through to the AS.<\/p>\n<p>Imperva\u2019s <a href=\"https:\/\/www.imperva.com\/products\/ddos-protection-solutions\/\">DDoS Protection<\/a> solution is based on BGP routing. It blocks attack traffic at the edge to ensure business continuity with guaranteed uptime and no performance impact. Secure your on premises or cloud-based assets \u2013 whether you\u2019re hosted in AWS, Microsoft Azure, or Google Public Cloud.<\/p>\n<p>In addition, Imperva provides comprehensive protection for applications, APIs, and microservices:<\/p>\n<p><a href=\"https:\/\/www.imperva.com\/products\/web-application-firewall-waf\/\">Web Application Firewall<\/a> &#8211; Prevent attacks with world-class analysis of web traffic to your applications.<\/p>\n<p><a href=\"https:\/\/www.imperva.com\/products\/runtime-application-self-protection-rasp\/\">Runtime Application Self-Protection (RASP)<\/a> &#8211; Real-time attack detection and prevention from your application runtime environment goes wherever your applications go. Stop external attacks and injections and reduce your vulnerability backlog.<\/p>\n<p><a href=\"https:\/\/www.imperva.com\/products\/api-security\/\">API Security<\/a> &#8211; Automated API protection ensures your API endpoints are protected as they are published, shielding your applications from exploitation.<\/p>\n<p><a href=\"https:\/\/www.imperva.com\/products\/advanced-bot-protection-management\/\">Advanced Bot Protection<\/a> &#8211; Prevent business logic attacks from all access points &#8211; websites, mobile apps and APIs. Gain seamless visibility and control over bot traffic to stop online fraud through account takeover or competitive price scraping.<\/p>\n<p><a href=\"https:\/\/www.imperva.com\/products\/attack-analytics\/\">Attack Analytics<\/a> &#8211; Ensures complete visibility with machine learning and domain expertise across the application security stack to reveal patterns in the noise and detect application attacks, enabling you to isolate and prevent attack campaigns.<\/p>\n","protected":false},"featured_media":0,"template":"","categories":[4,10],"class_list":["post-202","ddos","type-ddos","status-publish","hentry","category-authentication-and-access-control","category-ddos"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Border Gateway Protocol | BGP Routing vs. DNS Routing | Imperva<\/title>\n<meta name=\"description\" content=\"Border Gateway Protocol helps exchange routing information over the internet. Learn how BGP is used for mitigation of network layer DDoS attacks.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Border Gateway Protocol | BGP Routing vs. DNS Routing | Imperva\" \/>\n<meta property=\"og:description\" content=\"Border Gateway Protocol helps exchange routing information over the internet. Learn how BGP is used for mitigation of network layer DDoS attacks.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/\" \/>\n<meta property=\"og:site_name\" content=\"Learning Center\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-08T13:04:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data2\" content=\"Itamar Verta\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/\",\"url\":\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/\",\"name\":\"Border Gateway Protocol | BGP Routing vs. DNS Routing | Imperva\",\"isPartOf\":{\"@id\":\"https:\/\/www.imperva.com\/learn\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg\",\"datePublished\":\"2018-07-31T10:07:52+00:00\",\"dateModified\":\"2022-08-08T13:04:23+00:00\",\"description\":\"Border Gateway Protocol helps exchange routing information over the internet. Learn how BGP is used for mitigation of network layer DDoS attacks.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#primaryimage\",\"url\":\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg\",\"contentUrl\":\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg\",\"width\":265,\"height\":236,\"caption\":\"tree like network topology\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.imperva.com\/learn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DDoS\",\"item\":\"https:\/\/www.imperva.com\/learn\/edge-security\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Border Gateway Protocol (BGP)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.imperva.com\/learn\/#website\",\"url\":\"https:\/\/www.imperva.com\/learn\/\",\"name\":\"Learning Center\",\"description\":\"Imperva\",\"publisher\":{\"@id\":\"https:\/\/www.imperva.com\/learn\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.imperva.com\/learn\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.imperva.com\/learn\/#organization\",\"name\":\"Imperva Inc\",\"url\":\"https:\/\/www.imperva.com\/learn\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.imperva.com\/learn\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2023\/06\/Linkedin-FB-OG-sharing.jpeg\",\"contentUrl\":\"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2023\/06\/Linkedin-FB-OG-sharing.jpeg\",\"width\":1200,\"height\":627,\"caption\":\"Imperva Inc\"},\"image\":{\"@id\":\"https:\/\/www.imperva.com\/learn\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Border Gateway Protocol | BGP Routing vs. DNS Routing | Imperva","description":"Border Gateway Protocol helps exchange routing information over the internet. Learn how BGP is used for mitigation of network layer DDoS attacks.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/","og_locale":"en_US","og_type":"article","og_title":"Border Gateway Protocol | BGP Routing vs. DNS Routing | Imperva","og_description":"Border Gateway Protocol helps exchange routing information over the internet. Learn how BGP is used for mitigation of network layer DDoS attacks.","og_url":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/","og_site_name":"Learning Center","article_modified_time":"2022-08-08T13:04:23+00:00","og_image":[{"url":"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes","Written by":"Itamar Verta"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/","url":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/","name":"Border Gateway Protocol | BGP Routing vs. DNS Routing | Imperva","isPartOf":{"@id":"https:\/\/www.imperva.com\/learn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#primaryimage"},"image":{"@id":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg","datePublished":"2018-07-31T10:07:52+00:00","dateModified":"2022-08-08T13:04:23+00:00","description":"Border Gateway Protocol helps exchange routing information over the internet. Learn how BGP is used for mitigation of network layer DDoS attacks.","breadcrumb":{"@id":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#primaryimage","url":"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg","contentUrl":"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2018\/07\/tree-like-network-topology1.jpg","width":265,"height":236,"caption":"tree like network topology"},{"@type":"BreadcrumbList","@id":"https:\/\/www.imperva.com\/learn\/ddos\/border-gateway-protocol-bgp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.imperva.com\/learn\/"},{"@type":"ListItem","position":2,"name":"DDoS","item":"https:\/\/www.imperva.com\/learn\/edge-security\/"},{"@type":"ListItem","position":3,"name":"Border Gateway Protocol (BGP)"}]},{"@type":"WebSite","@id":"https:\/\/www.imperva.com\/learn\/#website","url":"https:\/\/www.imperva.com\/learn\/","name":"Learning Center","description":"Imperva","publisher":{"@id":"https:\/\/www.imperva.com\/learn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.imperva.com\/learn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.imperva.com\/learn\/#organization","name":"Imperva Inc","url":"https:\/\/www.imperva.com\/learn\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.imperva.com\/learn\/#\/schema\/logo\/image\/","url":"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2023\/06\/Linkedin-FB-OG-sharing.jpeg","contentUrl":"https:\/\/www.imperva.com\/learn\/wp-content\/uploads\/sites\/13\/2023\/06\/Linkedin-FB-OG-sharing.jpeg","width":1200,"height":627,"caption":"Imperva Inc"},"image":{"@id":"https:\/\/www.imperva.com\/learn\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.imperva.com\/learn\/wp-json\/wp\/v2\/ddos\/202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.imperva.com\/learn\/wp-json\/wp\/v2\/ddos"}],"about":[{"href":"https:\/\/www.imperva.com\/learn\/wp-json\/wp\/v2\/types\/ddos"}],"version-history":[{"count":5,"href":"https:\/\/www.imperva.com\/learn\/wp-json\/wp\/v2\/ddos\/202\/revisions"}],"predecessor-version":[{"id":2444,"href":"https:\/\/www.imperva.com\/learn\/wp-json\/wp\/v2\/ddos\/202\/revisions\/2444"}],"wp:attachment":[{"href":"https:\/\/www.imperva.com\/learn\/wp-json\/wp\/v2\/media?parent=202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.imperva.com\/learn\/wp-json\/wp\/v2\/categories?post=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}