Border Gateway Protocol A short introduction to a protocol that can help you answer age old question:  “Is the Internet down again?” 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: Read some/all of the books I will list at the end of this presentation. Read the BGPv4 RFC’s. Watch the BGP videos I will provide links to at the end of this presentation. Befriend a R/S CCIE and suck their brains dry.
BGP: Why do we need it? It brings order to the Internet (Stability…..sort of). IGP’s are not built to handle routes for the entire public Internet (Currently over 300k IPv4 prefixes). Centralized routing doesn’t work in an environment as large as the Internet (Scalability). and many more…..but we get the idea.
Who would invent such a thing? Yakov Rekhter – Juniper Networks Formerly of cisco and IBM Kirk Lougheed - cisco
BGP Over the Years BGPv1 debuted in 1989 in RFC 1105. Yakov Rekhter and Kirk Lougheed were the authors. BGPv4 debuted in 1994 in RFC 1654. Yakov Rekhter and Tony Li were the authors. Current RFC for BGPv4 is 4271.
Yakov Mania! Co-Authored RFC 1918 (Private IPv4 Addressing) A Lead Designer of “Tag Switching” Author or Co-Author of over 70 IETF RFCS A Lead Designer of MPLS TE and MPLS VPN’s 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.
Do I Need BGP?
Do I Need BGP?
Autonomous System (AS) 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).  Source: http://en.wikipedia.org/wiki/Autonomous_system_(Internet)
How Does BGP Work?
Choose The Right Path BGP routing table entry for 68.156.159.0/24 Paths: (13 available, best #9, table Default-IP-Routing-Table) Advertised to non peer-group peers: 195.28.164.125  3333 6320 2828 29766  193.0.0.56 from 193.0.0.56 (193.0.0.56) Origin IGP, localpref 100, valid, external Community: 6320:21000 6320:21310 Last update: Sat Sep 12 00:54:11 2009  34225 1299 2828 29766  193.138.164.1 from 193.138.164.1 (193.138.164.1) 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 193.136.5.1 from 193.136.5.1 (193.136.5.1) Origin IGP, localpref 100, valid, external Last update: Fri Sep 11 10:28:59 2009  42109 41965 41877 12389 8342 2828 29766  91.103.24.1 from 91.103.24.1 (91.103.24.1) Origin EGP, localpref 100, valid, external Last update: Fri Sep 11 09:55:24 2009
Connecting AS’es Establish neighbor relationships manually Prevents rogue neighbors from coming online and causing problems Exchange routing information BGP uses TCP 179 A router that exchanges routes with another router is known as a speaker.
How Do I Affect Traffic Flow? Well Known Mandatory(WKM) Well Known Discriminatory(WKD) Optional Transitive(OT) Optional Non-Transitive(ONT) BGP has many attributes that can be used to affect traffic  flow. They will fall into 1 of 4 different categories:
Well Known Mandatory Must be understood by all BGP speakers, and must be included in all update messages.
Well Known Discretionary Must be understood by all BGP speakers, and can be carried in updates, but are not required.
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.
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.
Origin - WKM Describes how the path/route was introduced to BGP. There 3 possible types: I – IGP(Note: This is any route that originated from the BGP process on a BGP speaking router.) E – EGP(Note: This should not be seen anymore as EGP is no longer in use. BGP replaced it years ago. i – Incomplete – Originated from a process other than BGP. Redistribution from IGP’s(EIGRP/OSPF/RIP), connected, and static routes show up as “incomplete”.
AS Path - WKM List of autonomous systems that lead back to the source AS in which the route exists. Each time a BGP router passes an update to a router in another AS, it appends it’s own AS to the AS path in the routing update.
Next Hop - WKM This is the IP address of the router that  announced this route to the current AS.
Multi-Exit Discriminatory(MED) - ONT 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.
Local Preference - WKD Local preference is used to prefer an exit point within the local AS.
Atomic Aggregate - WKD Indicates that the prefix/advertisement is summarized from a more specific prefix.  This is designed to reduce the number of  prefixes that are advertised. An ISP who has  multiple prefixes that are used by different  customers might use this attribute to limit  what it advertises to the rest of the Internet.
Additional BGP Concepts Weight Communities eBGP vs iBGP Confederations And last but not least……..
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.
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
Additional Resources BGP Design and Implementation By Randy Zhang and Micah Bartell Cisco Press  ISBN-13:  978-1587051098   Internet Routing Architectures By Sam Halabi Cisco Press  ISBN-13:  978-1578702336 BGP By Iljitsch Van Beinum O’Reilly  ISBN-13:  978-0596002541   Routing TCP/IP Volume II By Jeff Doyle and Jennifer DeHaven Carroll Cisco Press  ISBN-13:  978-1578700899
Additional Resources Video -  BGP at 18: Lessons In Protocol Design by Yakov Rekhter http://www.youtube.com/watch?v=HAOVNYSnL7k Video -  Tutorial: BGP Techniques for Service Providers – Part 1 by Philip Smith http://www.nanog.org/meetings/nanog44/abstracts.php?pt=MzAmbmFub2c0NA==&nm=nanog44 Video -  Tutorial: BGP Techniques for Service Providers – Part 2 by Philip Smith  http://www.nanog.org/meetings/nanog44/abstracts.php?pt=MzQmbmFub2c0NA==&nm=nanog44
Additional Resources BGPv4 RFC -  http://www.ietf.org/rfc/rfc4271.txt Cisco BGPv4 Info –  http://www.cisco.com/en/US/tech/tk365/tk80/tsd_technology_support_sub-protocol_home.html BGP -  http://www.bgp4.as
Questions/Comments

BGP Overview

  • 1.
    Border Gateway ProtocolA short introduction to a protocol that can help you answer age old question: “Is the Internet down again?” 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: Read some/all of the books I will list at the end of this presentation. Read the BGPv4 RFC’s. Watch the BGP videos I will provide links to at the end of this presentation. Befriend a R/S CCIE and suck their brains dry.
  • 2.
    BGP: Why dowe need it? It brings order to the Internet (Stability…..sort of). IGP’s are not built to handle routes for the entire public Internet (Currently over 300k IPv4 prefixes). Centralized routing doesn’t work in an environment as large as the Internet (Scalability). and many more…..but we get the idea.
  • 3.
    Who would inventsuch a thing? Yakov Rekhter – Juniper Networks Formerly of cisco and IBM Kirk Lougheed - cisco
  • 4.
    BGP Over theYears BGPv1 debuted in 1989 in RFC 1105. Yakov Rekhter and Kirk Lougheed were the authors. BGPv4 debuted in 1994 in RFC 1654. Yakov Rekhter and Tony Li were the authors. Current RFC for BGPv4 is 4271.
  • 5.
    Yakov Mania! Co-AuthoredRFC 1918 (Private IPv4 Addressing) A Lead Designer of “Tag Switching” Author or Co-Author of over 70 IETF RFCS A Lead Designer of MPLS TE and MPLS VPN’s 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.
  • 7.
  • 8.
    Autonomous System (AS)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). Source: http://en.wikipedia.org/wiki/Autonomous_system_(Internet)
  • 9.
  • 10.
    Choose The RightPath BGP routing table entry for 68.156.159.0/24 Paths: (13 available, best #9, table Default-IP-Routing-Table) Advertised to non peer-group peers: 195.28.164.125 3333 6320 2828 29766 193.0.0.56 from 193.0.0.56 (193.0.0.56) Origin IGP, localpref 100, valid, external Community: 6320:21000 6320:21310 Last update: Sat Sep 12 00:54:11 2009 34225 1299 2828 29766 193.138.164.1 from 193.138.164.1 (193.138.164.1) 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 193.136.5.1 from 193.136.5.1 (193.136.5.1) Origin IGP, localpref 100, valid, external Last update: Fri Sep 11 10:28:59 2009 42109 41965 41877 12389 8342 2828 29766 91.103.24.1 from 91.103.24.1 (91.103.24.1) Origin EGP, localpref 100, valid, external Last update: Fri Sep 11 09:55:24 2009
  • 11.
    Connecting AS’es Establishneighbor relationships manually Prevents rogue neighbors from coming online and causing problems Exchange routing information BGP uses TCP 179 A router that exchanges routes with another router is known as a speaker.
  • 12.
    How Do IAffect Traffic Flow? Well Known Mandatory(WKM) Well Known Discriminatory(WKD) Optional Transitive(OT) Optional Non-Transitive(ONT) BGP has many attributes that can be used to affect traffic flow. They will fall into 1 of 4 different categories:
  • 13.
    Well Known MandatoryMust be understood by all BGP speakers, and must be included in all update messages.
  • 14.
    Well Known DiscretionaryMust be understood by all BGP speakers, and can be carried in updates, but are not required.
  • 15.
    Optional Transitive Maybe 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.
    Optional Non-Transitive Maybe understood by some BGP speakers, but not all. If these attributes are not understood, they are dropped and not advertised to peers.
  • 17.
    Origin - WKMDescribes how the path/route was introduced to BGP. There 3 possible types: I – IGP(Note: This is any route that originated from the BGP process on a BGP speaking router.) E – EGP(Note: This should not be seen anymore as EGP is no longer in use. BGP replaced it years ago. i – Incomplete – Originated from a process other than BGP. Redistribution from IGP’s(EIGRP/OSPF/RIP), connected, and static routes show up as “incomplete”.
  • 18.
    AS Path -WKM List of autonomous systems that lead back to the source AS in which the route exists. Each time a BGP router passes an update to a router in another AS, it appends it’s own AS to the AS path in the routing update.
  • 19.
    Next Hop -WKM This is the IP address of the router that announced this route to the current AS.
  • 20.
    Multi-Exit Discriminatory(MED) -ONT 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.
  • 21.
    Local Preference -WKD Local preference is used to prefer an exit point within the local AS.
  • 22.
    Atomic Aggregate -WKD Indicates that the prefix/advertisement is summarized from a more specific prefix. This is designed to reduce the number of prefixes that are advertised. An ISP who has multiple prefixes that are used by different customers might use this attribute to limit what it advertises to the rest of the Internet.
  • 23.
    Additional BGP ConceptsWeight Communities eBGP vs iBGP Confederations And last but not least……..
  • 24.
    Route Reflectors Whatif 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.
    Route Reflectors Withroute 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.
    Additional Resources BGPDesign and Implementation By Randy Zhang and Micah Bartell Cisco Press ISBN-13: 978-1587051098 Internet Routing Architectures By Sam Halabi Cisco Press ISBN-13: 978-1578702336 BGP By Iljitsch Van Beinum O’Reilly ISBN-13: 978-0596002541 Routing TCP/IP Volume II By Jeff Doyle and Jennifer DeHaven Carroll Cisco Press ISBN-13: 978-1578700899
  • 27.
    Additional Resources Video- BGP at 18: Lessons In Protocol Design by Yakov Rekhter http://www.youtube.com/watch?v=HAOVNYSnL7k Video - Tutorial: BGP Techniques for Service Providers – Part 1 by Philip Smith http://www.nanog.org/meetings/nanog44/abstracts.php?pt=MzAmbmFub2c0NA==&nm=nanog44 Video - Tutorial: BGP Techniques for Service Providers – Part 2 by Philip Smith http://www.nanog.org/meetings/nanog44/abstracts.php?pt=MzQmbmFub2c0NA==&nm=nanog44
  • 28.
    Additional Resources BGPv4RFC - http://www.ietf.org/rfc/rfc4271.txt Cisco BGPv4 Info – http://www.cisco.com/en/US/tech/tk365/tk80/tsd_technology_support_sub-protocol_home.html BGP - http://www.bgp4.as
  • 29.