{"id":417,"date":"2024-11-17T12:32:22","date_gmt":"2024-11-17T09:32:22","guid":{"rendered":"https:\/\/kontsevoy.space\/docs\/bgp\/1-%d0%b2%d0%b2%d0%b5%d0%b4%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b2-bgp\/%d0%b2%d0%b2%d0%b5%d0%b4%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b2-bgp\/"},"modified":"2024-11-17T12:56:49","modified_gmt":"2024-11-17T09:56:49","slug":"%d0%b2%d0%b2%d0%b5%d0%b4%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b2-bgp","status":"publish","type":"docs","link":"https:\/\/kontsevoy.space\/en\/docs\/bgp\/1-%d0%b2%d0%b2%d0%b5%d0%b4%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b2-bgp\/%d0%b2%d0%b2%d0%b5%d0%b4%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b2-bgp\/","title":{"rendered":"Introduction to BGP"},"content":{"rendered":"<p>This lesson will be interesting! BGP (Border Gateway Protocol) is the routing protocol that glues the Internet together. I\u2019m going to explain in which situations we need BGP and how it works.<\/p>\n\n\n\n<p>Before you continue reading I should tell you to \u201cforget\u201d everything you know about routing protocols like RIP, OSPF and EIGRP so far\u2026Those three routing protocols have one thing in common: they are all IGPs (Interior Gateway Protocols). We only use them within our autonomous system but they are not scalable to use for a network as large as the Internet.<\/p>\n\n\n\n<p>RIP, OSPF and EIGRP are all different but they have one thing in common\u2026they want to find the shortest path to the destination. When we look at the Internet we don\u2019t care as much as to find the shortest path, being able to manipulate traffic paths is far more important. There is only one routing protocol we currently use on the Internet which is BGP.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Why do we need BGP?<\/h3>\n\n\n\n<p>Let\u2019s start by looking at some scenarios so you can understand why and when we need BGP:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"222\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP1.jpg\" alt=\"\" class=\"wp-image-419\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP1.jpg 756w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP1-300x88.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP1-18x5.jpg 18w\" sizes=\"auto, (max-width: 756px) 100vw, 756px\" \/><\/figure>\n\n\n\n<p>Nowadays almost everything is connected to the Internet. In the picture above we have a customer network connected to an ISP (Internet Service Provider). Our ISP is making sure we have Internet access. Our ISP has given us a <strong>single public IP address<\/strong> we can use to access the Internet. To make sure everyone on our LAN at the customer side can access the Internet we are using <strong>NAT\/PAT(Network \/ Port address translation)<\/strong> to translate our internal private IP addresses to this single public IP address. This scenario is excellent when you only have clients that need Internet access. On our customer LAN we only need a default route pointing to the ISP router and we are done. For this scenario we don\u2019t need BGP\u2026<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"222\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP2.jpg\" alt=\"\" class=\"wp-image-420\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP2.jpg 756w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP2-300x88.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP2-18x5.jpg 18w\" sizes=\"auto, (max-width: 756px) 100vw, 756px\" \/><\/figure>\n\n\n\n<p>Maybe the customer has a couple of servers that need to be reachable from the Internet\u2026perhaps a mail- or webserver. We could use port forwarding and forward the correct ports to these servers so we still only need a single IP address. Another option would be to get more public IP addresses from our ISP and use these to configure the different servers. For this scenario we still don\u2019t need BGP\u2026<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"222\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP3.jpg\" alt=\"\" class=\"wp-image-421\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP3.jpg 756w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP3-300x88.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP3-18x5.jpg 18w\" sizes=\"auto, (max-width: 756px) 100vw, 756px\" \/><\/figure>\n\n\n\n<p>What if I want a bit more redundancy? Having a single point of failure isn\u2019t a good idea. We could add another router at the customer side and connect it to the ISP. You can use the primary link for all traffic and have another link as the backup. We still don\u2019t require BGP in this situation, it can be solved with default routing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Advertise a default route in your IGP on the primary customer router with a low metric.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Advertise a default route in your IGP on the secondary customer router with a high metric.<\/li>\n<\/ul>\n\n\n\n<p>This will make sure that your IGP sends all traffic using the primary link. Once the link fails your IGP will make sure all traffic is sent down the backup link. Let me ask you something to think about\u2026can we do any load balancing across those two links? It\u2019ll be difficult right?<\/p>\n\n\n\n<p>Your IGP will send all traffic down the primary link and nothing down the backup link unless there is a failure. You could advertise a default route with the same metric but you\u2019d still have something like a 50\/50% load share. What if I wanted to send 80% of the outgoing traffic on the primary link and 20% down the backup link? That\u2019s not going to happen here but with BGP it\u2019s possible.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"427\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP4.jpg\" alt=\"\" class=\"wp-image-422\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP4.jpg 754w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP4-300x170.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP4-18x10.jpg 18w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/figure>\n\n\n\n<p>This scenario is a bit more interesting. Instead of being connected to a single ISP we now have two different ISPs. For redundancy reasons it\u2019s important to have two different ISPs, in case one fails you will always have a backup ISP to use. What about our Customer network? We still have two servers that need to be reachable from the Internet.<\/p>\n\n\n\n<p>In my previous examples we got public IP addresses from our ISP. Now I\u2019m connected to two different ISPs so what public IP addresses should I use? From ISP1 or ISP2? If we use public IP addresses from ISP1 (or ISP2) then these servers will be unreachable once the ISP has connectivity issues.<\/p>\n\n\n\n<p>Instead of using public IP addresses from the ISP we will get our own public IP addresses.The IP address space is maintained by IANA (Internet Assigned Numbers Authority \u2013 <a href=\"http:\/\/www.iana.org\/\">http:\/\/www.iana.org\/<\/a> ). IANA is assigning IP address space to a number of large Regional Internet Registries like RIPE or ARIN. Each of these assign IP address space to ISPs or large organizations.<\/p>\n\n\n\n<p>When we receive our public IP address space then we will advertise this to our ISPs. Advertising is done with a routing protocol and that will be BGP.<\/p>\n\n\n\n<p>If you are interested here\u2019s an overview of the IPv4 space that has been allocated by IANA:<\/p>\n\n\n\n<p><a href=\"http:\/\/www.iana.org\/assignments\/ipv4-address-space\/ipv4-address-space.xml\">IANA IPv4 address space<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Autonomous Systems<\/h3>\n\n\n\n<p>Besides getting public IP address space we also have to think about an <strong>AS (Autonomous System)<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"467\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP5.jpg\" alt=\"\" class=\"wp-image-423\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP5.jpg 711w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP5-300x197.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP5-18x12.jpg 18w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p><strong>An AS<\/strong> is a collection of networks under a single administrative domain. The Internet is nothing more but a bunch of autonomous systems that are connected to each other. Within an autonomous system we use an IGP like OSPF or EIGRP.<\/p>\n\n\n\n<p>For routing between the different autonomous systems we use an <strong>EGP (external gateway protocol)<\/strong>The only EGP we use nowadays is BGP.<\/p>\n\n\n\n<p>How do we get an autonomous system number? Just like public IP address space you\u2019ll need to register one.<\/p>\n\n\n\n<p>Autonomous system numbers are 16-bit which means we have 65535 numbers to choose from.<br>Just like private and public IP addresses, we have a range of public and private AS numbers.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Range 1 \u2013 64511 are globally unique AS numbers and range<\/li>\n\n\n\n<li>Range 64512 - 65535 are private autonomous system numbers.<\/li>\n<\/ul>\n\n\n\n<p>If you are interested, see if you can find the AS number of your ISP:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.ultratools.com\/tools\/asnInfo\">UltraTools AS Information Lookup<\/a><\/p>\n\n\n\n<p>BGP has two flavors:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>External BGP<\/strong>: used between autonomous systems <strong>\u043c\u0435\u0436\u0434\u0443<\/strong> \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438<\/li>\n\n\n\n<li><strong>Internal BGP<\/strong>: used within the autonomous system. <strong>\u0432\u043d\u0443\u0442\u0440\u0438<\/strong> \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b(\u043a\u0430\u043a IGP)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. BGP Advertisements<\/h3>\n\n\n\n<p>You now have an idea of why we require BGP and what autonomous systems are. The Internet is a big place, as I am writing this there are more than 500.000 prefixes in a complete Internet routing table. If you are curious, you can find the size of the Internet routing table here:<\/p>\n\n\n\n<p><a href=\"http:\/\/www.cidr-report.org\/as2.0\/\">CIDR Report<\/a><\/p>\n\n\n\n<p>On the internet there are a number of looking glass servers. These are routers that have public view access and you can use them to look at the Internet routing table. If you want to see what it looks like check out:<\/p>\n\n\n\n<p><a href=\"http:\/\/www.bgp4.as\/looking-glasses\">Looking glass servers<\/a><\/p>\n\n\n\n<p>Scroll down all the way to \u201cCategory 2 \u2013 IPv4 and IPv6 BGP Route Servers by region (TELNET access)\u201d. You can telnet to these devices and use show ip route and show ip bgp to check the BGP or routing table. <code>show ip route<\/code> \/ <code>show ip bgp<\/code>.<\/p>\n\n\n\n<p>When we run BGP, does this mean we have to learn more than 500.000 prefixes? It depends\u2026let\u2019s look at some examples:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"437\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP6.jpg\" alt=\"\" class=\"wp-image-424\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP6.jpg 711w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP6-300x184.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP6-18x12.jpg 18w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p>Above in our picture our customer network has an autonomous system number (AS 1) and some IP address space (10.0.0.0 \/8), let\u2019s pretend that these are public IP addresses. We are connected to two different ISPs and you can see their AS number (AS2 and AS3) and IP address space (20.0.0.0\/8 and 30.0.0.0\/8). We can reach the rest of the internet through both ISPs.<\/p>\n\n\n\n<p>We can use BGP to advertise our address space to the ISPs but what are the ISPS going to advertise to our customer through BGP? There are a number of options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>They advertise only a default route.<\/li>\n\n\n\n<li>They advertise a default route and a partial routing table.<\/li>\n\n\n\n<li>They advertise the full Internet routing table.<\/li>\n<\/ul>\n\n\n\n<p>Let\u2019s walk through these three options!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.1. Default Route<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"437\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP7.jpg\" alt=\"\" class=\"wp-image-425\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP7.jpg 711w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP7-300x184.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP7-18x12.jpg 18w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p>Receiving a default route requires the fewest resources on your routers since you only have a single entry to reach any external network. The customer router will advertise its 10.0.0.0 \/8 network to both ISPs which will advertise it to any other AS they are connected to and we will use a default route to reach anything on the Internet. The downside of this configuration is that our customer network doesn\u2019t know what is behind ISP1 and ISP2. We have connectivity because of the default routes but this can lead to sub-optimal routing. If we only have the default routes then we will send all traffic to one of the ISPs.<\/p>\n\n\n\n<p>Here\u2019s what could happen if you only use default routes:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"437\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP8.jpg\" alt=\"\" class=\"wp-image-426\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP8.jpg 711w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP8-300x184.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP8-18x12.jpg 18w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p>Our customer network only received a default route from both ISPs and we have chosen to use the default route of ISP1 to send all our outgoing traffic to. This means that whenever we send traffic meant for 30.0.0.0 \/8 (ISP2) it\u2019s going to be sent to ISP1 and then to ISP2. It\u2019s not a problem but it\u2019s not optimal.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.2. Partial Routing Updates<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"437\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP9.jpg\" alt=\"\" class=\"wp-image-427\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP9.jpg 711w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP9-300x184.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP9-18x12.jpg 18w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p>We can also receive a partial routing table plus a default route. This partial update might include all the IP address space that the ISPs have assigned to their customers.<br>Just like in real life\u2026the more you know the better off you are (unless you believe ignorance is bliss). In the world of routing having more routing information means you can make better routing decisions. We\u2019ll have less sub-optimal routing problems than when we only have the default route.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.3. Full Internet Routing Table<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"437\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP10.jpg\" alt=\"\" class=\"wp-image-428\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP10.jpg 711w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP10-300x184.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP10-18x12.jpg 18w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p>The last option that we have is that we receive the full Internet routing table from both ISPs. This requires more resources but we\u2019ll be able to make the best routing decisions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Path Vector<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"482\" height=\"592\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP11.jpg\" alt=\"\" class=\"wp-image-429\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP11.jpg 482w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP11-244x300.jpg 244w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP11-10x12.jpg 10w\" sizes=\"auto, (max-width: 482px) 100vw, 482px\" \/><\/figure>\n\n\n\n<p>We have 4 autonomous systems and we are running BGP to exchange routing information. In AS 1 we have network 1.1.1.0 \/24 and this is advertised to AS 2, AS 3 and AS 4.<br>If we would look at the BGP table of the router in AS4 then we will see network 1.1.1.0 \/24 but it also stores the path we have to get through in order to get there. It will store the prefix but also the paths it has to cross in order to get to 1.1.1.0 \/24. Here\u2019s an example of a real BGP router:<code>Path<\/code>) \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0434\u043e \u043d\u0435\u0451 \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>AS4#sh ip bgp <\/strong>\nBGP table version is 2, local router ID is 10.10.10.1\nStatus codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal, \n              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, \n              x best-external, a additional-path, c RIB-compressed, \nOrigin codes: i - IGP, e - EGP, ? - incomplete\nRPKI validation codes: V valid, I invalid, N Not found\n\n     Network          Next Hop            Metric LocPrf Weight <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ff0000\" class=\"has-inline-color\">Path<\/mark>\n *&gt;  11.11.11.0\/24    10.10.1.1                              0 <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ff0000\" class=\"has-inline-color\">3 2 1 i<\/mark><\/code><\/pre>\n\n\n\n<p>By using the <code>show ip bgp<\/code> command I can look at the BGP table and we see this router knows about network 11.11.11.0\/24. <code>The next-hop<\/code> IP address is 10.10.1.1. <code>At the end of the line you see path with the numbers 3 2 1.<\/code> These are the autonomous systems we have to get through in order to get to this network.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. BGP Route Selection<\/h3>\n\n\n\n<p>What all IGPs have in common is that all of them want to find the shortest path to the destination. BGP works differently, since autonomous systems belong to different ISPs or organizations we want to be able to selectively influence our routing. Take a look at this example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"681\" height=\"672\" src=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP12.jpg\" alt=\"\" class=\"wp-image-430\" srcset=\"https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP12.jpg 681w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP12-300x296.jpg 300w, https:\/\/kontsevoy.space\/wp-content\/uploads\/2024\/11\/BGP12-12x12.jpg 12w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/figure>\n\n\n\n<p>BGP allows us to use routing policies at the autonomous system level. In the picture above I have 9 autonomous systems and in AS 9 we have network 22.22.22.0\/24. If we look at AS 1 then we have a lot of different paths we can take to reach network 22.22.22.0\/24 in AS 9.<\/p>\n\n\n\n<p>Does this mean the network administrator at AS 1 can choose the path we are going to use? Not really because of the following reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can choose the exit path\u2026AS1 can send traffic to AS 2 or AS4 but you don\u2019t make routing decisions for other autonomous systems.<\/li>\n\n\n\n<li>Each autonomous system will only advertise the best path to your autonomous system. AS 1 will only learn about the best path from AS 2 and AS 4 unless their best path fails\u2026only then you will learn about the second best path.<\/li>\n<\/ul>\n\n\n\n<p>BGP uses a set of BGP attributes to select a path, as explained in the <strong>BGP attributes and best path selection lesson<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. Conclusion<\/h3>\n\n\n\n<p>Hopefully this lesson has been helpful to understand the basics of BGP and why we use it. In other lessons we will take a closer look at the configuration of external and internal BGP and also how the BGP path selection works.<\/p>\n\n\n\n<p>If you have any questions, feel free to leave a comment!<\/p>\n\n\n\n<p><strong>#bgp #routing #cisco<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-comments\">\n\n\n\n\n\n\t<div id=\"respond\" class=\"comment-respond wp-block-post-comments-form\">\n\t\t<h3 id=\"reply-title\" class=\"comment-reply-title\">Leave a Reply <small><a rel=\"nofollow\" id=\"cancel-comment-reply-link\" href=\"\/en\/wp-json\/wp\/v2\/docs\/417#respond\" style=\"display:none;\">Cancel reply<\/a><\/small><\/h3><form action=\"https:\/\/kontsevoy.space\/wp-comments-post.php\" method=\"post\" id=\"commentform\" class=\"comment-form\" data-trp-original-action=\"https:\/\/kontsevoy.space\/wp-comments-post.php\"><p class=\"comment-notes\"><span id=\"email-notes\">Your email address will not be published.<\/span> <span class=\"required-field-message\">Required fields are marked <span class=\"required\">*<\/span><\/span><\/p><p class=\"comment-form-comment\"><label for=\"comment\">Comment <span class=\"required\">*<\/span><\/label> <textarea id=\"comment\" name=\"comment\" cols=\"45\" rows=\"8\" maxlength=\"65525\" required><\/textarea><\/p><p class=\"comment-form-author\"><label for=\"author\">Name <span class=\"required\">*<\/span><\/label> <input id=\"author\" name=\"author\" type=\"text\" value=\"\" size=\"30\" maxlength=\"245\" autocomplete=\"name\" required \/><\/p>\n<p class=\"comment-form-email\"><label for=\"email\">Email <span class=\"required\">*<\/span><\/label> <input id=\"email\" name=\"email\" type=\"email\" value=\"\" size=\"30\" maxlength=\"100\" aria-describedby=\"email-notes\" autocomplete=\"email\" required \/><\/p>\n<p class=\"comment-form-url\"><label for=\"url\">Website<\/label> <input id=\"url\" name=\"url\" type=\"url\" value=\"\" size=\"30\" maxlength=\"200\" autocomplete=\"url\" \/><\/p>\n<p class=\"comment-form-cookies-consent\"><input id=\"wp-comment-cookies-consent\" name=\"wp-comment-cookies-consent\" type=\"checkbox\" value=\"yes\" \/> <label for=\"wp-comment-cookies-consent\">Save my name, email, and website in this browser for the next time I comment.<\/label><\/p>\n<p class=\"form-submit wp-block-button\"><input name=\"submit\" type=\"submit\" id=\"submit\" class=\"wp-block-button__link wp-element-button\" value=\"Post Comment\" \/> <input type='hidden' name='comment_post_ID' value='417' id='comment_post_ID' \/>\n<input type='hidden' name='comment_parent' id='comment_parent' value='0' \/>\n<\/p><input type=\"hidden\" name=\"trp-form-language\" value=\"en\"\/><\/form>\t<\/div><!-- #respond -->\n\t<\/div>","protected":false},"featured_media":0,"parent":416,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-417","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/docs\/417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/comments?post=417"}],"version-history":[{"count":0,"href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/docs\/417\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/docs\/416"}],"next":[{"title":"BGP Connection Designs - Single\/Dual Homed and Multi-homed","link":"https:\/\/kontsevoy.space\/en\/docs\/bgp\/1-%d0%b2%d0%b2%d0%b5%d0%b4%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b2-bgp\/%d0%b4%d0%b8%d0%b7%d0%b0%d0%b9%d0%bd%d1%8b-%d0%bf%d0%be%d0%b4%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%bd%d0%b8%d1%8f-bgp\/","href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/docs\/468"}],"wp:attachment":[{"href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/media?parent=417"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kontsevoy.space\/en\/wp-json\/wp\/v2\/doc_tag?post=417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}