BGP Overview


Published on

A presentation from Matthew Norwood at CHS about BGP. Given on September 15, 2009 at the Nashville Cisco Users Group meeting.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

BGP Overview

  1. 1. Border Gateway Protocol <ul><li>A short introduction to a protocol that can help you answer age old question: “Is the Internet down again?” </li></ul><ul><li>Note : I will purposely skip over quite a few things in order to finish at a reasonable time. If you want in depth, you have 4 choices: </li></ul><ul><li>Read some/all of the books I will list at the end of this presentation. </li></ul><ul><li>Read the BGPv4 RFC’s. </li></ul><ul><li>Watch the BGP videos I will provide links to at the end of this presentation. </li></ul><ul><li>Befriend a R/S CCIE and suck their brains dry. </li></ul>
  2. 2. BGP: Why do we need it? <ul><li>It brings order to the Internet (Stability…..sort of). </li></ul><ul><li>IGP’s are not built to handle routes for the entire public Internet (Currently over 300k IPv4 prefixes). </li></ul><ul><li>Centralized routing doesn’t work in an environment as large as the Internet (Scalability). </li></ul><ul><li>and many more…..but we get the idea. </li></ul>
  3. 3. Who would invent such a thing? Yakov Rekhter – Juniper Networks Formerly of cisco and IBM Kirk Lougheed - cisco
  4. 4. BGP Over the Years <ul><li>BGPv1 debuted in 1989 in RFC 1105. Yakov Rekhter and Kirk Lougheed were the authors. </li></ul><ul><li>BGPv4 debuted in 1994 in RFC 1654. Yakov Rekhter and Tony Li were the authors. Current RFC for BGPv4 is 4271. </li></ul>
  5. 5. Yakov Mania! <ul><li>Co-Authored RFC 1918 (Private IPv4 Addressing) </li></ul><ul><li>A Lead Designer of “Tag Switching” </li></ul><ul><li>Author or Co-Author of over 70 IETF RFCS </li></ul><ul><li>A Lead Designer of MPLS TE and MPLS VPN’s </li></ul>Since most people are not familiar with Yakov Rekhter, it is only fitting that he receive his own slide. Why? Bill Gates gets all the adoration from the systems people and network people need their own hero.
  6. 6. Do I Need BGP?
  7. 7. Do I Need BGP?
  8. 8. Autonomous System (AS) <ul><li>Within the Internet, an autonomous system (AS) is a collection of connected Internet Protocol (IP) routing prefixes under the control of one or more network operators that presents a common, clearly defined routing policy to the Internet (cf. RFC 1930, Section 3). </li></ul>Source:
  9. 9. How Does BGP Work?
  10. 10. Choose The Right Path BGP routing table entry for Paths: (13 available, best #9, table Default-IP-Routing-Table) Advertised to non peer-group peers: 3333 6320 2828 29766 from ( Origin IGP, localpref 100, valid, external Community: 6320:21000 6320:21310 Last update: Sat Sep 12 00:54:11 2009 34225 1299 2828 29766 from ( Origin IGP, localpref 100, valid, external Community: 34225:1000 34225:1001 Last update: Fri Sep 11 12:51:30 2009 1930 20965 3549 2828 29766 from ( Origin IGP, localpref 100, valid, external Last update: Fri Sep 11 10:28:59 2009 42109 41965 41877 12389 8342 2828 29766 from ( Origin EGP, localpref 100, valid, external Last update: Fri Sep 11 09:55:24 2009
  11. 11. Connecting AS’es <ul><li>Establish neighbor relationships manually </li></ul><ul><ul><li>Prevents rogue neighbors from coming online and causing problems </li></ul></ul><ul><li>Exchange routing information </li></ul><ul><ul><li>BGP uses TCP 179 </li></ul></ul><ul><ul><li>A router that exchanges routes with another router is known as a speaker. </li></ul></ul>
  12. 12. How Do I Affect Traffic Flow? <ul><li>Well Known Mandatory(WKM) </li></ul><ul><li>Well Known Discriminatory(WKD) </li></ul><ul><li>Optional Transitive(OT) </li></ul><ul><li>Optional Non-Transitive(ONT) </li></ul>BGP has many attributes that can be used to affect traffic flow. They will fall into 1 of 4 different categories:
  13. 13. Well Known Mandatory Must be understood by all BGP speakers, and must be included in all update messages.
  14. 14. Well Known Discretionary Must be understood by all BGP speakers, and can be carried in updates, but are not required.
  15. 15. Optional Transitive May be understood by some BGP speakers, but not all. They need to be included in updates and advertised to all peers whether they understand them or not.
  16. 16. Optional Non-Transitive May be understood by some BGP speakers, but not all. If these attributes are not understood, they are dropped and not advertised to peers.
  17. 17. Origin - WKM <ul><li>Describes how the path/route was introduced to BGP. </li></ul><ul><li>There 3 possible types: </li></ul><ul><li>I – IGP(Note: This is any route that originated from the BGP process on a BGP speaking router.) </li></ul><ul><li>E – EGP(Note: This should not be seen anymore as EGP is no longer in use. BGP replaced it years ago. </li></ul><ul><li>i – Incomplete – Originated from a process other than BGP. Redistribution from IGP’s(EIGRP/OSPF/RIP), connected, and static routes show up as “incomplete”. </li></ul>
  18. 18. AS Path - WKM <ul><li>List of autonomous systems that lead back </li></ul><ul><li>to the source AS in which the route exists. </li></ul><ul><li>Each time a BGP router passes an update to </li></ul><ul><li>a router in another AS, it appends it’s own </li></ul><ul><li>AS to the AS path in the routing update. </li></ul>
  19. 19. Next Hop - WKM <ul><li>This is the IP address of the router that </li></ul><ul><li>announced this route to the current AS. </li></ul>
  20. 20. Multi-Exit Discriminatory(MED) - ONT <ul><li>This is a 32 bit value that is propagated to adjacent AS’es. It is used to differentiate paths leading into your AS and cause a neighboring AS to choose one router over another. </li></ul>
  21. 21. Local Preference - WKD <ul><li>Local preference is used to prefer an exit </li></ul><ul><li>point within the local AS. </li></ul>
  22. 22. Atomic Aggregate - WKD <ul><li>Indicates that the prefix/advertisement is </li></ul><ul><li>summarized from a more specific prefix. </li></ul><ul><li>This is designed to reduce the number of </li></ul><ul><li>prefixes that are advertised. An ISP who has </li></ul><ul><li>multiple prefixes that are used by different </li></ul><ul><li>customers might use this attribute to limit </li></ul><ul><li>what it advertises to the rest of the Internet. </li></ul>
  23. 23. Additional BGP Concepts <ul><li>Weight </li></ul><ul><li>Communities </li></ul><ul><li>eBGP vs iBGP </li></ul><ul><li>Confederations </li></ul>And last but not least……..
  24. 24. Route Reflectors What if your AS looked like this? In iBGP, all speakers must have a neighbor relationship with each other to prevent routing loops. In a 10 router AS, you would have to configure 9 neighbors per router for a total of 45 neighbor relationships based on (n–(n–1))/2.
  25. 25. Route Reflectors With route reflectors, your AS could look like this. A lot fewer iBGP neighbor relationships would be required. RR – Route Reflector RRC – Route Reflector Client NCP – Non-Client Peer
  26. 26. Additional Resources <ul><li>BGP Design and Implementation By Randy Zhang and Micah Bartell </li></ul><ul><li>Cisco Press ISBN-13: 978-1587051098 </li></ul><ul><li>Internet Routing Architectures By Sam Halabi </li></ul><ul><li>Cisco Press ISBN-13: 978-1578702336 </li></ul><ul><li>BGP By Iljitsch Van Beinum </li></ul><ul><li>O’Reilly ISBN-13: 978-0596002541 </li></ul>Routing TCP/IP Volume II By Jeff Doyle and Jennifer DeHaven Carroll Cisco Press ISBN-13: 978-1578700899
  27. 27. Additional Resources <ul><li>Video - BGP at 18: Lessons In Protocol Design by Yakov Rekhter </li></ul><ul><li> </li></ul><ul><li>Video - Tutorial: BGP Techniques for Service Providers – Part 1 by Philip Smith </li></ul><ul><li> </li></ul><ul><li>Video - Tutorial: BGP Techniques for Service Providers – Part 2 by Philip Smith </li></ul>
  28. 28. Additional Resources <ul><li>BGPv4 RFC - </li></ul><ul><li>Cisco BGPv4 Info – </li></ul><ul><li>BGP - </li></ul>
  29. 29. <ul><li>Questions/Comments </li></ul>