{"id":219,"date":"2024-07-17T17:10:46","date_gmt":"2024-07-17T17:10:46","guid":{"rendered":"https:\/\/www.zframez.com\/articles\/?p=219"},"modified":"2025-07-29T10:32:37","modified_gmt":"2025-07-29T10:32:37","slug":"bgp-protocol","status":"publish","type":"post","link":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol","title":{"rendered":"Introduction to BGP Protocol"},"content":{"rendered":"<body>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Introduction to BGP \u2013 The Backbone of Internet Routing<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we\u2019ll go over the basics of BGP (Border Gateway Protocol) and what makes it different from other routing protocols. If you\u2019re just getting started with routing or trying to understand how large networks communicate over the internet, this will help build a solid foundation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. What is a Routing Protocol?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>routing protocol<\/strong> is used by routers to learn about the networks around them and to decide the best path to reach a destination. Its main functions include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Discovering routes<\/strong> to different networks<\/li>\n\n\n\n<li><strong>Selecting the best route<\/strong> based on metrics or policies<\/li>\n\n\n\n<li><strong>Updating routing tables<\/strong> dynamically when the network changes<\/li>\n\n\n\n<li><strong>Exchanging route information<\/strong> with neighboring routers<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">There are different types of routing protocols, and each one is used for specific scenarios. BGP is one of them\u2014but it works differently from most others.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. AS, IGP, and EGP \u2013 The Context of BGP<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before we understand BGP, we need to understand what an <strong>Autonomous System (AS)<\/strong> is.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An <strong>AS<\/strong> is a collection of IP networks and routers under a single organization or administrative domain.<\/li>\n\n\n\n<li>Every AS has a unique number called the <strong>ASN (Autonomous System Number)<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Now, routing protocols are broadly classified into two types:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>IGP (Interior Gateway Protocol):<\/strong> Used within a single AS (e.g., OSPF, EIGRP, RIP)<\/li>\n\n\n\n<li><strong>EGP (Exterior Gateway Protocol):<\/strong> Used between different ASes<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Border Gateway Protocol (BGP) \u00a0is the only EGP in use today.<\/strong> <strong>that routes data between different autonomous systems<\/strong>\u00a0on the internet. RFC 4271 specifies BGP, highlighting its crucial role in maintaining the global internet\u2019s vast, interconnected landscape.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. What Makes BGP Different?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">BGP is designed for very large and complex networks, like the internet. It\u2019s different from traditional IGPs in two important ways:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>a) Policy-Based Routing<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unlike protocols like OSPF that choose the shortest path based only on cost or metrics, <strong>BGP allows administrators to define routing policies<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can choose routes based on business rules, security, performance, or agreements between organizations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Imagine BGP as the internet\u2019s diplomatic mediator, managing how different countries (or autonomous systems) interact to route data. It doesn\u2019t just find the shortest path; it chooses the best route based on a set of agreed-upon rules.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>b) Scalability<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">BGP can handle <strong>hundreds of thousands of routes<\/strong>, making it ideal for service providers and internet backbones. Protocols like OSPF and EIGRP are not designed to scale to that level.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. BGP Peering \u2013 How Routers Communicate<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Routers that run BGP don\u2019t automatically discover neighbors like in OSPF. Instead, they form manual connections called BGP peerings or BGP sessions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are two types of BGP peerings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>iBGP (Internal BGP): Between routers within the same AS<\/li>\n\n\n\n<li>eBGP (External BGP): Between routers in different ASes<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The purpose of peering is to exchange routing information. Each peer advertises what networks it knows, and BGP decides how to reach them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unlike some other protocols, BGP does not require peers to be directly connected physically. Since it uses unicast IP addresses to establish TCP sessions, BGP peerings can be formed even over multiple hops. This is quite common in iBGP, where peers may be several routers apart.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, in eBGP, direct connection is typically preferred unless additional configurations (like TTL settings or loopbacks) are used.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5. Path Vector Protocol and Attributes<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">BGP is a <strong>path vector protocol<\/strong>, meaning it doesn\u2019t just say \u201cI know a path,\u201d but it also tells you <strong>how it got there<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each BGP route comes with a set of <strong>path attributes<\/strong> that help routers decide the best path. These attributes include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>AS Path<\/strong> \u2013 the list of ASes the route passed through<\/li>\n\n\n\n<li><strong>Next Hop<\/strong> \u2013 the IP address to reach the destination<\/li>\n\n\n\n<li><strong>Local Preference, MED, Origin, etc.<\/strong> \u2013 used for policy decisions<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This is what allows BGP to support complex routing decisions across the internet.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>6. Why BGP Uses TCP<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">BGP uses <strong>TCP (port 179)<\/strong> to establish and maintain connections between peers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using TCP provides several advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Reliable delivery<\/strong> of route updates<\/li>\n\n\n\n<li><strong>Connection management<\/strong> with built-in handshake and retransmission<\/li>\n\n\n\n<li>No need for BGP to implement its own error checking or reliability logic<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Because of this, BGP can focus purely on routing logic, and let TCP handle reliability.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"433\" src=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=1024%2C433&#038;ssl=1\" alt=\"Illustration of a BGP packet with encapsulated headers: BGP header showing message types (Open, Update, Keepalive, Notification), TCP header with destination port 179, IP header showing destination as neighbor\u2019s unicast IP, and Ethernet header at the bottom.\" class=\"wp-image-1229\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=1024%2C433&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=300%2C127&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=768%2C325&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=1536%2C649&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?w=1836&amp;ssl=1 1836w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">BGP packet structure showing layered encapsulation: BGP over TCP, IP, and Ethernet<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Summary Table<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Routing Protocol<\/td><td>Allows routers to exchange and update route information<\/td><\/tr><tr><td>AS (Autonomous System)<\/td><td>A group of networks under one organization with a unique ASN<\/td><\/tr><tr><td>IGP<\/td><td>Protocols used within an AS (e.g., OSPF, EIGRP)<\/td><\/tr><tr><td>EGP<\/td><td>Protocol used between ASes (BGP)<\/td><\/tr><tr><td>BGP<\/td><td>A scalable, policy-based EGP used on the internet<\/td><\/tr><tr><td>iBGP<\/td><td>Peering between routers within the same AS<\/td><\/tr><tr><td>eBGP<\/td><td>Peering between routers in different ASes<\/td><\/tr><tr><td>Path Vector<\/td><td>BGP uses path attributes to make routing decisions<\/td><\/tr><tr><td>TCP<\/td><td>BGP uses TCP for reliable communication on port 179<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n<\/body>","protected":false},"excerpt":{"rendered":"<p>Introduction to BGP \u2013 The Backbone of Internet Routing In this tutorial, we\u2019ll go over the basics of BGP (Border Gateway Protocol) and what makes it different from other routing protocols. If you\u2019re just getting started with routing or trying to understand how large networks communicate over the internet, this will help build a solid [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"wp-custom-template-post-with-sidebar2","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[103,66],"tags":[104,112,113,110,108,109,111,107,114,106,115],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-bgp","category-routing","tag-bgp","tag-bgp-keepalive-packet","tag-bgp-notification-packet","tag-bgp-open-packet","tag-bgp-packet-types","tag-bgp-protocol","tag-bgp-update-packet","tag-features-of-bgp","tag-how-bgp-is-different","tag-what-is-bgp","tag-why-bgp-is-used-as-egp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction to BGP Protocol - Tutorials<\/title>\n<meta name=\"description\" content=\"Understand BGP Protocol: What it is, how it differs from other routing protocols, its key features, and the various BGP packet types\" \/>\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.zframez.com\/articles\/routing\/bgp-protocol\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to BGP Protocol - Tutorials\" \/>\n<meta property=\"og:description\" content=\"Understand BGP Protocol: What it is, how it differs from other routing protocols, its key features, and the various BGP packet types\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol\" \/>\n<meta property=\"og:site_name\" content=\"Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/zframez\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-17T17:10:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-29T10:32:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet-1024x433.png\" \/>\n<meta name=\"author\" content=\"sajith achipra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@zframez\" \/>\n<meta name=\"twitter:site\" content=\"@zframez\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"sajith achipra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol\"},\"author\":{\"name\":\"sajith achipra\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/person\\\/8b3b88007644501771d2452d3cc80f41\"},\"headline\":\"Introduction to BGP Protocol\",\"datePublished\":\"2024-07-17T17:10:46+00:00\",\"dateModified\":\"2025-07-29T10:32:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol\"},\"wordCount\":795,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/BGP-packet-1024x433.png\",\"keywords\":[\"bgp\",\"bgp keepalive packet\",\"bgp notification packet\",\"bgp open packet\",\"bgp packet types\",\"bgp protocol\",\"bgp update packet\",\"features of bgp\",\"how bgp is different\",\"what is bgp\",\"why bgp is used as EGP\"],\"articleSection\":[\"bgp\",\"routing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol\",\"url\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol\",\"name\":\"Introduction to BGP Protocol - Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/BGP-packet-1024x433.png\",\"datePublished\":\"2024-07-17T17:10:46+00:00\",\"dateModified\":\"2025-07-29T10:32:37+00:00\",\"description\":\"Understand BGP Protocol: What it is, how it differs from other routing protocols, its key features, and the various BGP packet types\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/BGP-packet.png?fit=1836%2C776&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/BGP-packet.png?fit=1836%2C776&ssl=1\",\"width\":1836,\"height\":776},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/bgp-protocol#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/www.zframez.com\\\/articles\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction to BGP Protocol\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#website\",\"url\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/\",\"name\":\"zframez tutorials\",\"description\":\"Learn networking bit by bit\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#organization\",\"name\":\"zframez technologies\",\"url\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/zframez-logo.jpg?fit=864%2C864&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/zframez-logo.jpg?fit=864%2C864&ssl=1\",\"width\":864,\"height\":864,\"caption\":\"zframez technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/zframez\\\/\",\"https:\\\/\\\/x.com\\\/zframez\",\"https:\\\/\\\/www.instagram.com\\\/zframez_technologies\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/person\\\/8b3b88007644501771d2452d3cc80f41\",\"name\":\"sajith achipra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g\",\"caption\":\"sajith achipra\"},\"sameAs\":[\"http:\\\/\\\/www.zframez.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction to BGP Protocol - Tutorials","description":"Understand BGP Protocol: What it is, how it differs from other routing protocols, its key features, and the various BGP packet types","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.zframez.com\/articles\/routing\/bgp-protocol","og_locale":"en_US","og_type":"article","og_title":"Introduction to BGP Protocol - Tutorials","og_description":"Understand BGP Protocol: What it is, how it differs from other routing protocols, its key features, and the various BGP packet types","og_url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol","og_site_name":"Tutorials","article_publisher":"https:\/\/www.facebook.com\/zframez\/","article_published_time":"2024-07-17T17:10:46+00:00","article_modified_time":"2025-07-29T10:32:37+00:00","og_image":[{"url":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet-1024x433.png","type":"","width":"","height":""}],"author":"sajith achipra","twitter_card":"summary_large_image","twitter_creator":"@zframez","twitter_site":"@zframez","twitter_misc":{"Written by":"sajith achipra","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol#article","isPartOf":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol"},"author":{"name":"sajith achipra","@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/person\/8b3b88007644501771d2452d3cc80f41"},"headline":"Introduction to BGP Protocol","datePublished":"2024-07-17T17:10:46+00:00","dateModified":"2025-07-29T10:32:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol"},"wordCount":795,"commentCount":0,"publisher":{"@id":"https:\/\/www.zframez.com\/articles\/#organization"},"image":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol#primaryimage"},"thumbnailUrl":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet-1024x433.png","keywords":["bgp","bgp keepalive packet","bgp notification packet","bgp open packet","bgp packet types","bgp protocol","bgp update packet","features of bgp","how bgp is different","what is bgp","why bgp is used as EGP"],"articleSection":["bgp","routing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol","url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol","name":"Introduction to BGP Protocol - Tutorials","isPartOf":{"@id":"https:\/\/www.zframez.com\/articles\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol#primaryimage"},"image":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol#primaryimage"},"thumbnailUrl":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet-1024x433.png","datePublished":"2024-07-17T17:10:46+00:00","dateModified":"2025-07-29T10:32:37+00:00","description":"Understand BGP Protocol: What it is, how it differs from other routing protocols, its key features, and the various BGP packet types","breadcrumb":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol#primaryimage","url":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?fit=1836%2C776&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?fit=1836%2C776&ssl=1","width":1836,"height":776},{"@type":"BreadcrumbList","@id":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Tutorials","item":"https:\/\/www.zframez.com\/articles"},{"@type":"ListItem","position":2,"name":"Introduction to BGP Protocol"}]},{"@type":"WebSite","@id":"https:\/\/www.zframez.com\/articles\/#website","url":"https:\/\/www.zframez.com\/articles\/","name":"zframez tutorials","description":"Learn networking bit by bit","publisher":{"@id":"https:\/\/www.zframez.com\/articles\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.zframez.com\/articles\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.zframez.com\/articles\/#organization","name":"zframez technologies","url":"https:\/\/www.zframez.com\/articles\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/zframez-logo.jpg?fit=864%2C864&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/zframez-logo.jpg?fit=864%2C864&ssl=1","width":864,"height":864,"caption":"zframez technologies"},"image":{"@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/zframez\/","https:\/\/x.com\/zframez","https:\/\/www.instagram.com\/zframez_technologies\/"]},{"@type":"Person","@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/person\/8b3b88007644501771d2452d3cc80f41","name":"sajith achipra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3d9f27c5311500982b6f19d03d0506f1c328f30f51d8d5f73f46577687fd81f8?s=96&d=mm&r=g","caption":"sajith achipra"},"sameAs":["http:\/\/www.zframez.com"]}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":232,"url":"https:\/\/www.zframez.com\/articles\/routing\/how-bgp-works","url_meta":{"origin":219,"position":0},"title":"How BGP Works ?","author":"sajith achipra","date":"July 17, 2024","format":false,"excerpt":"How BGP Works \u2013 Step-by-Step Flow, Packet Types, and NLRI Continuing from our introduction to BGP, let\u2019s now look at how BGP actually works - how two routers become neighbors, what packets are exchanged between them, and how route information is shared Peering in BGP \u2013 No Auto Discovery Here\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":240,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol-peering-and-states","url_meta":{"origin":219,"position":1},"title":"BGP Peering Process Explained \u2013 States from Idle to Established","author":"sajith achipra","date":"July 18, 2024","format":false,"excerpt":"Understanding the BGP Peering Process When routers run BGP , they don't start exchanging route information right away. Before they can share anything, they need to form a stable connection, called a BGP peering session. This process involves multiple states, each indicating what\u2019s happening behind the scenes as the routers\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/bgp-states.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":247,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-configuration-examples","url_meta":{"origin":219,"position":2},"title":"BGP Configuration Example 1: EBGP Peering","author":"sajith achipra","date":"July 18, 2024","format":false,"excerpt":"BGP Configuration Example: In the previous chapter, you learned about BGP's peering process and states. In this BGP configuration example , you will learn how to configure BGP with two Cisco routers, check the BGP peering status, and understand different BGP show commands. We\u2019ll provide step-by-step instructions to set up\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/show-ip-bgp.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/show-ip-bgp.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/show-ip-bgp.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/show-ip-bgp.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1270,"url":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors","url_meta":{"origin":219,"position":3},"title":"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors","author":"sajith achipra","date":"August 5, 2025","format":false,"excerpt":"BGP Path Attributes \u2013 AS_PATH, Split Horizon, and Route Reflector One of the key features that makes BGP different from other routing protocols is its use of path attributes. These attributes are attached to BGP route advertisements and provide important information that routers use to make decisions - not just\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":262,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-configuration-example-ebgp-loopback","url_meta":{"origin":219,"position":4},"title":"BGP Configuration Example 2: EBGP Using Loopback Interfaces","author":"sajith achipra","date":"July 18, 2024","format":false,"excerpt":"BGP Configuration Example In the last tutorial \u201cBGP configuration example : EBGP Peering\u201c, we configured an EBGP peering between two routers using their physical interface IP addresses. In this BGP configuration example, we\u2019ll use loopback interfaces for BGP peering. We prefer loopback interfaces when there are multiple paths between peers\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/ebgp-configuration-topology.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/ebgp-configuration-topology.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/ebgp-configuration-topology.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/ebgp-configuration-topology.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/ebgp-configuration-topology.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/ebgp-configuration-topology.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":1273,"url":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-next_hop-and-origin-path-attributes","url_meta":{"origin":219,"position":5},"title":"Understanding BGP NEXT_HOP and ORIGIN Path Attributes","author":"sajith achipra","date":"August 6, 2025","format":false,"excerpt":"Understanding the NEXT_HOP Attribute in BGP In BGP, every route that gets advertised comes with some additional information known as path attributes. One of the most important and commonly seen among them is the NEXT_HOP attribute. This attribute simply tells the router: \u201cIf you want to reach this network, send\u2026","rel":"","context":"In &quot;bgp&quot;","block_context":{"text":"bgp","link":"https:\/\/www.zframez.com\/articles\/category\/routing\/bgp"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/ebgp-peers-with-NOH-attribute.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/ebgp-peers-with-NOH-attribute.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/ebgp-peers-with-NOH-attribute.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/ebgp-peers-with-NOH-attribute.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/ebgp-peers-with-NOH-attribute.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/ebgp-peers-with-NOH-attribute.png?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":4,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":1230,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/219\/revisions\/1230"}],"wp:attachment":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}