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 (47) Comments
Comment pages
1 2 2820
  1. Rokib
    February 14th, 2017

    I can

  2. jp
    February 17th, 2017

    anyone please send me the latest dump to my email

    jpark060 (at) student (dot) msjc (dot) edu

    Thanks a lot in advance

  3. CCIE Expert
    February 21st, 2017

    My student passed today 200-125 exam today. 171Qs File is 100% striking in exam.
    Get instant Download at below page”

    http://rarme.com/?X53Lo

  4. xmervz
    February 26th, 2017

    @Rokib, we must use EGP for R1 and R3 because R1 and R3 are connected in other AS for them to communicate with different AS.

  5. Anonymous
    March 5th, 2017

    i need new update dump……
    {email not allowed}

  6. anonymous
    March 6th, 2017

    @syedabidi050 gaaand me dalo apna phone.Itna acche sey dia gaya hai pad le na

  7. swearitout
    March 8th, 2017

    Please send the dump file to noctemdaemon at gmail

  8. Omenemo
    March 10th, 2017

    hi, could someone send me a copy of the latest CCNA 200-125 dump to my email omen_1925 at yahoo.com.

    Thanks in advance!

  9. Anonymous
    March 16th, 2017

    Passed CCNA 200-125
    Studied Latest dumps 171+182+191
    https://docs.google.com/uc?export=download&id=0BwepsouMuqCjUnBBcFpWaVFFcEU

  10. SP
    March 20th, 2017

    Can someone send the latest dumps to my email addy .. {email not allowed}.

    Note: I have others dumps to offer as a form of appreciation

  11. Anonymous
    March 23rd, 2017

    can someone send me latest ccna dumps to my email
    patel dot kp 1007 gmail dot com

  12. sai
    March 28th, 2017

    can anyone send me the latest dumps, to my email id {email not allowed}

  13. sai
    March 28th, 2017

    {email not allowed}

  14. sai
    March 28th, 2017

    can anyone send me the latest dumps to my email saiteja41048 dot gmail.com

  15. chia0tzu
    March 31st, 2017

    Please send latest dumps at darkopsyho5 @ gmail.com

  16. joe
    April 4th, 2017

    These people are tricky. They are selling dumps. Bunch of fools.

  17. Anonymous
    April 19th, 2017

    please sent the latest dumps at macequation @ gmail.com

  18. roy
    April 27th, 2017

    please send latest dumps at {email not allowed}

    thanks in advance

  19. Jamal
    May 2nd, 2017

    CAn I please have latest dumps for CCNA, please. its_mylife20 (at) hotmail dot com

  20. mack
    May 7th, 2017

    Please send me latest dumps for CCNA ( {email not allowed} ). Thank you very much!

  21. rod
    May 10th, 2017

    can you please send me the latest dumps.

    {email not allowed}

  22. Black
    May 10th, 2017

    perfectly explained !

  23. CiscoPassion
    May 13th, 2017

    If somebody can be kind and sand me newst dumps, i will be grateful… my e-mail: iloa @ aol . pl
    Baybe some day i can help U with something ;)) I’m skilled

  24. ali
    May 16th, 2017

    27.Which of the following encrypts the traffic on a leased line?
    A. telnet
    B. ssh
    C. vtp
    D. vpn
    E. dmvpn
    please correct answer requred

  25. ali
    May 16th, 2017

    Which two statements about syslog loging are true?(Choose two.)
    A. Syslog logging is disabled by default
    B. Messages are stored in the internal memory of device
    C. Messages can be erased when device reboots
    D. Messages are stored external to the device
    E. The size of the log file is dependenet on the resources of the device
    Please answer , Thanks in adnvance

  26. RaRa
    May 22nd, 2017

    Please send latest dump to email raptortx915 @ gmail

  27. Pao
    May 23rd, 2017

    can someone please send me the latest dumps, thank you very much.
    my email: kruxifyer @ gmail dot com

  28. CCNA
    June 14th, 2017

    Can someone send me the latest dump for CCNA 200-125?
    Email: pg021988 @ gmail
    Thanks!

  29. Saffron
    June 20th, 2017

    Can someone send me the latest dump for CCNA 200-125? mzaffino @ hotmail com

  30. haz
    June 27th, 2017

    can anyone please send me the latest dump for CCNA 200-125? {email not allowed}

  31. haz
    June 27th, 2017

    can anyone please send me the latest dump for CCNA 200-125? silentplay4u @ gmail.com

  32. Anonymous
    June 28th, 2017

    can anyone please send me the latest dump for CCNA 200-125? michaelandrewsnee @ gmail . com

  33. Ven
    July 3rd, 2017

    Hi can anyone send me latest dumps

    venkata . s 890 @ gmail com

  34. BOB
    July 5th, 2017

    HI GUYS PLS HELP. I NEED LaTEST CCNA DUMPS. sne58 at hotmail dot com. thnks in advance guys

  35. Anonymous
    July 14th, 2017

    hi Guys Please send me latest CCNA R&S dumps at yadikidurgateja @ gmail (dot) com

  36. Akki
    July 18th, 2017

    please send me latest dumps nikita.patil979 @ gmail . com

  37. Sam
    July 24th, 2017

    Please can someone send me latest CCNA dumps…. {email not allowed}

  38. Sam
    July 24th, 2017

    Please can someone send me latest CCNA dumps…..samdgreat1 @ gmail.com

  39. Junior1986
    July 24th, 2017

    Please, anyone please send me the latest dump to my email?
    {email not allowed}
    Thanks a lot in advance

  40. Junior1986
    July 24th, 2017

    Please, anyone please send me the latest dump to my email?
    naldinho.junior yahoo com br
    Thanks a lot in advance

  41. John D. Ngowi
    July 26th, 2017

    Can any one let Me know which one is the right and valid dump pleasee (The name and number of qns)

  42. osi
    August 2nd, 2017

    Please send me the latest dumps on Ccna 200-125 osifoh dot Ogbeiwi @gmail dot Com

  43. King
    August 3rd, 2017

    Please anyone
    send the latest dump eidriszalyusuf at gmail dot com TQ

  44. Anonymous
    August 22nd, 2017

    plis i need send me the latest dumps on ccna i need the certification. {email not allowed}

  45. Tolkien2017
    August 22nd, 2017

    plis i need send me the latest dumps on ccna i need the certification. ({email not allowed}=)

  46. Tolkien2017
    August 22nd, 2017

    plis i need send me the latest dumps on ccna i need the certification. (fcampos @ gmail.com)

  47. Tolkien2017
    August 22nd, 2017

    plis i need send me the latest dumps on ccna i need the certification. ( fcampos @ interside.cl ) sorry , this is my correct email.

Comment pages
1 2 2820
Add a Comment