{"id":1270,"date":"2025-08-05T16:53:41","date_gmt":"2025-08-05T16:53:41","guid":{"rendered":"https:\/\/www.zframez.com\/articles\/?p=1270"},"modified":"2025-08-05T16:53:44","modified_gmt":"2025-08-05T16:53:44","slug":"understanding-bgp-as_path-split-horizon-and-route-reflectors","status":"publish","type":"post","link":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors","title":{"rendered":"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors"},"content":{"rendered":"<body>\n<p class=\"wp-block-paragraph\"><strong>BGP Path Attributes \u2013 AS_PATH, Split Horizon, and Route Reflector<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of the key features that makes BGP different from other routing protocols is its use of <strong>path attributes<\/strong>. These attributes are attached to BGP route advertisements and provide important information that routers use to make decisions \u2013 not just for best path selection, but also for routing policies, loop prevention, and more.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What Are Path Attributes?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In BGP, every route that is advertised carries a set of values called <strong>path attributes<\/strong>. These attributes describe specific properties of the route, and BGP uses them for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Selecting the best path among multiple options<\/li>\n\n\n\n<li>Preventing routing loops<\/li>\n\n\n\n<li>Tagging or grouping networks<\/li>\n\n\n\n<li>Defining the next-hop router<\/li>\n\n\n\n<li>Controlling how routes are propagated<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This is different from protocols like <strong>OSPF<\/strong>, <strong>EIGRP<\/strong>, or <strong>RIP<\/strong>, where decisions are typically based on a single metric (like hop count, bandwidth, or delay). Since BGP uses multiple attributes for different functions, the term <strong>\u201cpath attribute\u201d<\/strong> is used instead of just \u201cmetric.\u201d<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>AS_PATH Attribute<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most important and commonly used path attributes in BGP is the <strong>AS_PATH<\/strong> attribute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This attribute lists the <strong>Autonomous Systems (AS)<\/strong> that a route has passed through. Each time a route is advertised from one AS to another (in an <strong>eBGP<\/strong> session), the router <strong>prepends its own AS number<\/strong> to the beginning of the AS_PATH.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"485\" src=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=1024%2C485&#038;ssl=1\" alt=\"Diagram showing three routers: R1 in AS100, R2 in AS200, and R3 in AS300. R1 advertises network 10.0.0.0\/24 to R2 with AS_PATH 100. R2 forwards it to R3, updating the AS_PATH to 200 100.\" class=\"wp-image-1271\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=1024%2C485&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=300%2C142&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=768%2C364&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?resize=1536%2C728&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?w=1757&amp;ssl=1 1757w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">BGP AS_PATH formation across eBGP peers: AS100 \u2192 AS200 \u2192 AS300<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the above figure, we have three routers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>R1 belongs to AS100<\/li>\n\n\n\n<li>R2 belongs to AS200<\/li>\n\n\n\n<li>R3 belongs to AS300<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say R1 is originating a route for the network 10.0.0.0\/8. When R1 advertises this route to R2 over an eBGP session, it includes its own AS number in the update. So the AS_PATH becomes 100.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, when R2 receives this update and advertises it further to R3 (again over eBGP), it prepends its own AS to the beginning of the AS_PATH. So the AS_PATH becomes 200 100.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This way, every time a BGP update crosses an AS boundary, the sending router adds its AS number to the path. The receiving router can clearly see how the route has travelled, and use this information for best path selection or loop prevention<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How AS_PATH Is Used<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Shortest Path Selection<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a router receives multiple paths to reach the same destination, BGP uses the <strong>AS_PATH length<\/strong> as one of the first criteria in its best path selection process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The path with the <strong>shortest AS_PATH<\/strong> (i.e., the fewest AS numbers) is generally preferred.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Loop Prevention<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AS_PATH also helps BGP avoid routing loops.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a router receives a BGP update, it checks whether its own AS number is already present in the AS_PATH. If it is, the route is discarded \u2013 because that means the route has looped back to the same AS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This loop prevention works well across different autonomous systems (eBGP).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>AS_PATH in iBGP<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Within the same AS, routers may form <strong>iBGP<\/strong> sessions to share BGP routes internally.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In <strong>iBGP<\/strong>, the AS_PATH is <strong>not updated<\/strong>. That means when one iBGP peer advertises a route to another, it does not add its AS number to the AS_PATH \u2013 because both routers belong to the same AS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This behavior avoids unnecessarily growing the AS_PATH, but it also introduces a new challenge: <strong>loop detection inside the AS becomes impossible using AS_PATH alone.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Split Horizon Rule in iBGP<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid potential loops inside an AS, BGP enforces the <strong>split horizon rule<\/strong> for iBGP:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A router must not advertise a route learned from one iBGP peer to another iBGP peer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This prevents the same route from bouncing around endlessly between routers inside the AS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But it also creates a limitation \u2013 routes learned through iBGP don\u2019t get forwarded to other routers automatically like they do in protocols such as OSPF or EIGRP.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Full Mesh Requirement in iBGP<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because of the split horizon rule, <strong>every BGP router in the AS must form a direct iBGP session with every other BGP router<\/strong>, so that all routes are properly shared.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is called <strong>full mesh iBGP<\/strong>.<br>It works fine in small networks, but as the number of routers increases, it becomes difficult to scale.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For n routers, the number of iBGP sessions required is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>n(n \u2013 1)\/2<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Clearly, this doesn\u2019t scale well.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Route Reflector \u2013 A Scalable Solution<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid the complexity of full mesh iBGP, BGP offers a feature called the <strong>Route Reflector (RR).<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Route Reflector is a router that can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Receive routes from iBGP peers (called clients)<\/li>\n\n\n\n<li>Forward those routes to other iBGP clients<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This <strong>bypasses the split horizon rule<\/strong> \u2013 but only for the Route Reflector.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of every router peering with every other router, all clients just peer with the RR. The RR then handles the distribution of routes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: Route Reflectors are not elected automatically. They must be manually configured by the network administrator. This is different from protocols like OSPF where DR\/BDR elections happen automatically.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recap<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Path attributes<\/strong> carry extra information with BGP routes \u2013 used for decision-making, policies, and loop prevention.<\/li>\n\n\n\n<li><strong>AS_PATH<\/strong> lists the AS numbers a route has passed through and is used for:\n<ul class=\"wp-block-list\">\n<li>Choosing the shortest AS path<\/li>\n\n\n\n<li>Avoiding loops in eBGP<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>iBGP<\/strong> does not update AS_PATH, so BGP uses <strong>split horizon<\/strong> to prevent loops.<\/li>\n\n\n\n<li>Split horizon creates the need for <strong>full mesh iBGP<\/strong>.<\/li>\n\n\n\n<li>To avoid full mesh, BGP allows the use of <strong>Route Reflectors<\/strong>, which simplify iBGP design by redistributing routes to clients.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n<\/body>","protected":false},"excerpt":{"rendered":"<p>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 \u2013 not just for best path selection, but [&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":[360,86,359,357,362,358,361,363,118,117,337,356,355],"class_list":["post-1270","post","type-post","status-publish","format-standard","hentry","category-bgp","category-routing","tag-as_path","tag-autonomous-system","tag-bgp-best-path-selection","tag-bgp-configuration","tag-bgp-loop-prevention","tag-bgp-path-attributes","tag-bgp-routing","tag-bgp-tutorial","tag-ebgp","tag-ibgp","tag-networking-basics","tag-route-reflector","tag-split-horizon"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Understanding BGP AS_PATH, Split Horizon, and Route Reflectors - Tutorials<\/title>\n<meta name=\"description\" content=\"Learn how the AS_PATH attribute works in BGP, how it prevents routing loops, and why features like split horizon and route reflectors are essential in iBGP networks.\" \/>\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\/understanding-bgp-as_path-split-horizon-and-route-reflectors\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"BGP AS_PATH and Loop Prevention Explained with Example\" \/>\n<meta property=\"og:description\" content=\"Explore how BGP uses AS_PATH for path selection and loop prevention. This tutorial also explains the split horizon rule and how route reflectors simplify iBGP design.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors\" \/>\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=\"2025-08-05T16:53:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-05T16:53:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1757\" \/>\n\t<meta property=\"og:image:height\" content=\"833\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/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=\"5 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\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors\"},\"author\":{\"name\":\"sajith achipra\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#\\\/schema\\\/person\\\/8b3b88007644501771d2452d3cc80f41\"},\"headline\":\"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors\",\"datePublished\":\"2025-08-05T16:53:41+00:00\",\"dateModified\":\"2025-08-05T16:53:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors\"},\"wordCount\":921,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/BGP-AS-Path-demo-1024x485.png\",\"keywords\":[\"as_path\",\"autonomous system\",\"bgp best path selection\",\"bgp configuration\",\"bgp loop prevention\",\"bgp path attributes\",\"bgp routing\",\"bgp tutorial\",\"ebgp\",\"ibgp\",\"networking basics\",\"route reflector\",\"split horizon\"],\"articleSection\":[\"bgp\",\"routing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors\",\"url\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors\",\"name\":\"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors - Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/BGP-AS-Path-demo-1024x485.png\",\"datePublished\":\"2025-08-05T16:53:41+00:00\",\"dateModified\":\"2025-08-05T16:53:44+00:00\",\"description\":\"Learn how the AS_PATH attribute works in BGP, how it prevents routing loops, and why features like split horizon and route reflectors are essential in iBGP networks.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/BGP-AS-Path-demo.png?fit=1757%2C833&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.zframez.com\\\/articles\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/BGP-AS-Path-demo.png?fit=1757%2C833&ssl=1\",\"width\":1757,\"height\":833},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.zframez.com\\\/articles\\\/routing\\\/understanding-bgp-as_path-split-horizon-and-route-reflectors#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/www.zframez.com\\\/articles\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors\"}]},{\"@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":"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors - Tutorials","description":"Learn how the AS_PATH attribute works in BGP, how it prevents routing loops, and why features like split horizon and route reflectors are essential in iBGP networks.","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\/understanding-bgp-as_path-split-horizon-and-route-reflectors","og_locale":"en_US","og_type":"article","og_title":"BGP AS_PATH and Loop Prevention Explained with Example","og_description":"Explore how BGP uses AS_PATH for path selection and loop prevention. This tutorial also explains the split horizon rule and how route reflectors simplify iBGP design.","og_url":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors","og_site_name":"Tutorials","article_publisher":"https:\/\/www.facebook.com\/zframez\/","article_published_time":"2025-08-05T16:53:41+00:00","article_modified_time":"2025-08-05T16:53:44+00:00","og_image":[{"width":1757,"height":833,"url":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png","type":"image\/png"}],"author":"sajith achipra","twitter_card":"summary_large_image","twitter_creator":"@zframez","twitter_site":"@zframez","twitter_misc":{"Written by":"sajith achipra","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors#article","isPartOf":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors"},"author":{"name":"sajith achipra","@id":"https:\/\/www.zframez.com\/articles\/#\/schema\/person\/8b3b88007644501771d2452d3cc80f41"},"headline":"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors","datePublished":"2025-08-05T16:53:41+00:00","dateModified":"2025-08-05T16:53:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors"},"wordCount":921,"commentCount":0,"publisher":{"@id":"https:\/\/www.zframez.com\/articles\/#organization"},"image":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors#primaryimage"},"thumbnailUrl":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo-1024x485.png","keywords":["as_path","autonomous system","bgp best path selection","bgp configuration","bgp loop prevention","bgp path attributes","bgp routing","bgp tutorial","ebgp","ibgp","networking basics","route reflector","split horizon"],"articleSection":["bgp","routing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors","url":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors","name":"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors - Tutorials","isPartOf":{"@id":"https:\/\/www.zframez.com\/articles\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors#primaryimage"},"image":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors#primaryimage"},"thumbnailUrl":"https:\/\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo-1024x485.png","datePublished":"2025-08-05T16:53:41+00:00","dateModified":"2025-08-05T16:53:44+00:00","description":"Learn how the AS_PATH attribute works in BGP, how it prevents routing loops, and why features like split horizon and route reflectors are essential in iBGP networks.","breadcrumb":{"@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors#primaryimage","url":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?fit=1757%2C833&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2025\/08\/BGP-AS-Path-demo.png?fit=1757%2C833&ssl=1","width":1757,"height":833},{"@type":"BreadcrumbList","@id":"https:\/\/www.zframez.com\/articles\/routing\/understanding-bgp-as_path-split-horizon-and-route-reflectors#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Tutorials","item":"https:\/\/www.zframez.com\/articles"},{"@type":"ListItem","position":2,"name":"Understanding BGP AS_PATH, Split Horizon, and Route Reflectors"}]},{"@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":219,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol","url_meta":{"origin":1270,"position":0},"title":"Introduction to BGP Protocol","author":"sajith achipra","date":"July 17, 2024","format":false,"excerpt":"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're just getting started with routing or trying to understand how large networks communicate over the internet, this\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-packet.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-packet.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.zframez.com\/articles\/wp-content\/uploads\/2024\/07\/BGP-packet.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":1270,"position":1},"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":[]},{"id":247,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-configuration-examples","url_meta":{"origin":1270,"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":232,"url":"https:\/\/www.zframez.com\/articles\/routing\/how-bgp-works","url_meta":{"origin":1270,"position":3},"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":262,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-configuration-example-ebgp-loopback","url_meta":{"origin":1270,"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":240,"url":"https:\/\/www.zframez.com\/articles\/routing\/bgp-protocol-peering-and-states","url_meta":{"origin":1270,"position":5},"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":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/1270","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=1270"}],"version-history":[{"count":1,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/1270\/revisions"}],"predecessor-version":[{"id":1272,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/posts\/1270\/revisions\/1272"}],"wp:attachment":[{"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/media?parent=1270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/categories?post=1270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zframez.com\/articles\/wp-json\/wp\/v2\/tags?post=1270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}