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

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

BGP. Autonomous system (AS) BGP version 4

BGP. Autonomous system (AS) BGP version 4

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

BGP. Autonomous system (AS) BGP version 4

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

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

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

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

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

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

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

Inter-Domain Routing: BGP

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

Multiprotocol BGP (MBGP)

TELE 301 Network Management

Table of Contents 1 BGP Configuration 1-1

Table of Contents. BGP Configuration 1

Internet Interconnection Structure

internet technologies and standards

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

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

Routing Between Autonomous Systems (Example: BGP4) RFC 1771

LARGE SCALE IP ROUTING LECTURE BY SEBASTIAN GRAF

Configuration prerequisites 45 Configuring BGP community 45 Configuring a BGP route reflector 46 Configuring a BGP confederation 46 Configuring BGP

2011, Sushile Tejwani

Module 6 Implementing BGP

IBGP internals. BGP Advanced Topics. Agenda. BGP Continuity 1. L49 - BGP Advanced Topics. L49 - BGP Advanced Topics

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

Chapter 13 Configuring BGP4

Internet inter-as routing: BGP

Border Gateway Protocol - BGP

CS BGP v4. Fall 2014

Internet Routing : Fundamentals of Computer Networks Bill Nace

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

FAQ. Version: Copyright ImageStream Internet Solutions, Inc., All rights Reserved.

Operation Manual BGP. Table of Contents

Advanced Computer Networks

Master Course Computer Networks IN2097

ISP Border Definition. Alexander Azimov

BGP Attributes and Path Selection

Internetwork Expert s CCNP Bootcamp. Border Gateway Protocol (BGP) What Is BGP?

Configuring BGP. Cisco s BGP Implementation

Inter-domain Routing. Outline. Border Gateway Protocol

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

PART III. Implementing Inter-Network Relationships with BGP

Lecture 18: Border Gateway Protocol

Lecture 17: Border Gateway Protocol

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

Lecture 16: Border Gateway Protocol

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

Network Working Group. Category: Standards Track Cisco Systems. D. Katz Juniper Networks Y. Rekhter. Cisco Systems. February 1998

Interdomain routing CSCI 466: Networks Keith Vertanen Fall 2011

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

Ravi Chandra cisco Systems Cisco Systems Confidential

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

Configuring Advanced BGP

ibgp Multipath Load Sharing

BGP Protocol & Configuration. Scalable Infrastructure Workshop AfNOG2008

2015/07/23 23:32 1/8 More ibgp and Basic ebgp

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

BGP. BGP Overview. BGP Operation. BGP Neighbors

BGP Attributes and Policy Control

Internet Routing Protocols Lecture 01 & 02

BGP Attributes and Policy Control

Securing BGP. Geoff Huston November 2007

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

Routing Protocols --- Exterior Gateway Protocol

BGP Attributes and Policy Control

University of Belgrade - School of Electrical Engineering Department of Telecommunications

MPLS VPN Multipath Support for Inter-AS VPNs

BGP made easy. John van Oppen Spectrum Networks / AS11404

BGP-v4 Theory and Practice

Master Course Computer Networks IN2097

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

Hands-On BGP Routing. Course Description. Students Will Learn. Target Audience. Prerequisites. Page: 1 of 5. BGP Routing

InterAS Option B. Information About InterAS. InterAS and ASBR

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

Configuration BGP Services Avaya Ethernet Routing Switch 8300

Introduction to BGP ISP/IXP Workshops

ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE. External Routing BGP. Jean Yves Le Boudec 2015

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

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

Advanced Computer Networks

Connecting to a Service Provider Using External BGP

MPLS VPN Inter-AS with ASBRs Exchanging VPN-IPv4 Addresses

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

Routing part 2. Electrical and Information Technology

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

BGP-4 Border Gateway Protocol 4 (BGP-4) Primer

How the Internet works? The Border Gateway Protocol (BGP)

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

Configuring BGP on Cisco Routers Volume 1

LACNIC XIII. Using BGP for Traffic Engineering in an ISP

IETF RFCs Supported by Cisco NX-OS Unicast Features Release 6.x

Module 16 An Internet Exchange Point

MPLS VPN Carrier Supporting Carrier IPv4 BGP Label Distribution

Connecting to a Service Provider Using External BGP

Introduction to BGP. ISP Workshops. Last updated 30 October 2013

Interdomain Routing Reading: Sections K&R EE122: Intro to Communication Networks Fall 2007 (WF 4:00-5:30 in Cory 277)

Transcription:

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

Routing Between ISPs Internal routing protocols don't work here: too much information So: external routing protocols: Exterior Gateway Protocol (EGP) Another way of looking: not per router, but per network or organization, or rather "autonomous system" 2

Autonomous Systems 3

Autonomous Systems 3

Autonomous Systems 3

Autonomous Systems AS2503 AS192 AS29077 3

The Trees and the Forrest Tracing the route to www.isoc.nl (212.206.127.42) 1 fa3-0-4-asd8ro2.enertel.nl (195.7.144.85) [AS 12394] 4 msec 2 fa1-0-0-asd1ro6.enertel.nl (195.7.144.145) [AS 12394] 4 msec 3 po0-0-0-asd10ro1.enertel.nl (195.7.154.14) [AS 12394] 4 msec 4 adm-b2-pos2-1.telia.net (213.248.72.133) [AS 1299] 4 msec 5 pos3-2.br1.ams3.alter.net (146.188.64.113) [AS 702] 4 msec 6 so-0-2-0.tr1.ams2.alter.net (146.188.3.213) [AS 702] 4 msec 7 so-5-0-0.xr1.ams6.alter.net (146.188.8.77) [AS 702] 4 msec 8 so-0-0-0.cr1.hag1.alter.net (212.136.176.110) [AS 702] 4 msec 9 so-4-0-0.cr2.hag1.alter.net (212.136.176.146) [AS 702] 8 msec 10 so-0-0-0.cr2.rtm1.alter.net (212.136.176.121) [AS 702] 8 msec 11 412.atm10-0-0.gw4.rtm1.alter.net (212.136.177.146) [AS 702] 16 msec 12 www.isoc.nl (212.206.127.42) [AS 702] 4 msec 4

The Trees and the Forrest Tracing the route to www.isoc.nl (212.206.127.42) 1 fa3-0-4-asd8ro2.enertel.nl (195.7.144.85) [AS 12394] 4 msec 2 fa1-0-0-asd1ro6.enertel.nl (195.7.144.145) [AS 12394] 4 msec 3 po0-0-0-asd10ro1.enertel.nl (195.7.154.14) [AS 12394] 4 msec 4 adm-b2-pos2-1.telia.net (213.248.72.133) [AS 1299] 4 msec 5 pos3-2.br1.ams3.alter.net (146.188.64.113) [AS 702] 4 msec 6 so-0-2-0.tr1.ams2.alter.net (146.188.3.213) [AS 702] 4 msec 7 so-5-0-0.xr1.ams6.alter.net (146.188.8.77) [AS 702] 4 msec 8 so-0-0-0.cr1.hag1.alter.net (212.136.176.110) [AS 702] 4 msec 9 so-4-0-0.cr2.hag1.alter.net (212.136.176.146) [AS 702] 8 msec 10 so-0-0-0.cr2.rtm1.alter.net (212.136.176.121) [AS 702] 8 msec 11 412.atm10-0-0.gw4.rtm1.alter.net (212.136.177.146) [AS 702] 16 msec 12 www.isoc.nl (212.206.127.42) [AS 702] 4 msec 5

IDR History Gateway-to-Gateway protocol (GGP) Exterior Gateway Protocol (EGP) BGP 1, 2 and 3 IDRP and IDPR BGP4, RFC 1771, is used exclusively today 6

BGP's Functions Pass on which IP addresses are used where Enforce "routing policy" Avoid routing loops Avoid broken links Additionally, when possible: choose shortest path 7

Which Addresses Go Where No geographic relevance to IP address distribution Geographically close!= network close So: for each prefix we need to know where on the network it is used 8

Who Uses BGP? Most ISPs, in order to tell other ISPs which address blocks they use End users? Most don't, ISP handles routing for their addresses End users with more than one ISP (who are said to be multihomed ) do, since they can't depend on a single ISP to handle this 9

How BGP Works "Border routers" have connections with border routers from neighboring ASes (And with all BGP routers within the local AS) Communication over TCP port 179 Sessions are created manually 10

How BGP Works (2) As soon as the connection is established each router sends a (more or less) complete copy of the "global routing table" to the neighbor Path through neighboring router better? Then use it yourself When this is done, only updates when something changes 11

BGP Header 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + + + Marker + + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Length Type +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 12

OPEN Header 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+ Version +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ My Autonomous System +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Hold Time +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ BGP Identifier +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Opt Parm Len +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Optional Parameters +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 13

UPDATE Header +-----------------------------------------------------+ Unfeasible Routes Length (2 octets) +-----------------------------------------------------+ Withdrawn Routes (variable) +-----------------------------------------------------+ Total Path Attribute Length (2 octets) +-----------------------------------------------------+ Path Attributes (variable) +-----------------------------------------------------+ Network Layer Reachability Information (variable) +-----------------------------------------------------+ 14

NOTIFICATION Hdr 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Error code Error subcode Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 15

KEEPALIVE Header 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + + + Marker + + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Length --> 4 <-- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 16

BGP Path Attributes Information routers exchange consists of a range of IP addresses and "path attributes" Address information (prefix): Network Layer Reachability Information (NLRI) Some common path attributes are: AS path, next hop, origin, Multi Exit Discriminator (or metric) and communities 17

AS Path Mandatory First of all: detect and avoid routing loops Also important to enforce transit/peering filters And for filters that make sure customers don't accidently act as transit ISPs (Shortest path is preferred when comparing different routes for the same destination) 18

Loops AS1 192.0.2.0/24 AS2 AS4 AS3 19

Loops AS1 192.0.2.0/24 AS2 BGP table: 192.0.2.0 1 AS2 AS4 AS3 19

Loops AS1 192.0.2.0/24 AS2 BGP table: 192.0.2.0 1 AS2 AS3 BGP table: AS4 192.0.2.0 2 1 AS3 19

Loops AS1 192.0.2.0/24 AS2 BGP table: 192.0.2.0 1 AS2 AS3 BGP table: AS4 192.0.2.0 2 1 AS4 BGP table: AS3 192.0.2.0 2 1 3 2 1 19

Loops AS1 192.0.2.0/24 AS2 BGP table: 192.0.2.0 1 AS2 AS3 BGP table: AS4 192.0.2.0 2 1 AS4 BGP table: AS3 192.0.2.0 2 1 3 2 1 19

Loops AS1 192.0.2.0/24 AS2 BGP table: 192.0.2.0 1 4 3 2 1 AS2 AS3 BGP table: AS4 192.0.2.0 2 1 AS4 BGP table: AS3 192.0.2.0 2 1 3 2 1 19

Local Preference Only exchanged within the local AS, but mandatory Route with the highest local preference is used Only when local pref is equal other attributes such as AS path are evaluated 20

Multi Exit Discriminator Optional Similar to "metric" in internal routing protocols Originally meant to differentiate between multiple similar routes over the same neighboring AS, but useful elsewhere too Isn't communicated to external ASes unless specifically set 21

Communities 32 bit value used to convey user-defined information Not in the original BGP specification! (So obviously optional) Some "well-known" communities Most take the shape of AS:nn (such as 701:120) where meaning depends on source AS 22

Multiprotocol BGP Multiprotocol Extensions for BGP-4: RFC 2858 Extension to BGP4 that makes it possible to distribute routing information for additional "address families" Announce capabilites to peer in open message Put information for new protocol in two new path attributes 23

MP_REACH_NLRI +---------------------------------------------------------+ Address Family Identifier (2 octets) +---------------------------------------------------------+ Subsequent Address Family Identifier (1 octet) +---------------------------------------------------------+ Length of Next Hop Network Address (1 octet) +---------------------------------------------------------+ Network Address of Next Hop (variable) +---------------------------------------------------------+ Number of SNPAs (1 octet) +---------------------------------------------------------+ Length of first SNPA(1 octet) +---------------------------------------------------------+ First SNPA (variable) +---------------------------------------------------------+......... 24

MP_REACH_NLRI (2)......... +---------------------------------------------------------+ Length of second SNPA (1 octet) +---------------------------------------------------------+ Second SNPA (variable) +---------------------------------------------------------+... +---------------------------------------------------------+ Length of Last SNPA (1 octet) +---------------------------------------------------------+ Last SNPA (variable) +---------------------------------------------------------+ Network Layer Reachability Information (variable) +---------------------------------------------------------+ 25

MP_UNREACH_NLRI +---------------------------------------------------------+ Address Family Identifier (2 octets) +---------------------------------------------------------+ Subsequent Address Family Identifier (1 octet) +---------------------------------------------------------+ Withdrawn Routes (variable) +---------------------------------------------------------+ NLRI encoding: +---------------------------+ Length (1 octet) +---------------------------+ Prefix (variable) +---------------------------+ 26

IPv6 RFC 2545: Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing Almost completely identical to IPv4 Ok, the addresses are longer... Next hop: global, + optional link local Operation of BGP with IPv6 still quite different: free transit, lots of tunnels 27

BGP Security BGP is sensitive to attacks at the TCP, IP and link (usually ethernet) layers But in most cases not simple to exploit! MD5/ password offers protection, if hard to manage Future: Secure BGP (S-BGP) and/or secure origin BGP (sobgp) 28

BGP TCP MD5 Option RFC 2385: +---------+---------+-------------------+ Kind=19 Length=18 MD5 digest... +---------+---------+-------------------+ +---------------------------------------+ +---------------------------------------+ +-------------------+-------------------+ +-------------------+ The MD5 digest is always 16 bytes in length, and the option would appear in every segment of a connection. 29

S-BGP Secure BGP, created by BBN Proof-of-concept implementation available Map prefix to AS Include destination AS in BGP update Sign everything Carry information in path attributes 30

sobgp Secure Origin BGP, by people from Cisco Authenticate relationship prefix and AS Extensible Authentication data in new BGP message 31

S-BGP vs sobgp S-BGP much heavier: 500k signature checks on startup S-BGP needs private keys in routers sobgp could offload crypto to server 32

Problems All that crypto! Memory Where is a list of which prefix goes with which AS? Can be, but isn't done today without S-/ sobgp (with huge filters) Chicken/egg 33

Policy Only send routes when allowed: don't provide services unless paid for Additionally: configured preference And: check whether what the neighbor sends is correct 34

Balancing Traffic With more than one external connection BGP automatically balances the traffic But not always in the most desirable way Traffic engineering chapter from my book is online at the O'Reilly website, the URL is http://www.oreilly.com/catalog/bgp/ 35

BGP Path Selection 1. Prefer the path with the largest LOCAL_PREF 2. Prefer the path with the shortest AS_PATH 3. Prefer the path with the lowest multi-exit discriminator (MED) 4. Prefer external (ebgp) over internal (ibgp) paths 5. Prefer the path with the lowest IGP metric to the BGP next hop 6. Prefer the route coming from the BGP router with the lowest router ID 7. Prefer the path coming from the lowest neighbor address 36

Too Effective? When two ISPs both peer with mostly the same networks paths will tend to be the same length In this case even small changes radically change traffic patterns 37

ibgp Scaling ibgp Full mesh requirement (ouch!) Fix this using: Route reflectors: client talks to reflector, reflectors and non-clients in full mesh Confederations: split in sub-ases, full mesh inside, semi-ebgp to others 38

Full Mesh 39

Route Reflection 40

Confederations 41

Loopback Rtr1 b a Rtr2 Rtr3 y x Rtr4 42

Loopback Rtr1 b a Rtr2 Rtr3 y x Rtr4 42

Loopback Rtr1 b a Rtr2 Rtr3 y x Rtr4 42

Loopback Rtr1 b a Rtr2 Rtr3 y x Rtr4 42

Peering Private peering (direct link), or Exchange such as AMS-IX, LINX, DE-CIX Big layer 2 network, everyone connects a router Direct BGP sessions with others to exchange routing info 43

Policy for Transit Transit is provided to paying customers X provides transit to Y X routes packets from/to far away on behalf of Y So X announces to everyone that Y is reachable through them And X announces to Y that the whole world is reachable through them 44

Policy for Peering Exchange traffic without money changing hands (usually) X peers with Z X announces to Z that X's customers are reach-able through X, but NOT the rest of the world Z does the same, so all traffic has X or a customer of X as its source and Z or a customer of Z as its destination 45

Transit vs Peering AS 200 AS 300 AS 400 AS 100 X 46

Transit vs Peering AS 200 AS 300 AS 400 AS 100 Y X 46

Transit vs Peering AS 200 AS 300 AS 400 AS 100 Y X 46

Transit vs Peering AS 200 AS 300 AS 400 AS 100 Y X Z 46

Transit vs Peering AS 200 AS 300 AS 400 AS 100 Y X Z 46

Peering/Transit Example 47

Multilateral Peering Everyone peers with the route server Route server propagates all routes Next hop address isn't changed So traffic is exchanged directly See http://www.openpeering.nl/ 48

More Interconnects Must decide where to jump from network A to network B Early exit / hot potato: get rid of traffic as soon as possible (happens automatically) Late exit / cold potato: keep it in your network as long as possible (rare) 49

Early Exit 50

Early Exit (2) 51

Routing Table Pathology 214000 routes in global routing table Often poor aggregation So: filter on prefix length: < /24: forget it RIR block: never any problems In between: sometimes filtered 52

That's it! http://www.bgpexpert.com/ http://www.oreilly.com/catalog/bgp/ RFC 1771 (BGP version 4) RFC 4271 (revised BGP4 standard document) RFC 2385 (BGP TCP MD5 Option) 53