CS 268: Computer Networking

Similar documents
CS 268: Computer Networking. Next Lecture: Interdomain Routing

Next Lecture: Interdomain Routing : Computer Networking. Outline. Routing Hierarchies BGP

15-744: Computer Networking BGP

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

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

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

CS BGP v4. Fall 2014

Internet Routing Protocols Lecture 03 Inter-domain Routing

Internet Routing Protocols Lecture 01 & 02

TELE 301 Network Management

COMP/ELEC 429 Introduction to Computer Networks

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

CS4700/CS5700 Fundamentals of Computer Networks

Lecture 18: Border Gateway Protocol

Lecture 17: Border Gateway Protocol

Configuring BGP. Cisco s BGP Implementation

PART III. Implementing Inter-Network Relationships with BGP

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

Inter-domain Routing. Outline. Border Gateway Protocol

internet technologies and standards

Interdomain routing CSCI 466: Networks Keith Vertanen Fall 2011

Internet Routing : Fundamentals of Computer Networks Bill Nace

CS 457 Networking and the Internet. The Global Internet (Then) The Global Internet (And Now) 10/4/16. Fall 2016

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

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

Border Gateway Protocol

Professor Yashar Ganjali Department of Computer Science University of Toronto.

Lecture 16: Border Gateway Protocol

Inter-Domain Routing: BGP II

Inter-Domain Routing: BGP II

An overview of how packets are routed in the Internet

BGP. Autonomous system (AS) BGP version 4

Lecture 4: Intradomain Routing. CS 598: Advanced Internetworking Matthew Caesar February 1, 2011

Module 6 Implementing BGP

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

BGP. Autonomous system (AS) BGP version 4

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

BGP. Autonomous system (AS) BGP version 4

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

Understanding BGP Miscounfiguration

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

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

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

Inter-Domain Routing: BGP

CS Networks and Distributed Systems. Lecture 8: Inter Domain Routing

Internet inter-as routing: BGP

BGP Protocol & Configuration. Scalable Infrastructure Workshop AfNOG2008

Routing Between Autonomous Systems (Example: BGP4) RFC 1771

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

Ravi Chandra cisco Systems Cisco Systems Confidential

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

EE 122: Inter-domain routing Border Gateway Protocol (BGP)

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

How does a router know where to send a packet next?

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

Interdomain Routing. EE122 Fall 2011 Scott Shenker

Connecting to a Service Provider Using External BGP

BGP Commands. Network Protocols Command Reference, Part 1 P1R-355

6.829 BGP Recitation. Rob Beverly September 29, Addressing and Assignment

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

Internet Interconnection Structure

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

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

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)

Chapter 13 Configuring BGP4

BGP Commands. Network Protocols Command Reference, Part 1 P1R-355

Interdomain Routing. EE122 Fall 2012 Scott Shenker

IP Addressing & Interdomain Routing. Next Topic

Connecting to a Service Provider Using External BGP

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

BGP Attributes and Path Selection

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

CS118 Discussion Week 7. Taqi

CS321: Computer Networks Unicast Routing

Understanding BGP Misconfiguration

Dynamics of Hot-Potato Routing in IP Networks

CSE/EE 461 Lecture 11. Inter-domain Routing. This Lecture. Structure of the Internet. Focus How do we make routing scale?

ISP Border Definition. Alexander Azimov

This appendix contains supplementary Border Gateway Protocol (BGP) information and covers the following topics:

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

Inter-Domain Routing: BGP

Border Gateway Protocol - BGP

Routing. Jens A Andersson Communication Systems

Advanced Computer Networks

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

Configuring BGP on Cisco Routers Volume 1

Configuration - BGP Services Avaya Ethernet Routing Switch 5000 Series

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

Routing Unicast routing protocols

Implementing BGP. BGP Functional Overview. Border Gateway Protocol (BGP) is an Exterior Gateway Protocol (EGP) that allows you to create loop-free

BGP Routing and BGP Policy. BGP Routing. Agenda. BGP Routing Information Base. L47 - BGP Routing. L47 - BGP Routing

CS519: Computer Networks. Lecture 4, Part 5: Mar 1, 2004 Internet Routing:

A Measurement Study of BGP Misconfiguration

BGP Attributes and Policy Control

Routing Protocols --- Exterior Gateway Protocol

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

Border Gateway Protocol (BGP-4)

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

BGP Attributes and Policy Control

Transcription:

CS 268: Computer Networking L-3 BGP Outline BGP ASes, Policies BGP Attributes BGP Path Selection ibgp 2 1

Autonomous Systems (ASes) Autonomous Routing Domain Glued together by a common administration, policies etc Autonomous system is a specific case of an ARD ARD is a concept vs AS is an actual entity that participates in routing Has an unique 16 bit ASN assigned to it and typically participates in inter-domain routing Examples: MIT: 3, CMU: 9 AT&T: 7018, 6341, 5074, UUNET: 701, 702, 284, 12199, Sprint: 1239, 1240, 6211, 6242, How do ASes interconnect to provide global connectivity How does routing information get exchanged 3 Nontransit vs. Transit ASes ISP 1 ISP 2 Traffic NEVER NET A flows from ISP 1 through NET A to ISP 2 (At least not intentionally!) Nontransit AS might be a corporate or campus network. Could be a content provider IP traffic 4 2

Customers and Providers provider provider customer IP traffic customer Customer pays provider for access to the Internet 5 The Peering Relationship peer provider A peer customer B C Peers provide transit between their respective customers traffic allowed traffic NOT allowed Peers do not provide transit between peers Peers (often) do not exchange $$$ 6 3

Peering Wars Peer Reduces upstream transit costs Can increase end-to-end performance May be the only way to connect your customers to some part of the Internet ( Tier 1 ) Don t Peer You would rather have customers Peers are usually your competition Peering relationships may require periodic renegotiation Peering struggles are by far the most contentious issues in the ISP world! Peering agreements are often confidential. 7 Routing in the Internet Link state or distance vector? No universal metric policy decisions Problems with distance-vector: Bellman-Ford algorithm may not converge Problems with link state: Metric used by routers not the same loops LS database too large entire Internet May expose policies to other AS s 8 4

Solution: Distance Vector with Path Each routing update carries the entire path Loops are detected as follows: When AS gets route check if AS already in path If yes, reject route If no, add self and (possibly) advertise route further Advantage: Metrics are local - AS chooses path, protocol ensures no loops 9 BGP-4 BGP = Border Gateway Protocol Is a Policy-Based routing protocol Is the EGP of today s global Internet Relatively simple protocol, but configuration is complex and the entire world can see, and be impacted by, your mistakes. 1989 : BGP-1 [RFC 1105] Replacement for EGP (1984, RFC 904) 1990 : BGP-2 [RFC 1163] 1991 : BGP-3 [RFC 1267] 1995 : BGP-4 [RFC 1771] Support for Classless Interdomain Routing (CIDR) 10 5

BGP Operations (Simplified) Establish session on TCP port 179 AS1 Exchange all active routes BGP session AS2 Exchange incremental updates While connection is ALIVE exchange route UPDATE messages 11 Interconnecting BGP Peers BGP uses TCP to connect peers Advantages: Simplifies BGP No need for periodic refresh - routes are valid until withdrawn, or the connection is lost Incremental updates Disadvantages Congestion control on a routing protocol? Inherits TCP vulnerabilities! Poor interaction during high load 12 6

Four Types of BGP Messages Open : Establish a peering session. Keep Alive : Handshake at regular intervals. Notification : Shuts down a peering session. Update : Announcing new routes or withdrawing previously announced routes. announcement = prefix + attributes values 13 Policy with BGP BGP provides capability for enforcing various policies Policies are not part of BGP: they are provided to BGP as configuration information BGP enforces policies by choosing paths from multiple alternatives and controlling advertisement to other AS s Import policy What to do with routes learned from neighbors? Selecting best path Export policy What routes to announce to neighbors? Depends on relationship with neighbor 14 7

Examples of BGP Policies A multi-homed AS refuses to act as transit Limit path advertisement A multi-homed AS can become transit for some AS s Only advertise paths to some AS s Eg: A Tier-2 provider multi-homed to Tier-1 providers An AS can favor or disfavor certain AS s for traffic transit from itself 15 Export Policy An AS exports only best paths to its neighbors Guarantees that once the route is announced the AS is willing to transit traffic on that route To Customers Announce all routes learned from peers, providers and customers, and self-origin routes To Providers Announce routes learned from customers and selforigin routes To Peers Announce routes learned from customers and selforigin routes 16 8

Import Routes provider route peer route customer route ISP route From provider From provider From peer From peer From customer From customer 17 Export Routes provider route peer route customer route ISP route To provider From provider To peer To peer To customer To customer filters block 18 9

BGP UPDATE Message List of withdrawn routes Network layer reachability information List of reachable prefixes Path attributes Origin Path Metrics All prefixes advertised in message have same path attributes 19 Path Selection Criteria Information based on path attributes Attributes + external (policy) information Examples: Hop count Policy considerations Preference for AS Presence or absence of certain AS Path origin Link dynamics 20 10

Important BGP Attributes Local Preference AS-Path MED Next hop 21 LOCAL PREF Local (within an AS) mechanism to provide relative priority among BGP routers R1 AS 100 R5 AS 200 R2 AS 300 R3 AS 256 Local Pref = 500 Local Pref =800 I-BGP R4 22 11

LOCAL PREF Common Uses Handle routes advertised to multi-homed transit customers Should use direct connection (multihoming typically has a primary/backup arrangement) Peering vs. transit Prefer to use peering connection, why? In general, customer > peer > provider Use LOCAL PREF to ensure this 23 AS_PATH List of traversed AS s Useful for loop checking and for path-based route selection (length, regexp) AS 200 AS 100 170.10.0.0/16 180.10.0.0/16 AS 300 AS 500 180.10.0.0/16 300 200 100 170.10.0.0/16 300 200 24 12

Multi-Exit Discriminator (MED) Hint to external neighbors about the preferred path into an AS Non-transitive attribute Different AS choose different scales Used when two AS s connect to each other in more than one place 25 MED Typically used when two ASes peer at multiple locations Hint to R1 to use R3 over R4 link Cannot compare AS40 s values to AS30 s R1 AS 10 180.10.0.0 MED = 50 AS 40 R2 R3 180.10.0.0 MED = 120 180.10.0.0 MED = 200 R4 AS 30 26 13

MED MED is typically used in provider/subscriber scenarios It can lead to unfairness if used between ISP because it may force one ISP to carry more traffic: SF ISP1 ISP2 ISP1 ignores MED from ISP2 ISP2 obeys MED from ISP1 ISP2 ends up carrying traffic most of the way NY 27 Route Selection Process Highest Local Preference Enforce relationships Shortest ASPATH Lowest MED i-bgp < e-bgp Lowest IGP cost to BGP egress Lowest router ID Traffic engineering Throw up hands and break ties 28 14

Internal vs. External BGP BGP can be used by R3 and R4 to learn routes How do R1 and R2 learn routes? Option 1: Inject routes in IGP Only works for small routing tables Option 2: Use I-BGP R1 AS1 R3 E-BGP R4 AS2 R2 29 Internal BGP (I-BGP) Same messages as E-BGP Different rules about re-advertising prefixes: Prefix learned from E-BGP can be advertised to I-BGP neighbor and vice-versa, but Prefix learned from one I-BGP neighbor cannot be advertised to another I-BGP neighbor Reason: no AS PATH within the same AS and thus danger of looping. 30 15

Internal BGP (I-BGP) R3 can tell R1 and R2 prefixes from R4 R3 can tell R4 prefixes from R1 and R2 R3 cannot tell R2 prefixes from R1 R2 can only find these prefixes through a direct connection to R1 Result: I-BGP routers must be fully connected (via TCP)! contrast with E-BGP sessions that map to physical links AS1 R1 R2 R3 E-BGP R4 AS2 I-BGP 31 Route Reflector ebgp update ibgp updates RR RR RR Mesh does not scale Each RR passes only best routes, no longer N 2 scaling problem 32 16

BGP Misconfigurations Types of BGP misconfigurations Origin misconfiguration Export misconfiguration Types of Impact of BGP misconfigurations How to identify misconfigs? Results How often? Impact level? Cause? How to avoid them? Conclusion BGP Misconfiguration Configurations defined by local operational practices, not global standards No universally accepted list of Dos & Don'ts Rule of thumb: http://www.riverstonenet.com/support/bgp/design/ index.htm Misconfiguration: behavior unintended by the operator Includes both slips (inadvertent errors) and mistakes (erroneous plan) Focus on two broad classes of globally visible faults Origin misconfiguration Export misconfiguration 17

Other Types of Misconfigurations Filter out routes that should be announced Appears to users as failures Two links connect to a neighboring AS, misconfigure to use the less-preferred link Not easily identifiable from global BGP changes Need information internal to ASes OK to ignore no significant impact on connectivity 18

Impacts of Misconfigurations Routing Load: unnecessary updates pressure already-loaded BGP speaking routers Connectivity Disruption: partially or globally Policy violation: carry unwanted traffic P = 192.0.2.0/24 200 P, {200} P, {100 200,400} 400 600 P, {100 200} 100 P, {100 200} P, {100 200} 500 Methodology Analyze globally visible updates from 23 BGP speakers for 21 days [RouteViews] Rich view of backbone routing Ability to observe even very short-lived events Identifying misconfigurations: Internet Routing Registries (IRRs) are inaccurate or outdated 30% inconsistent origins for Single Origin AS and 80% for Multiple Origin ASes Instead use signature of misconfigurations in the update stream Assume policy changes have similar signature but larger timescale, but failures and misconfigs are short 19

Lifetime of New Routes Misconfigurations Policy changes New route: new prefix or existing prefix with new origin Methodology (2) Identify short-lived (< 24hrs) changes as potential misconfigurations Origin misconfiguration Short-lived new route new prefix or new origin for a prefix Export misconfiguration Short-lived AS-path that violates policy Lower bounds on number of misconfigurations Email verification through operators Was it a misconfig? Connectivity disrupted? What caused it? Use email responses to discover underlying causes Test connectivity using public traceroute servers Coarse independent verification of email responses 20

Origin Misconfiguration Analysis Origin misconfiguration: accidentally inject routes for prefixes into global BGP tables Self deaggregation Old route New route a.b.0.0/16 X Y Z a.b.c.0/24 X Y Z Related Origin a.b.0.0/16 X Y Z a.b.0.0/16 X Y a.b.0.0/16 X Y Z O a.b.c.0/24 X Y a.b.c.0/24 X Y Z O Foreign Origin a.b.0.0/16 X Y Z a.b.0.0/16 X Y O a.b.c.0/24 X Y O (200 long-lived new routes/day) (vs. 1000 failures/day) 21

How long do short-lived origin changes last? Misconfigurations last shorter than non-misconfigurations, connectivity problems are detected/fixed sooner Export Misconfiguration Analysis Typical Export Policy An AS exports only best paths to its neighbors Guarantees that once the route is announced the AS is willing to transit traffic on that route To Customers Announce all routes learned from peers, providers and customers, and self-origin routes To Providers Announce routes learned from customers and selforigin routes To Peers Announce routes learned from customers and selforigin routes 22

Infer AS Relationship from AS-Paths To detect export misconfigurations, need to know AS relationships Gao s Algorithm Valley-free property At most one peer-to-peer edge for an AS-paths Number links as (+1, 0, -1) for customer-to-provider, peer-topeer and provider-to-customer In any path should only see sequence of +1, followed by at most one 0, followed by sequence of -1 Providers are more likely to have higher degrees Every AS-path with short-lived subpaths that violate valley-free property or contain multiple peer edges as potential misconfigs Misconfiguration Export misconfiguration: export route to a peer in violation of policy Export Provider AS Provider Provider AS Peer Peer AS Provider Peer AS Peer Policy Violation Route exported to provider was imported from a provider Route exported to peer was imported from a provider Route exported to provider was imported from a peer Route exported to peer was imported from a peer 23

Most export misconfiguration incidents involve providers Some misconfigs cause extreme short-term routing load 24

Causes: Origin Misconfiguration Initialization bug (22% / 5% ) Leaking routes temporarily during boot-up or maintenance Reliance on upstream filtering (14% / 46% ) Announcing routes assuming upstream would filter them Old configuration (1% / 4% ) Reactivation of stale configuration due to unsaved work Faulty redistribution (32% prefixes/ 5% incidents) Errors in propagating IGP routes into BGP Community (1% prefixes/ 3% incidents) Wrong community attribute attached to prefixes Hijacks (1% / 6%, 100% connectivity problem) Announcing somebody else s address space What is Redistribution? Interior router BGP router AS-100 RIP BGP BGP R1 AS-300 IGRP BGP R2 AS-200 OSPF How can R1 advertise routes learned from AS100 to R2? One solution: redistribution from IGP 25

Faulty redistribution can be dangerous! Redistribute igrp routes into bgp redistribute igrp 100 route-map igrp2bgp Important to get this right! AS7007 incident (April, 1997): Hijack large part of the Internet Causes: Export Misconfigurations Some causes common with those for origin misconfigurations, e.g., old configuration, initialization bug,, etc. Causes with more significant impact Prefix based config (8% / 22% ) Violate export policy upon failures Bad ACL or route map (34% / 4% ) Incorrect access control lists (ACL) or route maps 26

Solution: A exports routes for C only when AS-path is C Avoiding BGP Misconfigurations User interfaces Basic principles need to be followed High-Level languages and configuration checker High-level configuration tools built for/into the routers Consistent databases and updated registries Protocol Extensions Secure BGP (SBGP) Inform customer of the misconfig, even though it s silently filtered 27

Possible Solution: Automated Configuration Technical Questions (TQ) What is your AS number? What export policy do you want? Do you want a dynamic default? What are your address blocks? DB Do you need to receive communities? interface <name> description <cust name> ip address <addr> <mask> ip access-group <acl> in! router bgp 17 neighbor <ip> remote-as <asn> neighbor <ip> route-map CUST-FACE in neighbor <ip> route-map <outmap> out neighbor <ip> distribute-list <racl> in neighbor <ip> soft-reconfiguration-inbound [neighbor <ip> send-community]! query R U L E S template interface Serial10/1/0/12:0 description CBB Customer ip address 12.7.35.1 255.255.255.252 ip access-group 666 in! router bgp 17 neighbor 12.7.35.2 remote-as 18585 neighbor 12.7.35.2 route-map CUST-FACE in neighbor 12.7.35.2 route-map FULL-ROUTES out neighbor 12.7.35.2 distribute-list 13 in neighbor 12.7.35.2 soft-reconfiguration-inbound! configlet router How to transition an existing network? How to get value as you move from here to there? Approach: detailed analysis of configuration data Conclusions Misconfigurations are commonplace (up to 1% of BGP table) Connectivity is surprisingly robust to most misconfigurations but routing load can be significant Causes of misconfigurations are diverse Much needs to be done to improve the operational reliability of the Internet 28

Next Lecture: Congestion Control Congestion Control Assigned Reading [Chiu & Jain] Analysis of Increase and Decrease Algorithms for Congestion Avoidance in Computer Networks [Jacobson and Karels] Congestion Avoidance and Control 57 29