<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=IPV6%3A_BGP_Best_Path_Selection_Algorithm</id>
	<title>IPV6: BGP Best Path Selection Algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=IPV6%3A_BGP_Best_Path_Selection_Algorithm"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=IPV6:_BGP_Best_Path_Selection_Algorithm&amp;action=history"/>
	<updated>2026-04-12T14:24:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=IPV6:_BGP_Best_Path_Selection_Algorithm&amp;diff=54738&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;Sumber: https://wiki.mikrotik.com/wiki/Manual:BGP_Best_Path_Selection_Algorithm  ==Introduction==  With the full Internet BGP routing table being upward of 300K routes and wit...&quot;</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=IPV6:_BGP_Best_Path_Selection_Algorithm&amp;diff=54738&amp;oldid=prev"/>
		<updated>2019-01-26T08:56:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Sumber: https://wiki.mikrotik.com/wiki/Manual:BGP_Best_Path_Selection_Algorithm  ==Introduction==  With the full Internet BGP routing table being upward of 300K routes and wit...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sumber: https://wiki.mikrotik.com/wiki/Manual:BGP_Best_Path_Selection_Algorithm&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
With the full Internet BGP routing table being upward of 300K routes and with a BGP router having the potential to be receiving multiple copies of that routing table from multiple providers, it has to have some way to compare those multiple BGP routing tables and select only the best route to go into the IP routing table on the router. It uses the BGP Best Path Selection Algorithm to do this.&lt;br /&gt;
&lt;br /&gt;
You should note that MikroTik and Cisco BGP routers have weight as the first criteria in the table where other brands do not.&lt;br /&gt;
&lt;br /&gt;
Best path algorithm compares routes received by a &amp;lt;b&amp;gt;single BGP instance&amp;lt;/b&amp;gt;. Routes installed by different BGP instances are compared by the general algorithm, i.e. route distances are compared and the route with lower distance is preferred.&lt;br /&gt;
&lt;br /&gt;
==BEST PATH ALGORITHM==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol class=&amp;quot;bullets&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Router is ignoring received path if the route is not &amp;lt;b&amp;gt;valid&amp;lt;/b&amp;gt;. Route is valid if:&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bullets&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; NEXT_HOP of the route is valid and reachable&lt;br /&gt;
&amp;lt;li&amp;gt; AS_PATH received from external peers does not contain the local AS&lt;br /&gt;
&amp;lt;li&amp;gt; route is not rejected by routing filters&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
For more information read [[M:BGP_nexthop_selection_and_validation_in_RouterOS_3.x |nexthop selection and validation]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The first path received is automatically considered 'best path'. Any further received paths are compared to first received to determine if the new path is better.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the path with the highest &amp;lt;b&amp;gt;WEIGHT&amp;lt;/b&amp;gt;.&lt;br /&gt;
:WEIGHT parameter is local to the router on which it is configured. A route without assigned WEIGHT have a default value of 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the path with the highest &amp;lt;b&amp;gt;LOCAL_PREF&amp;lt;/b&amp;gt;. It is used only within an AS.&lt;br /&gt;
:A path without &amp;lt;b&amp;gt;LOCAL_PREF&amp;lt;/b&amp;gt; attribute have a value of 100 by default. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the path with the shortest &amp;lt;b&amp;gt;AS_PATH&amp;lt;/b&amp;gt;. (skipped if [[M:Routing/BGP#Instance | &amp;lt;var&amp;gt;ignore-as-path-len&amp;lt;/var&amp;gt;]] set to '''yes''')&lt;br /&gt;
: Each &amp;lt;b&amp;gt;AS_SET&amp;lt;/b&amp;gt; counts as 1, regardless of the set size. The &amp;lt;b&amp;gt;AS_CONFED_SEQUENCE&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;AS_CONFED_SET&amp;lt;/b&amp;gt; are not included in the &amp;lt;b&amp;gt;AS_PATH&amp;lt;/b&amp;gt; length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the path that was locally originated via [[M:BGP_Case_Studies#BGP_Aggregates|aggregate]] or [[M:Routing/BGP#Network | BGP network]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the path with the lowest &amp;lt;b&amp;gt;ORIGIN&amp;lt;/b&amp;gt; type.&lt;br /&gt;
:Interior Gateway Protocol (IGP) is lower than Exterior Gateway Protocol (EGP), and EGP is lower than INCOMPLETE &lt;br /&gt;
in other words &amp;lt;b&amp;gt;IGP &amp;lt; EGP &amp;lt; INCOMPLETE&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the path with the lowest &amp;lt;b&amp;gt;multi-exit discriminator&amp;lt;/b&amp;gt; (MED). &lt;br /&gt;
: The router compare MED attribute only for paths that have the same neighboring (leftmost) AS. Paths without explicit MED value are treated as with MED of 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer &amp;lt;b&amp;gt;eBGP&amp;lt;/b&amp;gt; over &amp;lt;b&amp;gt;iBGP&amp;lt;/b&amp;gt; paths&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the route that comes from the BGP router with the lowest &amp;lt;b&amp;gt;router ID&amp;lt;/b&amp;gt;. If a route carries the &amp;lt;b&amp;gt;ORIGINATOR_ID&amp;lt;/b&amp;gt; attribute, then the &amp;lt;b&amp;gt;ORIGINATOR_ID&amp;lt;/b&amp;gt; is used instead of router ID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the route with the shortest &amp;lt;b&amp;gt;route reflection cluster list&amp;lt;/b&amp;gt;. Routes without a cluster list are considered to have a cluster list of length 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Prefer the path that comes from the lowest neighbor address&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Routing|B]]&lt;br /&gt;
[[Category:Manual|B]]&lt;br /&gt;
[[Category:BGP]]&lt;br /&gt;
[[Category:Case Studies|B]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.mikrotik.com/wiki/Manual:BGP_Best_Path_Selection_Algorithm&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>