Inter-Domain Routing: BGP

Similar documents
BGP Configuration. BGP Overview. Introduction to BGP. Formats of BGP Messages. Header

Inter-AS routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

Computer Networking Introduction

Inter-AS routing and BGP. Network Layer 4-1

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

Chapter 4: outline. Network Layer 4-1

CSCI Topics: Internet Programming Fall 2008

BGP. Autonomous system (AS) BGP version 4

BGP. BGP Overview. Formats of BGP Messages. I. Header

BGP. Autonomous system (AS) BGP version 4

Routing in the Internet

Routing Between Autonomous Systems (Example: BGP4) RFC 1771

BGP. Autonomous system (AS) BGP version 4

Routing Protocols --- Exterior Gateway Protocol

Chapter 4: Network Layer

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

Internet Interconnection Structure

Chapter IV: Network Layer

Internet Routing : Fundamentals of Computer Networks Bill Nace

Table of Contents. BGP Configuration 1

2011, Sushile Tejwani

CSc 450/550 Computer Networks Internet Routing

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Table of Contents 1 BGP Configuration 1-1

PART III. Implementing Inter-Network Relationships with BGP

CS 640: Introduction to Computer Networks. Intra-domain routing. Inter-domain Routing: Hierarchy. Aditya Akella

Routing Unicast routing protocols

BGP. Border Gateway Protocol (an introduction) Karst Koymans. Informatics Institute University of Amsterdam. (version 17.3, 2017/12/04 13:20:08)

DATA COMMUNICATOIN NETWORKING

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

Routing. Jens A Andersson Communication Systems

Routing on the Internet. Routing on the Internet. Hierarchical Routing. Computer Networks. Lecture 17: Inter-domain Routing and BGP

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

CSC 4900 Computer Networks: Routing Protocols

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

BGP. Border Gateway Protocol A short introduction. Karst Koymans. Informatics Institute University of Amsterdam. (version 18.3, 2018/12/03 13:53:22)

Internet inter-as routing: BGP

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

Border Gateway Protocol (an introduction) Karst Koymans. Monday, March 10, 2014

Department of Computer and IT Engineering University of Kurdistan. Computer Networks II Border Gateway protocol (BGP) By: Dr. Alireza Abdollahpouri

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

CSCI-1680 Network Layer: Inter-domain Routing Rodrigo Fonseca

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Border Gateway Protocol - BGP

Architectures and Protocols for Integrated Networks. Intra-domain and Inter-domain Routing Protocols

Lecture 16: Interdomain Routing. CSE 123: Computer Networks Stefan Savage

Border Gateway Protocol (an introduction) Karst Koymans. Tuesday, March 8, 2016

CS 204: BGP. Jiasi Chen Lectures: MWF 12:10-1pm Humanities and Social Sciences

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

CSCI-1680 Network Layer: Inter-domain Routing Rodrigo Fonseca

Chapter 4: Network Layer, partb

Graph abstraction: costs. Graph abstraction 10/26/2018. Interplay between routing and forwarding

CSCI-1680 Network Layer: Inter-domain Routing Rodrigo Fonseca

Network layer: Overview. Network layer functions Routing IP Forwarding

Important Lessons From Last Lecture Computer Networking. Outline. Routing Review. Routing hierarchy. Internet structure. External BGP (E-BGP)

Ravi Chandra cisco Systems Cisco Systems Confidential

IP Addressing & Interdomain Routing. Next Topic

Unit 3: Dynamic Routing

Inter-Autonomous-System Routing: Border Gateway Protocol

Routing part 2. Electrical and Information Technology

Introduction. Keith Barker, CCIE #6783. YouTube - Keith6783.

Internet Routing Protocols Lecture 01 & 02

Configuring BGP. Cisco s BGP Implementation

Inter-domain Routing. Outline. Border Gateway Protocol

Master Course Computer Networks IN2097

Inter-Autonomous-System Routing: Border Gateway Protocol

Lecture 19: Network Layer Routing in the Internet

CS4450. Computer Networks: Architecture and Protocols. Lecture 15 BGP. Spring 2018 Rachit Agarwal

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

Routing Protocols. Autonomous System (AS)

Interdomain Routing Reading: Sections P&D 4.3.{3,4}

Vendor: Alcatel-Lucent. Exam Code: 4A Exam Name: Alcatel-Lucent Border Gateway Protocol. Version: Demo

internet technologies and standards

CS BGP v4. Fall 2014

CSCD 433/533 Network Programming Fall Lecture 14 Global Address Space Autonomous Systems, BGP Protocol Routing

CNT Computer and Network Security: BGP Security

Configuring BGP community 43 Configuring a BGP route reflector 44 Configuring a BGP confederation 44 Configuring BGP GR 45 Enabling Guard route

APNIC elearning: BGP Basics. 30 September :00 PM AEST Brisbane (UTC+10) Revision: 2.0

BGP. Daniel Zappala. CS 460 Computer Networking Brigham Young University

BGP Attributes and Path Selection

Protecting an EBGP peer when memory usage reaches level 2 threshold 66 Configuring a large-scale BGP network 67 Configuring BGP community 67

LARGE SCALE IP ROUTING LECTURE BY SEBASTIAN GRAF

CS321: Computer Networks Unicast Routing

Internet Routing Seminar. September/2000

TELE 301 Network Management

Copyright 1998, Cisco Systems, Inc. All rights reserved. Printed in USA. 0945_05F9_c1.scr 1. RST _05_2001_c1

! Distance vector routing! Link state routing.! Path vector routing! BGP: Border Gateway Protocol! Route aggregation

Outline Computer Networking. Inter and Intra-Domain Routing. Internet s Area Hierarchy Routing hierarchy. Internet structure

Routing on the Internet! Hierarchical Routing! The NSFNet 1989! Aggregate routers into regions of autonomous systems (AS)!

Interdomain routing CSCI 466: Networks Keith Vertanen Fall 2011

Professor Yashar Ganjali Department of Computer Science University of Toronto.

Interplay Between Routing, Forwarding

BGP. Inter-domain routing with the Border Gateway Protocol. Iljitsch van Beijnum Amsterdam, 13 & 16 March 2007

BGP Attributes (C) Herbert Haas 2005/03/11 1

Routing(2) Inter-domain Routing

Internet Protocols Fall Lectures Inter-domain routing, mobility support, multicast routing Andreas Terzis

Network Layer: Routing

Routing(2) Inter-domain Routing

Multiprotocol BGP (MBGP)

Transcription:

Inter-Domain Routing: BGP Richard T. B. Ma School of Computing National University of Singapore CS 3103: Compute Networks and Protocols

Inter-Domain Routing Internet is a network of networks Hierarchy of Autonomous Systems large, tier-1 provider with a nationwide backbone and international connections medium-sized regional provider with smaller backbone small network run by a single company or university Interaction between Autonomous Systems

Challenges for Inter-domain Routing Scale millions of routers and 200,000+ prefixes 35,000+ self-operated networks and 40K+ ASes Privacy ASes don t want to expose internal topologies or their business relationships with neighbors Policy no Internet-wide notion of a link cost metric need control over where you send traffic and who can send traffic through you

Limitation of Link-State Routing Topology information is flooded high bandwidth and storage overhead nodes divulge sensitive information Entire path computed locally per node high processing overhead in a large network Minimize some notion of total distance works only if policy is shared and uniform Typically used only inside an AS OSPF for instance

Cons and pros of DV approach advantages hide details of the network topology only next hop is determined per node disadvantages minimizes some notion of total distance, which is difficult in an inter-domain setting slow convergence due to the counting-toinfinity problem solution: extend the notion of a DV

Path-Vector Routing Extension of distance-vector routing support flexible routing policies avoid count-to-infinity problem Key ides: advertise the entire path DV: send distance metric per destination d PV: send the entire path for each destination d 3 d: path (2,1) d: path (1) 2 1 data traffic data traffic d

Faster Loop Detection Node can easily detect a loop check if itself is in the path Node can simply discard paths with loops e.g., node 1 simply discards the advertisement 3 d: path (2,1) d: path (1) 2 1 d: path (3,2,1)

Border Gateway Protocol (BGP) BGP: the de facto inter-domain routing protocol prefix-based path-vector protocol BGP4 described in RFC 4271 (104 pages) RFC 4276 gives an implementation report on BGP RFC 4277 describes operational experiences using BGP enable policy-based routing based on AS Paths allows subnet to advertise its existence to rest of Internet: I am here allows ASes to determine good routes to other networks based on reachability info and policy

BGP operations AS 1 BGP session BGP session: two BGP routers (or peers or speakers) exchange messages: advertise paths to different destination network prefixes AS 2 Establish session on TCP port 179 Exchange all active routes Exchange incremental updates While connection ALIVE, exchange route UPDATE messages

BGP/IGP model used in ISPs ebgp ebgp ibgp IGP ibgp IGP ibgp IGP AS 2 AS 1 AS 3 ebgp: exchange reachability info from neighbor ASes; implement routing policy ibgp: propagate reachability info across backbone; carry ISP s own customer prefixes

ebgp external BGP peering (ebgp) between BGP speakers in different ASes should be directly connected never run an IGP between ebgp peers when AS3 advertises a prefix to AS1: AS3 promises it will forward datagrams towards that prefix AS3 can aggregate prefixes in its advertisement other networks 3b 3c AS3 3a 1a AS1 BGP message 1c 1d 1b 2a 2c AS2 2b other networks

ibgp internal BGP peering (ibgp) other networks peers within an AS; not required to be directly connected IGP takes care of inter-bgp speaker connectivity ibgp peers must be fully meshed (via loopback interface) They originate connected networks Pass on prefixes learned from outside the AS Do not pass on prefixes learned form other ibgp speakers 1c can use ibgp do distribute prefix info to all routers in AS1; 1b can re-advertise info to AS2 over ebgp 3b 3c AS3 3a 1a AS1 1c 1d ebgp session ibgp session 1b 2a 2c AS2 2b other networks

BGP messages OPEN: opens TCP connection to peer and authenticates sender UPDATE: advertises new paths (or withdraws old paths) KEEPALIVE: keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION: reports errors in previous mssages; also used to close connection

BGP Message Header Format Marker: 16-byte field for compatibility Length: 2-byte unsigned integer indicates the total length of the message Type: 1-byte unsigned integer indicates the type code of the message 1 OPEN Marker (16) Length (2) Type (1) 2 UPDATE (most important and complicated) 3 NOTIFICATION 4 - KEEPALIVE

OPEN Message Format Marker (16) Length (2) Type (1) Version (1) My Autonomous System (2) Hold Time (2) Opt Par Len (1) BGP Identifier (4) Optional Parameters (variable) Version: 1 byte indicates the protocol version My AS: 2 bytes indicate the ASN of the sender Hold Time: 2 bytes indicate the number of seconds the sender propose for the Hold Timer BGP ID: 4 bytes indicate the BGP identifier Use of option can be referred to RFC 3392

NOTIFICATION Message Format Marker (16) Length (2) Type (1) Error code (1) Error subcode (1) Data (variable) Error codes: 1: message header error 2: OPEN message error 3: UPDATE message error 4: Hold time expired The length of data can be inferred by Message length = 21 + data length How to respond to NOTIFICATION messages? More BGP error handling details in the RFC

KEEPALIVE Message Format Marker (16) Length (2) = 19 Type (1) = 4 KEEPALIVE is just the 19-byte message header Used to determine if peers are reachable Maximum inter-keepalive (typically 60s) = 1/3 of Hold Time (typically 180s) Must not sent more frequently than 1 per second

UPDATE Message Format Marker (16) Length (2) Type (1) Withdrawn Routes Length (2) Path Attribute Length (2) Withdrawn Routes (variable) Path Attributes (variable) Network Layer Reachability Information (variable) Withdrawn Routes: IP prefixes for the routes withdrawn Network Layer Reachability Information (NLRI): IP prefixes that could be reached from the advertised route NLRI length can be inferred as: UPDATE Message Len 23 - Withdrawn Routes Len - Path Attribute Len IP address prefixes are coded more compactly (refer to RFC)

UPDATE Message Format Marker (16) Length (2) Type (1) Withdrawn Routes Length (2) Path Attribute Length (2) Withdrawn Routes (variable) Path Attributes (variable) Network Layer Reachability Information (variable) Can only advertise one feasible route for the NLRI Can withdraw multiple routes in an UPDATE message Should not have the NLRI prefix in Withdrawn Routes otherwise, should treat as if Withdrawn Routes do not contain the address prefix

Withdrawn Routes No expiration timer for the routes like RIP Invalidate routes are actively withdrawn by the original advertiser Or use UPDATE message to replace the existing routes All routes from a peer become invalid when the peer goes down

BGP Path Attributes Fall into four separate categories: 1. Well-known mandatory 2. Well-known discretionary 3. Optional transitive 4. Optional non-transitive Some implementation rules: Must recognize all well-known attributes Mandatory attributes must be included in UPDATE messages that contain NLRI Once a BGP peer updates well-known attributes, it must pass them to its peers

Path Attribute Format Each path attribute is a triple Type (2) Length (variable) Value (variable) Optional bit: whether the attribute is optional (1) or well-known (0) Transitive bit: whether the attribute should be forwarded along the AS path; well-known attribute must have 1 for transitive bit Partial bit: optional transitive attribute is unrecognized (1) set value 0 for attributes in other categories Extended Length bit: O T P E 0 0 0 0 Attribute type code (1) 1-byte (0) or 2-byte (1) for the length field

Common Path Attributes Attribute Name Type code Category ORIGIN 1 Well-Known Mandatory AS_PATH 2 Well-Known Mandatory NEXT_HOP 3 Well-Known Mandatory LOCAL_PREF 5 Well-Known Discretionary ATOMIC_AGGREGATE 6 Well-Known Discretionary AGGREGATOR 7 Optional Transitive COMMUNITY 8 Optional Transitive MULTI_EXIT_DISC (MED) 4 Optional Non-Transitive

Well-Known mandatory attributes ORIGIN: conveys the origin of the prefix historical attribute used in transition from EGP to BGP AS-PATH: contains ASes through which NLRI has passed expressed as a sequence, e.g., AS 79, AS 11, or a set NEXT-HOP: indicates IP address of the router in the next-hop AS. (may be multiple links from current AS to next-hop-as)

How does entry get in forwarding table? Assume prefix is in another AS. routing algorithms Ties together hierarchical routing with BGP and OSPF. Provides nice overview of BGP! entry local forwarding table prefix output port 138.16.64/22 124.12/16 212/8.. Dest IP 3 2 4 3 2 1 High-level overview 1. Router becomes aware of IP prefix 2. Router determines the output port for the IP prefix 3. Router enters the prefix-port pair in forwarding table

Becomes aware of destination prefix other networks 3b 3c AS3 3a 1a AS1 BGP message 1c 1d 1b 2a AS2 2c 2b other networks BGP message contains routes route = prefix + attributes: AS-PATH, NEXT-HOP, Example: route: Prefix: 138.16.64/22; AS-PATH: AS3 AS131; NEXT-HOP: 201.44.13.125

Router may receive multiple routes other networks 3b 3c AS3 3a 1a AS1 BGP message 1c 1d 1b 2a AS2 2c 2b other networks Router may receive multiple routes for same destination prefix The router has to select one route

Select best BGP route to prefix Router selects route based on shortest AS-PATH Example: select AS2 AS17 to 138.16.64/22 AS3 AS131 AS201 to 138.16.64/22 What if there is a tie? will come back to that!

Find best intra-route to BGP route Use selected route s NEXT-HOP attribute Route s NEXT-HOP attribute is the IP address of the router interface that begins the AS PATH. Example: AS-PATH: AS2 AS17; NEXT-HOP: 111.99.86.55 Router uses OSPF to find shortest path from 1c to 111.99.86.55 3c other networks 3b 3a AS3 1a AS1 1c 1d 111.99.86.55 1b 2a AS2 2c 2b other networks

Router identifies port for route Identifies port along the OSPF shortest path Adds prefix-port entry to its forwarding table: (138.16.64/22, port 4) other networks 3c 3a 3b AS3 1a AS1 1 1c 4 2 3 1d router port 1b 2a AS2 2c 2b other networks

Hot Potato Routing if there exists two or more best inter-routes then choose route with closest NEXT-HOP Use OSPF to determine which gateway is closest Q: From 1c, chose AS3 AS131 or AS2 AS17? A: route AS3 AS131 since it is closer 3c other networks 3b 3a AS3 1a AS1 1c 1d 1b 2a AS2 2c 2b other networks

How does entry get in forwarding table? Summary 1. Router becomes aware of prefix via BGP route advertisements from other routers 2. Determine router output port for prefix Use BGP route selection to find best inter-as route Use OSPF to find best intra-as route leading to best inter-as route Router identifies router port for that best route 3. Enter prefix-port entry in forwarding table