how the internet works the border gateway protocol bgp
play

How the Internet works? The Border Gateway Protocol (BGP) Edwin - PowerPoint PPT Presentation

Chair of Network Architectures and Services - Prof. Carle Department of Computer Science Technical University of Munich How the Internet works? The Border Gateway Protocol (BGP) Edwin Cordeiro iLab2 Lecture SS 2017 Technical University of


  1. Chair of Network Architectures and Services - Prof. Carle Department of Computer Science Technical University of Munich How the Internet works? The Border Gateway Protocol (BGP) Edwin Cordeiro iLab2 Lecture SS 2017 Technical University of Munich (TUM) Department of Informatics Chair of Network Architectures and Services

  2. Outline Routing and Forwarding RIB and FIB Path Vector Protocols Border Gateway Protocol (BGP) Business Considerations and Policy routing BGP Table Considerations Internet Exchange Points (IXP) Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 2

  3. Routing ≠ Forwarding Routing: • The process of determining the best path for specific types of packets (usually: all packets with the same destination) through the network • (Traditionally) performed jointly by the routers of a network by exchanging messages • Analogy: Read street map, plan journey Forwarding: • The process where a router relays a packet to a neighbouring router. Selection of the neighbouring router depends on the previous routing protocol calculations • Performed by one router on one packet • Analogy: Read a street sign and determine if we should take the next exit In practice, this distinction is often ignored • “If router A routes packet X, then … ” • Actually, it doesn‘t – it forwards X. Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 3

  4. Routing Information Base (RIB) ≠ Forwarding Information Base (RIB) Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 4

  5. Path Vector Protocols • For each destination, advertise entire path (= sequence of node identifiers) to neighbours • Cost calculation can be done by looking at path • Count number of hops on the path • Avoid paths containing some specific nodes • Cheapest or most reliable route can be chosen • Easy loop detection: Does my node ID already appear in the path? Notice: Distance Vector Protocols (choose cheapest path based on link “cost”) and Link State Protocols (choose based on knowledge of all links of the network) will not be covered here Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 5

  6. Hierarchical Routing Aggregate routers into regions called 
 “autonomous systems” (short: AS; plural: ASes) • One AS is usually a network under central control • i.e. one ISP / big company Routers in same AS run a routing protocol • = “int ra -AS” routing protocol (also called “intradomain”) ASes are connected: via gateway routers • Direct link to [gateway] router in another AS 
 = “int er -AS” routing protocol (also called “interdomain”) • Warning: Non-gateway routers need to know about inter-AS routing as well! Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 6

  7. Inter-AS Routing Suppose router in AS1 AS1 must: receives datagram destined learn which destinations 1. outside of AS1: are reachable through • Router should forward AS2, which through AS3 packet to gateway router propagate this 2. • … but to which one? reachability info to all routers in AS1 (i.e., not just the gateway routers) Job of inter-AS routing! 3c 3a 2c 3b 2a AS3 2b 1c AS2 1a 1b AS1 1d Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 7

  8. Example: Choosing among multiple ASes Now suppose AS1 learns from inter-AS protocol that subnet x is reachable from AS3 and from AS2. To configure forwarding table, router 1d must determine towards which gateway it should forward packets for destination x. • “Do we like AS2 or AS3 better?” • This decision is job of inter-AS routing protocol … … x 3c 3a 2c 3b 2a AS3 2b 1c AS2 1a 1b AS1 1d Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 8

  9. Internet inter-AS routing: BGP Border Gateway Protocol (BGP): De facto standard for inter-AS routing BGP provides each AS a means to: • Advertise the existence of an IP prefix to other AS: “This subnet is here” • Obtain subnet reachability information from neighbouring AS. • Determine “good” routes to subnets based on reachability information and policy. • Propagate reachability information to all AS-internal routers. Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 9

  10. BGP basics Pairs of routers (BGP peers) exchange routing info over semi-permanent TCP connections: BGP sessions When AS2 advertises an IP prefix to AS1: • AS2 promises it will forward IP packets towards that prefix • AS2 can aggregate prefixes in its advertisement, for example: • 10.11.12.0/24, 10.11.13.0/24, 10.11.14.0/23 into 10.11.12.0/22 • 2001:db8::/33, 2001:db8:8000::/33 into 2001:db8::/32 Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 10

  11. How does BGP work? BGP is a path vector protocol BGP messages exchanged using TCP BGP Message types: • OPEN: set up new BGP session, after TCP handshake • NOTIFICATION: an error occurred in previous message → tear down BGP session, close TCP connection • KEEPALIVE: “null” data to prevent TCP timeout/auto-close; also used to acknowledge OPEN message • UPDATE: • Announcement: inform peer about new / changed route to some target • Withdrawal: inform peer about non-reachability of a target Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 11

  12. BGP updates Update (Announcement) message consists of • Destinations (one or more IP prefix) • AS Path (=Path vector) • Next hop (=IP address of our router connecting to other AS) … but update messages also contain a lot of further attributes: • Local Preference: used to prefer one gateway over another • Only communicated intra-AS • Origin: route learned via { intra-AS | inter-AS | other } • Multi-Exit Discriminator, Community, … It means BGP is not a pure path vector protocol, as it adds possibilities to the path vector idea. Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 12

  13. eBGP and iBGP External BGP (eBGP): between routers in different ASes Internal BGP (iBGP): between routers in same AS Remember: In spite of intra-AS routing protocol, all routers need to know about external destinations (default iBGP route or full tables) • No different protocols - just slightly different configurations! 3c x eBGP session 3c iBGP session 2c 2c 3a 3a 3b 3b 2a 2a AS3 AS3 2b 2b 1c 1c AS2 AS2 1a 1a 1b 1b 1d 1d AS1 AS1 Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 13

  14. Distributing reachability info Using eBGP session between 3a and 1c, AS3 sends reachability info about prefix x to AS1. • 1c can then use iBGP to distribute new prefix info to all routers in AS1 • 1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session When router learns of new prefix x , it creates a new entry for the prefix in its forwarding table. x eBGP session 3c iBGP session 2c 3a 3b 2a AS3 2b 1c AS2 1a 1b 1d AS1 Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 14

  15. Path attributes & BGP routes Advertised prefix includes [many] BGP attributes • prefix + attributes = “route” Most important attributes: • AS-PATH: contains ASes through which prefix advertisement has passed: e.g., AS 67, AS 17, AS 7018 • NEXT-HOP: indicates specific internal-AS router to next-hop AS (may be multiple links from current AS to next-hop-AS) When gateway router receives route advertisement, it uses an import policy to accept/decline the route • More on this later Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 15

  16. AS Numbers How do we express a BGP path? ASes identified by AS Numbers (short: ASN) 
 Examples: • Leibnitz-Rechenzentrum = AS12816 • Deutsche Telekom = AS3320 • TUM-I8-AS = AS56357 • AT&T = AS7018, AS7132, AS2685, AS2686, AS2687 ASN assignment: similar to IP address space • ASN space administered IANA • Local registrars, e.g., RIPE NCC in Europe ➔ AS PATH specified by ASNs. 
 The AS PATH does not contain IP addresses! Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 16

  17. BGP update: Very simple example Type: Announcement • new route • existing route has changed Destination prefix: 198.51.100.0/24 Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

  18. BGP update: Very simple example Type: Announcement • new route • existing route has changed Destination prefix: 198.51.100.0/24 AS Path: 
 64496 3320 4711 815 64511 Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

  19. BGP update: Very simple example Type: Announcement • new route • existing route has changed Destination prefix: 198.51.100.0/24 Originator: AS Path: 
 The AS that “owns” 64496 3320 4711 815 64511 198.51.100.0/24 Edwin Cordeiro | How the Internet works? The Border Gateway Protocol (BGP) | iLab 2 Lecture SS 2017 17

Recommend


More recommend