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 the difference between Interior Gateway Protocol and Exterior Gateway Protocol, which is shown below:


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:


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.



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?


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 (38) Comments
Comment pages
1 2 3 4 2820
  1. reza
    May 27th, 2018

    hi. if you have a ccna dumps you can email me Apratama642 at yahoo.com

  2. Emilio
    June 13th, 2018

    Hello, is someone going to take the Route exam?
    I have two vouchers for free tomorrow


  3. Anonymous
    June 20th, 2018

    hi ‘
    i need new CCNA dump ,
    my email is {email not allowed}

  4. Mehran
    July 7th, 2018

    kindly share latest dumps for CCNA 120-125 at mehranaman4*******@g**ma*il.C*om

  5. Anonymous
    July 10th, 2018

    Please can one can send the dump 200-125
    Thank you very much

  6. CCNA PH
    August 1st, 2018

    CCNA DUMPS IS THE BEST WILL SOMEONE EMAIL IT TO ME IT’S josh.sangcap21——@g.m.a.i.l.c.o.m

  7. Anonymous
    October 3rd, 2018

    Dear Sir/Madam, if you have the latest CCNA DUMP.kindly shared me on my email id {email not allowed}

  8. James
    October 18th, 2018

    CertificationsBuzz presents Cisco 200-125 exam preparation material, which is best to help you to clear your professional Cisco Certified Network Associate Routing & Switching CCNA Routing & Switching Certification Exam.
    Click For More Info:

  9. Anonymous
    November 14th, 2018

    Guys some1 please assist me with latest dump 200-125 I am writting soon :sharonsehlako dot21 at gmail dot com please put then together
    Thanks in advance and God bless

  10. Ciscology
    December 16th, 2018

    Thank you 9tut. very useful

  11. BEP
    January 3rd, 2019

    Hi, people who succeeded CCNA latest version, can you share your valid dumps=> erdncpk—@g.m.a.i.l.c.o.m (ignore ”-”) Thanks.

  12. Sam
    January 10th, 2019

    Hi guys, if you kindly share your valid dumps for learning purpose i would be very thankful. Please need help, syams.firmansyah-@g-m-a-i-l.c-o-m (ignore “-“).
    Thank you very much

  13. salvadorjc
    February 5th, 2019

    thank 9tut

  14. Anonymous
    March 17th, 2019

    Hi, if anyone can share latest valid dumps i would be pleasured :) {email not allowed}

  15. nefalim
    March 17th, 2019

    Hi, if anyone can share latest valid dumps i would be pleasured :) {email not allowed}

  16. noel
    April 18th, 2019

    Hi, any body can share the latest ccna 200-125 dumps, please to my email {email not allowed}

  17. noel
    April 18th, 2019

    Hi, any body can share the latest ccna 200-125 dumps, please to my email nmbaquial@.g.m.a.i.l.c.o.m

  18. Kenneth
    April 18th, 2019

    Hi, please anyone share the latest dump of CCNA 200-125 to my mail . Thanks in anticipation.

  19. Kenneth
    April 18th, 2019

    Hi, please anyone share the latest dumps of CCNA 200-125 to my mail . Thanks in anticipation.

  20. Abdulrahman
    April 25th, 2019

    can you send me ccna dumps as well :: {email not allowed}

  21. abdulrahman
    April 25th, 2019

    can you send me ccna dumps as well :: aboud_alhamwi@.h.o.t.m.a.i.l.c.o.m

  22. Anonymous
    May 12th, 2019

    Hello. Pls anyone with the latest CCNA dumps please help send to my mail Funmilayo.p.fadele@.g.m.a.i.l.c.o.m

  23. Priscilla
    May 12th, 2019

    Hello. Pls anyone with the latest CCNA dumps please help send to my mail Funmilayo.p.fadele@.g.m.a.i.l.c.o.m

  24. John Doe
    May 27th, 2019

    To tell you honestly studying this is not enough but what you need to do to master this is by answering practice exams in order for you to master the lesson well. One website that I can suggest is certlibrary(dot)com it has a comprehensive list of practice exams that will help you in grasping the lessons well that you can use to your advantage if you are planning to take certification exams. Best of luck!

  25. Anonymous
    June 16th, 2019

    Hi, there any one has any dumps I am willing to take my exam next week, a quick help will be great.

    thanks in advance.

  26. nickojam
    June 23rd, 2019

    please.. i failed in my first ccna 200-125 exam. Exam fee is difficult in my situation.. I will retake exam soon.. please to whom kind hearted, help me with the latest dumps.. nickojamkoh2914 (at) gmail.com

  27. Anonymous
    July 22nd, 2019

    hi everyone pls am in dear need of recent dumps for CCNA 200-125 exams is in less than 2 weeks osuntobs (at) gmail , would be extremely happy and gratefull to have this.

  28. Madhusudan Mudri
    July 25th, 2019

    Very crisp and effective writing, thanks.

  29. maoca
    October 7th, 2019

    Kindly would anyone send me 200-125 test dumps to mariolopznet at hotmail.com? thank you in advance.

  30. irfan
    October 20th, 2019

    If any one have latest Dumps for ccna 200-125 please share with me. I have exam on 30th on this month. iak4614(at)outlook(dot)com

  31. dmitry
    October 24th, 2019

    Pls send me dumps 200-125, my mail dimon965316(dog)yandex(dot)ru

  32. najib
    November 18th, 2019

    Pls send me dumps 200-125 , najibzemmouri(aol)

  33. tyang
    December 12th, 2019

    ccna 200-125 dumps please .my email gil4cisco at gmail dot com

  34. Roo
    December 22nd, 2019

    Kindly share to taproo123(at)gmail dot com

    Big thanks

  35. Anonymous
    December 24th, 2019

    please share the dumps on domain.username(at)gmail(dot)com

    Thanks and Regards!

  36. kan
    January 3rd, 2020

    dump ccna 200-125 please, Thanks. karnjaruenrit @ g m a i l . c o m

  37. Taking it in weeks
    January 10th, 2020

    Thanks for everything, am taking the exam in weeks. What should I focus on or concentrate on.


  38. Htoo Aung
    January 16th, 2020

    Please can one can send the dump 200-125
    Thank you very much

Comment pages
1 2 3 4 2820
Add a Comment