1 / 26

Border Gateway Protocol (BGP)

Border Gateway Protocol (BGP). Current Internet Architecture. (1999-2000). Allocated AS Numbers. http://www.potaroo.net/tools/asn16/. BGP Routing. The de facto standard for inter-AS routing Path Vector (PV) Protocol Extension of Distance Vector Protocol

amanda-chen
Télécharger la présentation

Border Gateway Protocol (BGP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Border Gateway Protocol (BGP) Digital Switching

  2. Current Internet Architecture (1999-2000) Digital Switching

  3. Allocated AS Numbers http://www.potaroo.net/tools/asn16/ Digital Switching

  4. BGP Routing • The de facto standard for inter-AS routing • Path Vector (PV) Protocol • Extension of Distance Vector Protocol • AS_PATH attribute within routing announcement • Each Border Gateway broadcasts to BGP neighbors (peers) the entire path (i.e., sequence of ASes) to the destination network (prefix) • Example (Consider a router X and prefix Z): • X stores the following path to destination Z • Path (X, Z) = X, Y1, Y2, …, Z • Different from RIP distance vector Digital Switching

  5. BGP Routing • Now X may send this “path vector” to another border router W through BGP • A promise that I will take care of traffic for Z • Gateway W may or may not select the offered path, based on: • Cost • Policy • Additional reasons (later!) • If W selects the path advertised by X • Path (W, Z) = W, Path (X, Z) Digital Switching

  6. BGP Routing Policy • A, B, C are provider networks • X, W, Y are customers (of provider networks) • X is dual-homed: attached to two networks • X does not want to route from B via X to C • So, X should not advertise to B that a route to C exists! Digital Switching

  7. BGP Routing Policy • A advertises to B the path AW • B advertises to X the path BAW • So that X can reach W • Should B advertise to C the path BAW? • No way! B gets no “revenue” for routing CBAW since neither W nor C are B’s customers • B wants to route only to/from its customers! Digital Switching

  8. BGP in Practice • Most customers of an ISP DO NOT use BGP • Routed with static configuration • Some customers of ISPs use BGP • Need to be careful about: • Single versus multi-homed customers • ISP-independent vs. ISP-assigned IP addresses • In rare cases, a simple IGP (such as RIP) is used between the customer’s router and the ISP’s BGP router to pass dynamic information about external routes Digital Switching

  9. Transit versus Non-transit AS Digital Switching

  10. BGP Operation Digital Switching

  11. BGP Operation: Messages • Peers exchange BGP messages using TCP (port 179) • OPEN (BGP message TYPE=1) • Identify itself and specify BGP operational parameters • Authenticates the sender • UPDATE (TYPE=2) • Advertises a new path (or withdraws old) • KEEPALIVE (TYPE=4; 60 sec default on Cisco) • Keeps connection alive in the absence of updates • Serves as ACK to an OPEN request • No need to refresh routing information as long as the connection is alive (last exchange is considered good enough!) • NOTIFICATION (TYPE=3) • Reports error in a previous message • Always causes the underlying TCP connection to close Digital Switching

  12. BGP OPEN message BGP sessions remain Established until an error occurs! • When error occurs: • message is sent to the neighbor and TCP connection is closed • Each end must stop using the routing information heard from the other Digital Switching

  13. A BGP Update Message • TIME : Tue Jun 1 00:08:03 2004 • LENGTH : 72 • TYPE : Zebra BGP • SUBTYPE : Zebra BGP Message • SOURCE_AS : 7018 • DEST_AS : 6447 • INTERFACE : 0 • SOURCE_IP : 12.0.1.63 • DEST_IP : 128.223.60.102 • MESSAGE TYPE : Update/Withdraw • WITHDRAW : • ANNOUNCE : • 64.166.88.0/24 • ATTRIBUTES : • ATTR_LEN : 29 • ORIGIN : 0 • ASPATH : 7018 701 19714 • NEXT_HOP : 12.0.1.63 • MED : N/A • LOCAL_PREF : N/A • ATOMIC_AGREG : N/A • AGGREGATOR : N/A • COMMUNITIES : 7018:5000 Digital Switching

  14. BGP Attributes Digital Switching

  15. BGP UPDATE message Digital Switching

  16. ORIGIN attribute • Type Code=1 • How this router learned of a prefix? • Directly connected interfaces (IGP, value=1) • Manually configured (value=3) • Dynamic internal routing protocols (IGP, value=1) • Dynamic external routing protocols (EGP, value=2) • Attribute values • 1: IGP • 2: EGP • 3: incomplete Digital Switching

  17. BGP Route Selection Digital Switching

  18. BGP Route Selection Digital Switching

  19. MED attribute • How to reach a certain prefix when multiple links exist between 2 AS’s? • Metric expressing a degree of preference to reach a prefix • Used only in provider/subscriber situation when one party is being paid by another to carry its traffic • Consider that ISP1 chooses to ignore MED set by ISP2! • Consider that ISP2 takes the MED into account! Digital Switching

  20. External and Internal BGP • Problem: • How do R1 and R2 in AS1 learn routes from AS2? (Same for R5) • Solution 1: • Inject into IGP the prefixes learnt via BGP from other AS’s (such as in OSPF, for example) • Ok in smaller networks where full routing tables are not needed • Solution 2: • Use internal BGP (IBGP) Digital Switching

  21. B A D C eBGP and iBGP 18.0.0.0/8 eBGP iBGP Border router/ Egress Autonomous System (AS) Route Digital Switching

  22. iBGP versus eBGP • Both propagate inter-AS routing information • Same protocol • Same message types • Same attribute set (subset used by iBGP/eBGP) • Differ in rules for re-advertising prefixes • Prefixes learnt from eBGP peers can be advertised to iBGP peer (vice versa is also true!) • Prefixes learnt from iBGP peers not advertised to any other iBGP peer • Each pair of routers in an AS must peer with each other • Full mesh of BGP peering Digital Switching

  23. Distributing Reachability Information within the AS Note: Border routers also need iBGP sessions with I internal routers Digital Switching

  24. Route Reflectors Digital Switching

  25. Problems with Route Reflectors • Problem 1 • Routers may not choose best route • Because, RR only selects its own best route • Problem 2 • RR choose their best route and make full mesh • This may result in forwarding loops • See BGPsep paper (Infocom 2006) Digital Switching

  26. 3a 3b 2a AS3 AS2 1a 2c AS1 2b eBGP session 3c 1b 1d 1c iBGP session Distributing Reachability Info to other Autonomous Systems • With eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1. • 1c can then use iBGP to distribute this new prefix reach info to all routers in AS1 • 1b can then re-advertise the new reach info to AS2 over the 1b-to-2a eBGP session • When router learns about a new prefix, it creates an entry for the prefix in its forwarding table. Digital Switching

More Related