external routing external routing bgp
play

External Routing External Routing BGP JeanYves Le Boudec Fall 2009 - PDF document

COLE POLYTECHNIQUE FDRALE DE LAUSANNE External Routing External Routing BGP JeanYves Le Boudec Fall 2009 Self Organization 1 1 Contents A. What InterDomain Routing does 1 1. Inter Domain Routing Inter Domain Routing 2.


  1. ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE External Routing External Routing BGP Jean‐Yves Le Boudec Fall 2009 Self ­ Organization 1 1

  2. Contents A. What Inter‐Domain Routing does 1 1. Inter Domain Routing Inter ‐ Domain Routing 2. Policy Routing 3. Route Aggregation B. How BGP works 1. How it works 2. Interaction BGP—IGP—Packet Forwarding 3. Other Bells and Whistles C. Examples D. Illustrations and Statistics 2 2

  3. A. What BGP Does 1. Inter ‐ Domain Routing Why invented ? The Internet is too large to be run by one routing protocol The Internet is too large to be run by one routing protocol Hierarchical routing is used the Internet is split into Domains, or Autonomous Systems with OSPF: large domains are split into Areas Routing protocols are said interior : (Internal Gateway Protocols, IGPs): inside ASs: RIP, OSPF (standard), IGRP (Cisco) exterior : between ASs: e te o EGP (old) and BGP ‐ 1 to BGP ‐ 4 (today), IDRP (tomorrow, maybe) 3 3

  4. What is an ARD ? An AS ? ARD = Autonomous Routing Domain = routing domain under one single administration one or more border routers all subnetworks inside an ARD should be connected should learn about other subnetwork prefixes ‐ the routing tables of internal routers should contain entries of all destination of the Internet AS = Autonomous System = ARD with a number (“AS number”) AS number is 16 bits public: 1 ‐ 64511 private: 64512 – 65535 ARDs that are do not need a number are typically those with default route to the rest of the world Examples Examples AS1942 ‐ CICG ‐ GRENOBLE, AS2200 ‐ Renater AS559 ‐ SWITCH Teleinformatics Services AS5511 – OPENTRANSIT EPFL: one ARD, no number 4 4

  5. the figure shows three domains, or ARDs. ARDs can be transit (B and D), stub (A) or multihomed (C). Only non stub ( ), ( ) ( ) y domains need an AS number. ARD D D1 area 0 D4 4 D3 3 BGP-4 area 1 area 2 D2 BGP-4 D6 D5 OSPF C1 A1 BGP-4 A4 IGRP C2 OSPF A2 BGP-4 C4 C4 B1 B1 B4 C3 B2 A3 B3 ARD C Autonomous Routing Domain A ARD B 5 5

  6. What does BGP do ? What does BGP do ? BGP is a routing protocol between ARDs It is used to compute BGP is a routing protocol between ARDs. It is used to compute paths from one router in one ARD to any network prefix anywhere in the world There are only two levels for BGP : Inter ‐ domain within domain The method of routing is Path vector With policy 6 6

  7. Path Vector Routing What is the requirement ? Find best routes, in a sense that can be decided by every ARD using their own criteria How does it work ? a route between neighbours is (path: dest) where path is a sequence of AS numbers and dest is a route between neighbours is (path: dest) where path is a sequence of AS numbers and dest is an IP prefix example: B A:n1 every AS uses its own rules for deciding which path is better BGP table keeps a record of best paths to all destinations AS announces only the best paths it knows Q. Explain how E can choose the best paths to n1 and n2 ? Q. How can loops be avoided ? solution Q p BGP table in E BGP table in E n5 B A:n1,n2 dest AS path B:n5 A:n1,n2 B n1 B A n2 B A n1, n2 n3 D C E n4 n4 n4 D D A n5 B D C A:n1,n2 D C A:n1,n2 n3 D C: n3 C A:n1,n2 D: n4 C:n3 7 7

  8. Border Gateways, E ‐ and I ‐ BGP A router that runs BGP is called a BGP speaker At the boundary between 2 ARDs there are 2 BGP speakers, one in each domain Q: compare to OSPF Inside one ARD there are usually several BGP speakers They all talk to each other, to exchange what they have learnt Using “Internal BGP” (I ‐ BGP) Over TCP connections, full mesh called the “BGP mesh” I BGP is the same as E BGP except for one rule: routes learned from a node in the I ‐ BGP is the same as E ‐ BGP except for one rule: routes learned from a node in the mesh are not repeated inside the mesh X:n1 X:n1 D1 E-BGP D2 A B D C A->C: D1 X:n1 I-BGP C->E: D1 X:n1 D3 E->G: D3 D1,X:n1 E F E-BGP G H D5 D4 8 8

  9. Q1: Which of the following announcements do you think router D will send to router E ? 1. D ‐ >E: D2 X:n1 2. D ‐ >E: D1 X:n1 A: 1 only; 2 cannot be sent because over I ‐ BGP we do not repeat a route learnt f from another BGP speaker in the same ARD th BGP k i th ARD Q2: Assume that in the figure below the router R does not run BGP. Is this possible ? A: yes. Q3: Do BGP speakers in the same ARD need to be on link ? Q3: Do BGP speakers in the same ARD need to be on‐link ? A: no; C and F are not directly connected (are not on‐link) X:n1 X:n1 D1 D2 E-BGP A B solution D D C C I-BGP D3 R E F E-BGP G H D5 D4 9 9

  10. 2. Policy Routing Why invented ? Interconnection of ASs is self‐organized point to point links between networks: ex: EPFL to Switch, Switch to Telianet interconnection points: NAP (Network Access Point), MAE (Metropolitan Area Ethernet), CIX (Commercial Internet eXchange), GIX (Global Internet eXchange), IXP, SFINX, LINX Mainly 3 types of relations, depending on money flows customer: EPFL is customer of Switch. EPFL pays Switch provider: Switch is provider for EPFL; Switch is paid by EPFL peer: EPFL and CERN are peers: costs of interconnection is shared the type of relation is negotiated in bilateral agreements there is no architecture rule, just business 10 10

  11. What is the Goal of Policy Routing ? Example: ISP3 ‐ ISP2 is transatlantic link cost shared between ISP3 ISP2 is transatlantic link, cost shared between ISP 3 ISP 2 ISP2 and ISP 3 ISP 3 ‐ ISP 1 is a local, inexpensive link Ci is customer of ISPi, ISPs are peers ISP 1 It is advantageous for ISP3 to send traffic to n2 via ISP1 2 i ISP1 C2 C3 ISP1 does not agree to carry traffic from C3 n2 to C2 C1 ISP1 offers a “transit service” to C1 and a “non ‐ transit” service to ISP 2 and ISP3 The goal of “policy routing” is to support this and other similar requirements provider peers customer 11 11

  12. How does Policy Routing Work ? Policy routing is implemented by rules imposed to BGP routers inside an AS, who may refuse to import or announce some paths refuse to import or announce some paths ISP 3 ISP 2 modify the attributes that control which path is preferred (see later) Example ISP 1 ISP 1 announces to ISP 3 all networks of C1 – so that C1 can C2 C3 be reached by all sources in the world ISP 1 announces to C1 all routes it has learnt from ISP3 and n2 n3 ISP2 – so that C1 can send traffic to all destinations in the world C1 ISP2 announces “ISP2 n2” to ISP3 and ISP1 ; assume that ISP1 annouces “ISP1 ISP2 n2” to ISP3. ISP1 annouces ISP1 ISP2 n2 to ISP3. ISP 3 has two routes to n2: “ISP2 n2” and “ISP1 ISP2 n2”; assume that ISP3 gives preference to the latter packets from n3 to n2 are routed via ISP1 – undesired solution: ISP 1 announces to ISP3 only routes to ISP3’s customers 12 12

  13. Typical Policy Routing Rules Provider (ISP1) to customer (C1) announce all routes learnt from other ISs ISP 3 import only routes that belong to domain C1 ISP 2 example: import from EPFL only one route 128.178/15 Customer (C1) to Provider (ISP1) ISP 1 announce all routes that belong to domain C1 C2 C3 import all routes Peers (ISP1 to ISP3) announce only routes to all customers of ISP1 C1 import only routes to ISP3’s customer these routes are defined as part of peering these routes are defined as part of peering agreement The rules are defined by every AS (self‐ organization) and implemented in all BGP speakers in one AS 13 13

  14. 3. Aggregation Domains that do not have a default route (i.e. all transit ISPs) must know all routes in the world (> 170 000 prefixes) must know all routes in the world (> 170 000 prefixes) in IP routing tables unless default routes are used in BGP announcements Aggregation is a way to reduce the number of routes 14 14

  15. Aggregation Example 1 193.212.0.0/24 AS1 AS1 193.212.0.0/23 193.212.0.0/23 AS3 AS4 AS2 193.212.1.0/24 Assume AS3 aggregates the routes received from AS1 and AS2 AS1: 193.212.0.0/24 AS_PATH: 1 AS2: 193.212.1.0/24 AS_PATH: 2 AS3: 193.212.0.0/23 AS_PATH: 3 {1 2} AS4: 193.212.0.0/23 AS4: 193 212 0 0/23 AS_PATH: 4 3 {1 2} AS PATH: 4 3 {1 2} 15 15

  16. Aggregation Example 2 197.8.2.0/24 AS1 AS1 197.8.2.0/23 197.8.2.0/23 AS3 AS4 n4 AS2 197.8.3.0/24 n2= 197.8.3.0/24 197.8.3.0/24 AS4 receives 197.8.2.0/23 AS_PATH: 3 {1 2} 197.8.3.0/24 AS_PATH: 2 and assume that AS4 exports only the first route (aggregation is done) But assume both routes are injected into AS4’s local routing tables; Q: j g what happens to packets from n4 to n2 ? If AS4 injects only the aggregate route into its local routing tables, what is the answer now ? solution 16 16

  17. Example Without Aggregation 197.8.2.0/24 197.8.2.0/23 197.8.2.0/23 197.8.2.0/23 197.8.2.0/23 AS1 AS1 197.8.2.0/24 197.8.2.0/24 AS3 AS4 197.8.3.0/24 197.8.3.0/24 AS2 197.8.3.0/24 197.8.3.0/24 Q: If AS3 does not aggregate, what are the routes announced by AS 4 ? Is there any benefit ? solution 17 17

  18. Morale Aggregation should be performed whenever possible when all aggregated prefixes have the same path (example 1) when all aggregated prefixes have the same path (example 1) when all aggregated prefixes have the same path before the aggregation point (example 2 ) An AS can decide to Aggregate several routes when exporting them But still maintain different routing entries inside its domain (example 2) 18 18

Recommend


More recommend