E6998-02: Internet Routing



Similar documents
APNIC elearning: BGP Attributes

BGP Basics. BGP Uses TCP 179 ibgp - BGP Peers in the same AS ebgp - BGP Peers in different AS's Private BGP ASN. BGP Router Processes

BGP Router Startup Message Flow

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

DD2491 p Inter-domain routing and BGP part I Olof Hagsand KTH/CSC

Border Gateway Protocol (BGP)

APNIC elearning: BGP Basics. Contact: erou03_v1.0

Border Gateway Protocol BGP4 (2)

Routing Protocol - BGP

BGP Attributes and Path Selection

Exterior Gateway Protocols (BGP)

Lecture 18: Border Gateway Protocol"

BGP Best Path Selection Algorithm

CS551 External v.s. Internal BGP

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

How To Understand Bg

basic BGP in Huawei CLI

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

Internet inter-as routing: BGP

DD2491 p Load balancing BGP. Johan Nicklasson KTHNOC/NADA

netkit lab bgp: prefix-filtering Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

BGP Terminology, Concepts, and Operation. Chapter , Cisco Systems, Inc. All rights reserved. Cisco Public

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Transitioning to BGP. ISP Workshops. Last updated 24 April 2013

Using the Border Gateway Protocol for Interdomain Routing

Understanding Route Aggregation in BGP

Examination. IP routning på Internet och andra sammansatta nät, DD2491 IP routing in the Internet and other complex networks, DD2491

--BGP 4 White Paper Ver BGP-4 in Vanguard Routers

Border Gateway Protocol (BGP-4)

6.263 Data Communication Networks

Chapter 49 Border Gateway Protocol version 4 (BGP-4)

Load balancing and traffic control in BGP

Internet inter-as routing: BGP

Multihomed BGP Configurations

Advanced BGP Policy. Advanced Topics

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

Chapter 6: Implementing a Border Gateway Protocol Solution for ISP Connectivity

How To Set Up Bgg On A Network With A Network On A Pb Or Pb On A Pc Or Ipa On A Bg On Pc Or Pv On A Ipa (Netb) On A Router On A 2

Understanding Route Redistribution & Filtering

MPLS VPN. Agenda. MP-BGP VPN Overview MPLS VPN Architecture MPLS VPN Basic VPNs MPLS VPN Complex VPNs MPLS VPN Configuration (Cisco) L86 - MPLS VPN

The ISP Column. An Introduction to BGP the Protocol

Load balancing and traffic control in BGP

B. Quoitin, S. Uhlig, C. Pelsser, L. Swinnen and O. Bonaventure

Module 12 Multihoming to the Same ISP

Active measurements: networks. Prof. Anja Feldmann, Ph.D. Dr. Nikolaos Chatzis Georgios Smaragdakis, Ph.D.

Understanding Virtual Router and Virtual Systems

Bell Aliant. Business Internet Border Gateway Protocol Policy and Features Guidelines

Configuring BGP. Cisco s BGP Implementation

BSCI Module 6 BGP. Configuring Basic BGP. BSCI Module 6

Interdomain Routing. Outline

Multihoming and Multi-path Routing. CS 7260 Nick Feamster January

Outline. EE 122: Interdomain Routing Protocol (BGP) BGP Routing. Internet is more complicated... Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Today s Agenda. Note: it takes years to really master BGP Many slides stolen from Prof. Zhi-Li Zhang at Minnesota and from Avi Freedman s slides

BGP4 Case Studies/Tutorial

Based on Computer Networking, 4 th Edition by Kurose and Ross

Simple Multihoming. ISP/IXP Workshops

HP Networking BGP and MPLS technology training

BGP Routing. Course Description. Students Will Learn. Target Audience. Hands-On

Introduction to TCP/IP

Route Discovery Protocols

Internet Routing Protocols Lecture 04 BGP Continued

JNCIA Juniper Networks Certified Internet Associate

DDoS Mitigation Techniques

BGP: Frequently Asked Questions

Administra0via. STP lab due Wednesday (in BE 301a!), 5/15 BGP quiz Thursday (remember required reading), 5/16

IP Routing. CS 552 Richard Martin (with slides from S. Savage and S. Agarwal)

How To Make A Network Plan Based On Bg, Qos, And Autonomous System (As)

Using OSPF in an MPLS VPN Environment

BGP Advanced Routing in SonicOS

Inter-domain Routing. Outline. Border Gateway Protocol

ECSE-6600: Internet Protocols Exam 2

Introduction to Routing

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1

Configuring BGP Services

- Border Gateway Protocol -

MPLS VPN Route Target Rewrite

CLASSLESS INTER DOMAIN ROUTING - CIDR

BGP route propagation. Internet AS relationships, Routing policy on Internet paths. Example of commercial relationship. Transit vs.

Supporting Document PPP

GregSowell.com. Mikrotik Routing

Configuring and Testing Border Gateway Protocol (BGP) on Basis of Cisco Hardware and Linux Gentoo with Quagga Package (Zebra)

BGP: Border Gateway Protocol

Border Gateway Protocol Best Practices

Simple Multihoming. ISP Workshops. Last updated 30 th March 2015

IP Routing Tecnologie e Protocolli per Internet II rev 1

IPv6 over MPLS VPN. Contents. Prerequisites. Document ID: Requirements

B. Quoitin, S. Uhlig, C. Pelsser, L. Swinnen and O. Bonaventure

JUNOS Secure BGP Template

Analyzing Capabilities of Commercial and Open-Source Routers to Implement Atomic BGP

Network Level Multihoming and BGP Challenges

> Border Gateway Protocol (BGP-4) Technical Configuration Guide. Ethernet Routing Switch. Engineering

BGP Multihoming Techniques

Understanding Large Internet Service Provider Backbone Networks

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Transcription:

E6998-02: Internet Routing Lecture 13 Border Gateway Protocol, Part II John Ioannidis AT&T Labs Research ji+ir@cs.columbia.edu Copyright 2002 by John Ioannidis. All Rights Reserved.

Announcements Lectures 1-13 are available. Have you been working on your project proposal? Still looking for a TA. Acknowledgement: some of the slides for this lecture have been inspired by Tim Griffin s BGP Tutorial. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 2

Transit vs. Non-transit Networks (review) AS 1 AS 2 AS 3 AS3 provides transit between AS1 and AS2. AS3 also provides transit between AS2 and AS4. AS 4 AS3 does not provide transit between AS1 and AS4. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 3

Transit vs. Non-transit Networks (review) AS 1 AS 2 AS 3 If AS1 and AS4 need to talk, they install their own link. AS 4 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 4

Transit vs. Non-transit Networks (review) AS 1 AS 2 AS 3 Or find another network to provide transit traffic. AS 9 (Or they can negotiate with AS3!). AS 4 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 5

Customer-Provider Relationship Provider 192.168.254.65 12.224.128.0/19 192.168.254.66 192.168.254.66 Customer default 192.168.254.65 Customer pays provider for access. Customer just has default route pointing to provider. Provider has static route pointing to customer. Customer does not need BGP. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 6

Customer-Provider Relationship Provider 12.224.128.0/19 192.168.254.66 12.224.128.0/19 192.168.254.98 default 192.168.254.65 Customer 12.224.128.0/19 default 192.168.254.97 This also works with multiple connections between Customer and Provider. IGP actually takes care of using closest link (how?). October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 7

Customer-Provider Hierarchy C Large ISP Regional Regional Local Local C C C C C Customer-Provider relationships can be hierarchical. Each network pays their upstream provider. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 8

Peering Not allowed! AS 1 AS 2 AS 3 C1 C2 C3 Peers provide transit between their respective customers. Peers DO NOT provide transit for other peers. They do if they have a customer relationship! How is this enforced? October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 9

Peering is About Shortcuts AS 1 AS 2 AS 3 AS 4 AS 5 C1 C2 C3 C4 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 10

Peer or Customer? Each provider s customers: Want to connect to customers of other providers. Provide services that others may want/need. Providers, in response: Should pay to provide upstream service to their customers. Should get paid to make their customers available. Peering agreements result from this contention. Peering implies no exchange of money. Your peers are your competitors! Peering agreements are often confidential. And subject to periodic negotiation. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 11

Peer or Customer? Cont d Similar-size providers peer. Tier-1, Tier-2, etc. providers. Customers who exchange a lot of traffic may also peer! A customer may have multiple upstream providers. Multihoming. Back-doors may be installed for special customers. Columbia is not Verizon s customer. But lots of Verizon DSL customers want to connect to Columbia. Verizon may install a private link to Columbia just for their DSL customers. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 12

Path Attributes in particular. Back to BGP Withdrawn Routes Len Withdrawn Routes Total Attributes Len Path Attributes Network Layer Reachability Information October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 13

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18... 255 Path Attributes ORIGIN RFC 1771 AS_PATH RFC 1771 NEXT_HOP RFC 1771 MULTI_EXIT_DISCRIMINATOR RFC 1771 LOCAL_PREF RFC 1771 ATOMIC_AGGREGATE RFC 1771 AGGREGATOR RFC 1771 COMMUNITY RFC 1997 ORIGINATOR_ID RFC 2796 CLUSTER_LIST RFC 2796 DPA deprecated ADVERTISER RFC 1863 RCID_PATH/CLUSTER_ID RFC 1863 MP_REACH_NLRI RFC 2283 MP_UNREACH_NLRI RFC 2283 EXTENDED COMMUNITIES draft-ietf-idr-bgp-ext-communities-05.txt NEW_AS_PATH draft-ietf-idr-as4bytes-05.txt NEW_AGGREGATOR draft-ietf-idr-as4bytes-05.txt... Reserved for development October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 14

ORIGIN Well-known, Mandatory. Type=1 Shows how a prefix was learned. Prefixes are injected into BGP Length=1 Value: IGP (=1): Prefix was learned from an IGP. EGP (=2): Prefix was learned from the EGP (BGP). INCOMPLETE (=3): Prefix was learned some other way. Static routes/directly connected networks. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 15

AS_PATH ASNs through which the announcement for these prefixes has passed. First ASN in the AS_PATH: Origin AS. Each AS appends its own ASN before passing on the update. 12.224.128.0/19 AS 1 1 3 1 2 AS 3 1 1 2 1 3 2 1 3 AS 2 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 16

AS_PATH Cont d Well-known, Mandatory. Type=2 Encoded as sequence of AS_PATH segments. Each segment is encoded as: Path Segment Type: AS_SET (1): unordered set of ASNs. AS_SEQUENCE (2): ordered set of ASNs. Path Segment Length: 1 octet, #of ASNs in segment. Path Segment Value: 2*PSL octets, list of ASNs. New ASNs are actually prepended in the packet. If leading segment is AS_SET, a new AS_SEQUENCE is prepended with the ASN as its sole member. If leading segment is AS_SEQUENCE, the ASN is just prepended to the sequence. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 17

AS_PATH Cont d Most AS_PATHs are encoded as a single AS_SEQUENCE. If a router needs to aggregate, it has to use AS_SET. Not common, since most routers aggregate prefixes from their own AS. AS 1 12.4.32.0/20 1 AS 3 12.4.32.0/20 1 3 12.4.48.0/20 2 3 AS 4 AS 2 12.4.48.0/20 2 12.4.32.0/19 1 2 3 4 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 18

AS 1 A B D C 135.207.0.0/16 NEXT_HOP 64.127.35.65 135.207.0.0/16 1 64.127.35.65 K AS 2 M 192.14.3.9 64.127.35.66 L 135.207.0.0/16 1 192.14.3.9 2 IP address of the node that would get packets closer to the advertised destination. Address of the BGP speaker sending the UPDATE. 192.14.3.10 X T AS 3 Y Z October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 19

NEXT_HOP cont d Well-known, Mandatory. Type=3 Encoded as the 4-octet address right after the Type Code. IP address of the node that would get packets closer to the advertised destination. Address of the BGP speaker sending the UPDATE. Exception: A (BGP speaker) sends X (BGP speaker) an UPDATE indicating B (10.3.2.66 interface) (not a BGP speaker) is the router for 12.4.48.0/20. A X B 10.3.2.66 12.4.48.0/20 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 20

MULTI_EXIT_DISCRIMINATOR (MED) AS 3 c 3 c 3 2 10 d 4 2 44 AS 2 AS 1 c 3 2 37 AS 4 d 4 d 4 2 8 AS2 includes MED to the updates it sends to AS1. AS3 and AS4 are advertised over both links, of course. AS1 can now make a better choice about sending packets to AS3 and AS4. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 21

MED Cont d One AS sets MED, but another uses it. MED only used in Customer/Provider relationships (why?). Peers usually ignore received MEDs (why?). Optional, Non-transitive (why?). Type=4 Length is always 4, encoding is unsigned integer. MED is usually the IGP metric for the advertised prefix. MED comparison only makes sense when received from the same AS. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 22

MED Cont d AS 3 c 3 c 3 2 10 23 d 4 1 d 4 1 2 AS 2 c 3 2 37 AS 1 c 3 2 1 d 4 1 8 d 4 AS 4 MED can be (ab)used to get one ISP to carry more traffic. Traffic from AS3 to AS4 goes to closest link. Traffic from AS4 to AS3 obeys MED. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 23

LOCAL_PREF a 1 AS 2 a 1 2 AS 1 AS 5 a 1 AS 3 a 1 3 How does AS5 decide how to send traffic to prefix a? MED doesn t help here. Only one link between AS pairs. AS5 may want to set its own policy about this. AS5 uses the LOCAL_PREF attribute on routes it receives. LOCAL_PREF is the first attribute used in route selection. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 24

LOCAL_PREF Cont d LOCAL_PREF is computed locally when route received from E-BGP, IGP, or statically assigned. Part of the interface configuration. Stored in the Adj-RIB-In. LOCAL_PREF is carried in I-BGP. Don t worry about this right now! Well-known, Discretionary. Type=5 Length is always 4. Encoding is unsigned integer. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 25

Route Aggregation AS2 and AS3 can be aggregated into 12.2.48.0/21. AS8 s space covers that of AS2, AS3, and AS5. What should AS8 advertise upstream? AS 2 12.2.48.0/22 AS 3 12.2.52.0/22 AS 8 12.2.0.0/18 AS 5 12.2.56.0/21 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 26

Route Aggregation, Cont d AS8 could advertise: Nothing, or some subset of the routes (subj. to policy). All four routes. Advertise just its own (less-specific) route. 12.2.0.0/18 (AS8) De-aggregate its own prefix and advertise more-specifics: 12.2.0.0/19 (AS8) 12.2.32.0/20 (AS8) 12.2.48.0/22 (AS2, AS3, AS8) 12.2.52.0/22 (AS3, AS8) 12.2.56.0/21 (AS5, AS8) Aggregation saves space but destroys information. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 27

ATOMIC_AGGREGATE & AGGREGATOR If a BGP speaker aggregates routes. AS_PATH information is lost. Following routers must be alerted. So they don t de-aggregate the advertised prefix. The ATOMIC_AGGREGATE attribute provides that feature. Well-known, Discretionary. Type=6. Zero length (just a flag). Must remain attached. AGGREGATOR attribute: Indicates which AS and router performed the aggregation. Optional, transitive. Type=7. Length is always 6. 2-byte ASN, 4-byte IP address of aggregator. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 28

12.2.52.0/22 3 12.2.48.0/22 2 3 AS 8 12.2.0.0/18 12.2.0.0/18 8 8, 12.2.254.89 AS 3 12.2.52.0/22 12.2.56.0/21 5 12.2.48.0/22 2 AS 2 12.2.48.0/22 AS 5 12.2.56.0/21 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 29

COMMUNITY Specified in RFC 1997. Encodes arbitrary properties. E.g., all of customer s routes get a specific COMMUNITY. Much of the policy is specified using communities. Optional, Transitive. Type=8 Four bytes: (e.g., 7018:100) 2 bytes ASN (by convention). 2 bytes administratively defined (no predefined meaning). We ll talk about this in the next lecture. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 30

Learning External Prefixes So far, BGP has been presented as a pure EGP. A protocol that runs between ASs. AS 1 AS 2 A B X Y D C Τ Ζ How do A, C and D learn about AS2 s routes? Ditto for Y, Z, T about AS1 s routes? I.E., how are prefixes learned by an ASBR distributed inside the AS? October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 31

Learning External Prefixes, cont d Inject into the IGP (using AS-External LSAs). Small networks can do this. Default route + a few external routes. Does not work for large ISPs. They carry a full routing table (100K-400K routes!). Would lose policy information. No way to carry attributes. IGPs don t scale well. Computational complexity. Memory requirements. Additional traffic. Fragmented LSAs. Clearly need a different way! October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 32

E-BGP and I-BGP The solution is called Internal-BGP (I-BGP). As opposed to External-BGP (E-BGP). E-BGP is used between ASs. I-BGP is used within an AS. Is used to distribute routes learned with E-BGP. E-BGP and I-BGP are the same protocol. Same messages, attributes, state machine, etc. But: different rules about route redistribution: Learned from I-BGP E-BGP Redistribute to I-BGP E-BGP no yes yes (yes) October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 33

I-BGP Route Redistribution How does D learn routes acquired by B? Since A can t redistribute routes learned over I-BGP? If D also had an external connection, how would it redistribute routes learned from other ASs? AS 9 A AS 1 B AS 2 D C October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 34

I-BGP Route Redistribution, cont d Remember: BGP is a routed protocol. Routes between routers already exist. Carried by the IGP. I-BGP sessions can be formed between non-adjacent routers. I-BGP sessions must form a full mesh: A AS 1 B D C October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 35

I-BGP, cont d Full mesh. Independent of actual links between (internal) routers. TCP src/dst of I-BGP session must be a loopback address. Routing to the router must be independent of interfaces going up/down. Full mesh is necessary to prevent loops. AS_PATH is used to detect loops in E-BGP. ASN appended to AS_PATH only when route is advertised to E-BGP peer. I-BGP is NOT an IGP. Nor can be used as one. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 36

1.0/16 B NEXT_HOP and the IGP 64.127.35.65 10.254.2.9 AS 2 K M 10.254.2.3 K s Forwarding Table 135.207.0.0/16 64.127.35.65 10.254.2.9/32 64.127.35.65/32 (If we are not using I-BGP). L L s Forwarding Table 135.207.0.0/16 10.254.2.3 10.254.2.9 10.254.2.9 dst:135.207.24.19 ASBR LSA AS External LSA AS External LSA October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 37

1.0/16 B NEXT_HOP and the IGP 64.127.35.65 10.254.2.9 AS 2 K M 10.254.2.3 K s Forwarding Table 135.207.0.0/16 64.127.35.65 (If we are not using I-BGP). L L s Forwarding Table 10.254.2.9/32 64.127.35.65/32 135.207.0.0/16 10.254.2.3 10.254.2.3 10.254.2.3 dst:135.207.24.19 Rewritten Rewritten October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 38

1.0/16 B NEXT_HOP and I-BGP 64.127.35.65 135.207.0.0/16 1 64.127.35.65 K AS 2 135.207.0.0/16 1 10.254.255.75 10.254.255.75 (lb) 10.254.255.77 (lb) 10.254.2.3 10.254.2.9 L s Forwarding Table 10.254.255.75/32 10.254.2.3 135.207.0.0/16 10.254.255.75 135.207.0.0/16 1 10.254.255.75 From IGP From I-BGP M L 12.3.5.8 NEXT_HOP is rewritten to the loopback address. October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 39

1.0/16 B NEXT_HOP and I-BGP 64.127.35.65 135.207.0.0/16 1 64.127.35.65 K AS 2 135.207.0.0/16 1 10.254.255.75 10.254.255.75 (lb) 10.254.255.77 (lb) 10.254.2.3 L s Forwarding Table 10.254.255.75/32 135.207.0.0/16 10.254.2.9 10.254.2.3 10.254.2.3 135.207.0.0/16 1 10.254.255.75 M L 12.3.5.8 135.207.0.0/16 1 2 NEXT_HOP is rewritten to the loopback address. 12.3.5.8 October 17th, 2002 Lecture 13 of E6998-02: Internet Routing 40