Home > Border Gateway Protocol BGP Tutorial

Border Gateway Protocol BGP Tutorial

August 25th, 2016 Go to comments

Basic understanding about BGP

We really want to show you why we need BGP first but it is very difficult to explain without understanding a bit about BGP. So we will learn some basic knowledge about BGP first.

First we need to understand about the different between Interior Gateway Protocol and Exterior Gateway Protocol. The difference between them is shown below:

IGP_EGP.jpg

Interior Gateway Protocol (IGP): A routing protocol operating within an Autonomous System (AS) like OSPF, EIGRP… Usually routers running IGP are under the same administration (of a company, corporation, individual)
Exterior Gateway Protocol (EGP): A routing protocol operating between different AS. BGP is the only EGP used nowadays

In the topology above R1, R2 and R3 should run an IGP to communicate with each other because they are in the same AS. But to connect with other routers in another AS (like a different ISP), R1 and R3 must use an EGP.

With BGP, the term autonomous system (AS) refers to a network that operates separately from other networks and usually operates within a single administrative domain. Each AS is represented by an AS number. It is similar to EIGRP AS in this aspect. BGP is used mainly by the Internet Service Provider (ISP) all over the world. Each ISP usually has one BGP AS number (some very big ISP may have a few AS numbers). BGP AS numbers can be between 1 to 65,535.

In the topology above R1 and R3 are operating in BGP AS 1. If an AS connects to the public Internet using an EGP, then it must be assigned a unique AS number which is managed by the Internet Assigned Numbers Authority (IANA). IANA manages the AS numbers from 1 to 64,512 for public use (similar to public IP addresses) while 64,512 to 65,535 numbers are reserved for private use (similar to private IP addresses).

If we don’t want to show the routers inside each AS we can simply ignore them:

BGP_ASes_view.jpg

In fact, the Internet that we are going “online” everyday is a collection of interconnected autonomous systems and BGP is running to provide routing between them.

Other BGP terms that you should learn are listed below:
+ BGP speaker: a router running BGP
+ BGP peer or BGP neighbor: Any two routers that have formed a TCP connection to exchange BGP routing information (as BGP runs over TCP on port 179, not UDP)
+ Prefix: Maybe you learned the word “subnet”. In BGP world, it is usually called “prefix” because BGP usually does not advertise small subnets. It advertises blocks of large subnets so “prefix” is often used instead
+ Internal BGP (iBGP): refers to the BGP neighbor relationship within the same AS. The iBGP neighbor does not have to be directly connected
+ External BGP (eBGP): refers to the BGP neighbor relationship between two peers belongs to different AS. It is recommended that eBGP should be directly connected. Never run an IGP between eBGP peers.

In the below topology suppose all routers are running BGP then R1 is considered internal BGP to R2 and R3 (as they are running same AS 1) but is external BGP to R4. R5 is internal to R4 and R6 but external to R3.

iBGP_eBGP.jpg

 

Why do we need BGP?

Maybe you will raise a question: “Why can’t we only use OSPF or EIGRP instead?”

The most important reason is BGP greatly supports path control.

Maybe you learned and understood about EIGRP, OSPF routing protocols. They are different but both of them have the same purpose: find the most optimal path to the destination. But when we are working in ISP level we don’t care much about this. In ISP we really want to control the path, even it is not the most optimal path, to the destination. For example, how can you choose which path to go from AS 1 to AS 3 in the topology below?

AS_Path_Selection.jpg

Suppose an IGP (like OSPF) is using all the way. With default values and same bandwidth on all the links, OSPF will choose the path AS 1 -> AS 2 -> AS 3. In order to manipulate the path we will have to change the bandwidth of some interfaces on the edge routers of each AS. A few months later we want to change the path then we have to configure the bandwidth again. With BGP we can easily define the path like this: “to go from AS 1 to AS 3 we will go through AS 2 then AS 4 then AS 5”. Moreover we can easily control the ratio of traffic passing through each link. BGP can do this because it has a rich set of features to control the paths to the destination. One of the most popular features BGP uses to control the path is known as “attributes”. However, discussion about “attributes” is out of the scope of this tutorial, which is dedicated for CCNA learners.

In fact, BGP is a path vector protocol. Path vector protocol does not rely on the bandwidth of the links (like OSPF) or hop count (like RIP) or a group of parameters (like EIGRP). Path vector protocol relies on the number of autonomous systems it has to go through. In other words, it choose the path with least number of autonomous systems (shortest AS Path) to reach the destination, provided that the path is loop-free. Of course we can change the path easily for our purpose.

For example in the topology above, if all the values are default and same, BGP will choose the path AS 1 -> AS 2 -> AS 3 for traffic from AS 1 destined to AS 3 because it only has to go through one AS (AS 2).

Another reason to use BGP is BGP can handle very big routing tables. The ISP level of routing do had large number of routes, which IGP cannot handle. BGP handle such large routes between AS. Currently the global Internet routing table contains over 500,000 routes.

Another good reason to use BGP is because the great benefits of MPLS-based virtual private networks (MPLS VPN). MPLS VPN is beyond the scope of this tutorial but in general MPLS VPN provides traffic separation and path isolation on a shared network infrastructure and BGP is the background layer so that VPN can operate well. For example your corporation is running Voice over IP (VoIP), Video on Demand (VoD), Internet service… on the same infrastructure then you can use MPLS VPN to separate these services as if they were running on theirs own infrastructure.

In the next part we will learn about how your edge routers of your company can connect to the ISP.

Comments (48) Comments
  1. KenCheung
    August 25th, 2016

    Is it belong to 200-120 or 200-125?

  2. 9tut
    August 25th, 2016

    @KenCheung: Basic BGP is a new topic of CCNA 200-125.

  3. Symtha
    August 25th, 2016

    thank you add more plz

  4. karis
    August 25th, 2016

    Would you please upload the other topics as well?
    Badly need them!

  5. RAFING
    August 25th, 2016

    nice nice nice.

  6. Natasha
    August 25th, 2016

    Updated 200-125 Dumps Available http://pass4surekey.com/exam/200-125.html

  7. joe
    August 25th, 2016

    natasha ! are you those valid???
    it does say updated 20th August however are they the same question or new?????

  8. joe
    August 25th, 2016

    if someone decides to buy taht can they post here if they are the new questiosn or the older ones?????

  9. Jmey923
    August 25th, 2016

    i checked the reviews on the website and it doesnt look good. go to google and look up reviews of http://www.pass4surekey.com.. plz let us know if its legit!

  10. Anonymous
    August 26th, 2016

    nice

  11. fearless
    August 26th, 2016

    nice

  12. Ankur
    August 27th, 2016

    Good..

  13. Vinay@pal
    August 28th, 2016

    pls upload new & new content
    i really need it

  14. SuryaKousik
    August 30th, 2016

    I find answers and explanations here ,where do i get the questions??

  15. Aaryan
    August 30th, 2016

    Thanx need helpful

  16. aj
    August 30th, 2016

    pls send me dump of 200-125 kindlyfriend.kf at gmail

  17. Anonymous
    September 1st, 2016

    pls send me the dumps of 200-125 at {email not allowed} thank you.

  18. Anonymous
    September 1st, 2016

    pls send the dump at tristtex at yahoo

  19. t
    September 2nd, 2016

    Where there are new questions ? (in this site)
    please send me the new dump
    thank you

  20. joe
    September 6th, 2016

    @ 9tut, I CANT LOG IN. i am not able to go through the context that i paid for.

  21. sami
    September 18th, 2016

    please send me new dumps of CCNA suddin it sahara.com

  22. polo
    September 18th, 2016

    plz tell me about 200-125 dumps and labs plz help me {email not allowed}

  23. faisaloof
    September 19th, 2016

    Thanks a lot

    i need to send new dumps 200-125 to my mail {email not allowed}

  24. rezhakana
    September 20th, 2016

    @smith @anonymouse
    whether in the simulation tests we can use the function tabs and a question mark(?) ???? Please answer…

  25. shankar
    September 24th, 2016

    Nice subject is here for new learners.

  26. vish
    September 25th, 2016

    please make ccnp level in all topic also……if any body know plz give me link

  27. Anonymous
    September 26th, 2016

    CCNA ( Routing & Switching )
    CCNA Routing and Switching provides comprehensive coverage of network topics from fundamental to advanced applications and services, with opportunities for hands on practical experience and career skills development.
    Prerequisite :
    Basic Knowledge of Computer/ Network
    Further details we can discuss on call or whatsapp
    00966592832164

  28. babandy
    September 28th, 2016

    please send me the dumps for the 100-105. Much thanks

  29. shalini
    September 29th, 2016

    your blog is really helpful and it is very much useful and helpful it is very well explained as well as i got more explanation.

  30. Beko
    September 29th, 2016

    Great topic, thanks alot

  31. LWP
    October 11th, 2016

    Dear all, kindly share updated 200-125 Dumps.

  32. sophia
    October 13th, 2016

    Latest updated 200-125 i got from http://pdfdumps.us/exam/200-125.html

  33. Junior T
    October 18th, 2016

    Kindly someone send me the newest CCNA R&S on {email not allowed}

  34. braintech
    October 24th, 2016

    Dear All,
    If anyone want valid dumps for CCNA+Voucher (Any track), CCNP(any track) and CCIE R&A (Dumps+Lab) in affordable price.

    Contact:

    Whatsapp or call

    +966592832164

  35. Khudus
    October 31st, 2016

    The client VPN currently consists of BGP in the core and static routing to the CE routers. Host C1 is unable to communicate to Host D1. Name a few reasons why they could experience connectivity issues? Bear in mind that all physical connections are up. anyone please help

  36. Du30
    November 3rd, 2016

    anybody has a reviewer for CCNA v3 please chocoguy315 at yahoodotcom

  37. moola
    November 15th, 2016

    guyz im taking my v3 ccna soon, please help with valid dumps please mail melmpofue at yahoo dot com

  38. Mani
    November 20th, 2016

    Hi Friends,Anyone please send me the latest CCNA dumps to routebalu10 @gmail.com.many Thanks in advance

  39. Ddwax
    November 24th, 2016

    Hi Friends,Anyone please send me the latest CCNA dumps to yahayashabani1992 @ gmail dot com…thanx in advnc

  40. kk
    November 25th, 2016

    plz dumps 200-125 kaleemkhawarksa at gmail dot com

  41. adil
    December 7th, 2016

    plz send me dumps 200-125 on this address adil955 at Hotmail dot com

  42. adil
    December 7th, 2016

    http://pdfdumps.us/exam/200-125.html any one have this exam send me plzz
    adil955 at Hotmail dot com

  43. CaraCruz
    December 21st, 2016

    These are so strange! I guess that we will read more about them in the future.
    http://www.og6666.com/

  44. Anonymous
    December 28th, 2016

    am new in these site, can anyone pls tel me were I can downloads ccna videos

  45. Barbara Brown
    January 2nd, 2017

    I had experience to use resources like https://www.certssafe.com/200-125-practice-test.html
    and must confess that going through simulation questions can really help at the certification exam.
    latest of 26th December

  46. Ferguson
    January 3rd, 2017

    Very very helpful!!! thanks

  47. Ferguson
    January 3rd, 2017

    @Barbara

  48. Anonymous
    January 10th, 2017

    is this the new dumps