SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
Lecture 7: Inter-Domain Routing 
Credits: Based on lecture by Rob Sherwood
What 
 Last time: Intra-domain routing protocols (IGP) 
- Last time 
- OSPF link state 
- RIP distance vector 
 Today: Inter-domain routing protocols (EGP) 
- Border Gateway Protocol v4 
- Path vector routing protocol: list possible paths 
- No other EGP’s today. . .why?
Why Inter vs. Intra? 
 Why not just use OSPF everywhere? 
- E.g., hierarchies of OSPF areas 
- Hint: scaling is not the only limitation 
 BGP is a policy control and information hiding 
protocol 
- intra == trusted, inter == untrusted
Why Inter vs. Intra? 
 Why not just use OSPF everywhere? 
- E.g., hierarchies of OSPF areas 
- Hint: scaling is not the only limitation 
 BGP is a policy control and information hiding 
protocol 
- intra == trusted, inter == untrusted
Why Study BGP? 
 Critical protocol: makes the Internet run 
- Only widely deployed EGP 
 Active area of problems! 
- Efficiency 
- Cogent vs. Level3: Internet partition 
- Pakistan accidentally took down YouTube 
- Spammers use prefix hijacking
Outline 
 History (very briefly!) 
 Function 
 Properties 
 Policies 
 Example 
 Problems and proposed solutions
History 
 Why border gateway protocol? 
 Historical distinction: 
- 1989: BGPv1, “directional” routing [RFC 1105]: 
- 1990: BGPv2, bunch of incompatible changes [RFC 1163] 
- 1991: BGPv3, resolves connection “collisions” [RFC 1267] 
- 1994: BGPv4 (proposed) [RFC 1654] 
- 1995: BGPv4 (actual), w. CIDR support [RFC 1771] 
- Latest revision of BGPv4 spec [RFC 4271] 
 Additional information: 
- Application of BGP in Internet [RFC 1772] 
- Experience w. BGPv4 [RFC 1773] 
- Protocol analysis [RFC 1774]
High Level 
 Recall notion of Autonomous System (AS) 
- Organizations that participate in EGP 
- Assigned AS Number, originally 16 bits, now 32 [RFC 4893] 
 Abstract each AS down to a single node 
 Exchange prefix-reachability with all neighbors 
 “I can reach prefix 171.67.0.0/14 through ASes 
15444 3549 174 46749 32” 
 Select a single path by routing policy 
 Critical: learn many paths, propagate only one! 
- Add your ASN to advertised paths
BGP State 
 BGP speaker conceptually maintains 3 sets of state 
 Adj-RIBs-In 
- Stands for “Adjacent Routing Information Base, Incoming” 
- Has unprocessed routes learned from other BGP speakers 
- Contains both reachable and unreachable routes (in case 
later become reachable and can be added to Loc-RIB) 
 Loc-RIB (Local RIB) 
- Contains routes from Adj-RIBs-In selected by policy 
- First hop of each route must be reachable by IGP or static 
route 
 Adj-RIBs-Out (Adj-RIBs, Outgoing) 
- Subset of Loc-RIB to be advertised to peer speakers
BGP Example 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
Only 1 Router 
Per AS (for now)
BGP Example 
1.2.0.0/16: AS 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
1.2.0.0/16: AS 1 
Only 1 Router 
Per AS (for now)
BGP Example 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
1.2.0.0/16: AS 2 1 
AS 3 
1.2.0.0/16: AS 5 1 
Only 1 Router 
Per AS (for now)
BGP Example 
AS 1 
AS 2 
AS 4 
1.2.0.0/16 AS: 3 2 1 
AS 5 
AS 3 
AS: 4 5 1 
Only 1 Router 
Per AS (for now)
BGP Example 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
Only 1 Router 
Per AS (for now)
BGP Implications 
 Explicit AS path == loop free! 
- Except under churn, IGP/EGP mismatch, etc. 
 Not all ASes know all paths 
 AS abstraction loss of efficiency 
 Shortest AS path not guaranteed 
 Scaling 
- 32K ASes 
- 300K+ prefixes
BGP protocol details 
 Border routers must connect over TCP port 179 
- Bidirectionally exchange messages over long-lived 
connection 
 Base protocol has four message types 
- OPEN – Initialize connection. Identifies BGP peers and must 
be first message sent in each direction 
- UPDATE – Announce routing changes (most important msg) 
- NOTIFICATION – Announce error when closing connection 
- KEEPALIVE – Make sure peer is alive 
 Extensions can define more message types 
- E.g., ROUTE-REFRESH [RFC 2918]
Anatomy of an UPDATE 
 Withdrawn routes: List of withdrawn IP prefixes 
 Network Layer Reachability Information (NLRI) 
- List of IP prefixes to which path attributes apply 
 Path attributes – various info. about NLRI 
- ORIGIN, AS PATH, NEXT HOP, MULTI EXIT DISC, 
LOCAL PREF, ATOMIC AGGREGATE, AGGREGATOR, . . . 
- Each attribute has 1-byte type, and 1-byte flags, plus length 
- Can introduce new types of path attribute—e.g., used 
AS4 PATH for 32-bit AS numbers
Transport Details 
 OPEN msg negotiates capabilities [RFC 3392] 
- E.g., to advertise support for AS4 PATH 
 A full information exchange after connection is 
expensive! 
- Keep connection open indefinitely to exchange periodic 
updates 
 Session resets are expensive (both in CPU and to 
the entire network!) and should be avoided.
Advertisements 
 NLRI: 171.67.0.0/14 
 AS Path: ASN 15444 3549 174 46749 32 
 Next Hop IP: just like in RIPv2 
 Knobs for traffic engineering 
- Metric, Weight, LocalPath, MED, Communities 
- Lots of voodoo
Getting Your Hands Dirty 
 RouteViews Project: http://www.routeviews.org/ 
- telnet route-views.linx.routeviews.org 
- show ip bgp 171.67.0.0/14 longer-prefixes 
 Note that all paths are learned internally 
 Not a production device
2-minute stretch
Route Selection 1/2 
 Next-Hop reachable? 
 Prefer highest weight 
- Computed using some AS-specific local policy 
 Prefer highest local-pref 
 Prefer locally originated routes 
 Prefer routes with shortest AS path length
Route Selection 2/2 
 Prefer path with lowest origin type 
 Prefer route with lowest MED value 
- But note can only compare MEDs from same AS 
 Prefer eBGP over iBGP 
 Prefer routes with lowest cost to egress point 
- Hot-potato routing 
 Tie-breaking rules 
- E.g., lowest router-id, oldest route
External vs. Internal BGP 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
Only 1 Router 
Per AS (for now)
External vs. Internal BGP 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
iBGP keeps 
AS consistent 
Multiple 
Peering Points!
Customer/Provider AS relationships 
 Customers pay for connectivity 
- E.g., Stanford pays Cogent 
 Customer is a stub, provider is a transit 
- Amount and cost structure can vary wildly 
 Many customers are multi-homed 
- Stanford also connects to Calren/Internet2 
 Typical policy: prefer routes from customers
Peer relationships 
 ASes agree to exchange traffic for free 
- Penalties/renegotiate if imbalance 
 Tier 1 ISPs have no default route: all peer with 
each other 
 You are Tier i + 1 if you have a default route to a 
Tier i
BGP Relationship Drama 
 Cogent vs. Level3 
 Level3 and Cogent were peers 
 In 2005, Level3 decided to start charging Cogent 
 Cogent said No 
 Internet partition: Cogent’s customers couldn’t get 
to Level3’s customers and vice versa 
- Other ISPs were affected as well 
 They came to a new, undisclosed agreement 3 
weeks later
BGP Problems and Solutions 
 Security 
 Convergence 
 Scaling (route reflectors) 
 Traffic engineering – AS preprending 
 Multiple stable solutions – BGP ”Wedgies”
BGP Security 
 Anyone can source a prefix announcement 
- BGP is not very secure 
 YouTube’s prefix is 208.65.152.0/22 
 Pakistani government ordered YouTube blocked 
- PieNET advertised 208.65.152.0/23 and 208.65.152.128/23 
- Longest prefix match caused world-wide outage 
 Spammers steal unused IP space to hide [Feamster] 
- Advertise very short prefixes—why? 
 Secure BGP is currently in the works
BGP Convergence 
 Given a change, how long until the network 
re-stabilizes? 
- . . . depends on the change: sometimes never. 
- Open research problem: “tweak and pray” 
- Distributed setting is challenging 
 Easier: Does there exist a stable configuration? 
- Distributed: open research problem 
- Centralized: NP-Complete problem! [Griffin’99]
Scaling iBGP: Route Reflectors 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
iBGP keeps 
AS consistent 
Multiple 
Peering Points!
Scaling iBGP: Route Reflectors 
iBGP Mesh == O(n^2) mess 
AS 1
Scaling iBGP: Route Reflectors 
Solution: Route Reflectors 
O(n*k) 
AS 1
Traffic Engineering 
 “Route-map” programs to set weights 
 Route filtering: input and output 
 More specific routes: longest prefix 
 AS prepending: ”32 32 32 32” 
 Imprecise science
BGP Wedgies [RFC 4264] 
 A Common config: 
- Prefer customer routes over non-customer 
- Then prefer shortest AS path
BGP Wedgies [RFC 4264] 
Backup Route 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
1.2.0.0/16: AS 1
BGP Wedgies [RFC 4264] 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
AS 5 1 
Backup Route
BGP Wedgies [RFC 4264] 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
AS 4 5 1 
Backup Route
BGP Wedgies [RFC 4264] 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
AS 3 4 5 1 
Backup Route
BGP Wedgies [RFC 4264] 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 
AS 2 3 4 5 1 
Backup Route
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 2 1 1 1 1
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 3 2 1 1 1 1
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 4 3 2 1 1 1 1
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
Stable
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
Link Restored
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 1
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 5 1
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
AS 4 5 1
BGP Wedgies [RFC 4264] 
Backup Route AS 3 
1.2.0.0/16: AS 1 1 1 1 
AS 1 
AS 2 
AS 4 
AS 5 
1.2.0.0/16 
Wedged! 
AS 3 prefers 
routes from 
AS 2

Weitere ähnliche Inhalte

Was ist angesagt?

An Overview of Border Gateway Protocol (BGP)
An Overview of Border Gateway Protocol (BGP)An Overview of Border Gateway Protocol (BGP)
An Overview of Border Gateway Protocol (BGP)Jasim Alam
 
Border Gateway Protocol
Border Gateway ProtocolBorder Gateway Protocol
Border Gateway ProtocolKashif Latif
 
Using BGP To Manage Dual Internet Connections
Using BGP To Manage Dual Internet ConnectionsUsing BGP To Manage Dual Internet Connections
Using BGP To Manage Dual Internet ConnectionsRowell Dionicio
 
Troubleshooting BGP
Troubleshooting BGPTroubleshooting BGP
Troubleshooting BGPAPNIC
 
Border Gateway Protocol (BGP)
Border Gateway Protocol (BGP)Border Gateway Protocol (BGP)
Border Gateway Protocol (BGP)Nutan Singh
 
Enhanced Interior Gateway Routing Protocol (EIGRP) || NETWORK PROTOCOL
Enhanced Interior Gateway Routing Protocol (EIGRP) || NETWORK PROTOCOLEnhanced Interior Gateway Routing Protocol (EIGRP) || NETWORK PROTOCOL
Enhanced Interior Gateway Routing Protocol (EIGRP) || NETWORK PROTOCOLNutan Singh
 
BGP (Border Gateway Protocol)
BGP (Border Gateway Protocol)BGP (Border Gateway Protocol)
BGP (Border Gateway Protocol)NetProtocol Xpert
 
Equinix IP Address Renumbering in Singapore and Sydney
Equinix IP Address Renumbering in Singapore and SydneyEquinix IP Address Renumbering in Singapore and Sydney
Equinix IP Address Renumbering in Singapore and SydneyAPNIC
 
Open Shortest Path First (OSPF) || 2020 || Ser-2
Open Shortest Path First (OSPF) || 2020 || Ser-2Open Shortest Path First (OSPF) || 2020 || Ser-2
Open Shortest Path First (OSPF) || 2020 || Ser-2Nutan Singh
 

Was ist angesagt? (20)

Bgp (1)
Bgp (1)Bgp (1)
Bgp (1)
 
Juniper Bgp
Juniper BgpJuniper Bgp
Juniper Bgp
 
An Overview of Border Gateway Protocol (BGP)
An Overview of Border Gateway Protocol (BGP)An Overview of Border Gateway Protocol (BGP)
An Overview of Border Gateway Protocol (BGP)
 
Bgp
BgpBgp
Bgp
 
Border Gateway Protocol
Border Gateway ProtocolBorder Gateway Protocol
Border Gateway Protocol
 
BGP Overview
BGP OverviewBGP Overview
BGP Overview
 
Part1
Part1Part1
Part1
 
Using BGP To Manage Dual Internet Connections
Using BGP To Manage Dual Internet ConnectionsUsing BGP To Manage Dual Internet Connections
Using BGP To Manage Dual Internet Connections
 
Troubleshooting BGP
Troubleshooting BGPTroubleshooting BGP
Troubleshooting BGP
 
B G P Part2
B G P  Part2B G P  Part2
B G P Part2
 
Border Gateway Protocol (BGP)
Border Gateway Protocol (BGP)Border Gateway Protocol (BGP)
Border Gateway Protocol (BGP)
 
Bgp protocol
Bgp protocolBgp protocol
Bgp protocol
 
BGP protocol presentation
BGP protocol  presentationBGP protocol  presentation
BGP protocol presentation
 
Enhanced Interior Gateway Routing Protocol (EIGRP) || NETWORK PROTOCOL
Enhanced Interior Gateway Routing Protocol (EIGRP) || NETWORK PROTOCOLEnhanced Interior Gateway Routing Protocol (EIGRP) || NETWORK PROTOCOL
Enhanced Interior Gateway Routing Protocol (EIGRP) || NETWORK PROTOCOL
 
BGP (Border Gateway Protocol)
BGP (Border Gateway Protocol)BGP (Border Gateway Protocol)
BGP (Border Gateway Protocol)
 
Bgp training
Bgp trainingBgp training
Bgp training
 
How BGP Works
How BGP WorksHow BGP Works
How BGP Works
 
Equinix IP Address Renumbering in Singapore and Sydney
Equinix IP Address Renumbering in Singapore and SydneyEquinix IP Address Renumbering in Singapore and Sydney
Equinix IP Address Renumbering in Singapore and Sydney
 
BGP Advanced topics
BGP Advanced topicsBGP Advanced topics
BGP Advanced topics
 
Open Shortest Path First (OSPF) || 2020 || Ser-2
Open Shortest Path First (OSPF) || 2020 || Ser-2Open Shortest Path First (OSPF) || 2020 || Ser-2
Open Shortest Path First (OSPF) || 2020 || Ser-2
 

Ähnlich wie Computer network (14)

PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPROIDEA
 
Dynamische Routingprotokolle Aufzucht und Pflege - BGP
Dynamische Routingprotokolle Aufzucht und Pflege - BGPDynamische Routingprotokolle Aufzucht und Pflege - BGP
Dynamische Routingprotokolle Aufzucht und Pflege - BGPMaximilan Wilhelm
 
Interautonomous System PLS VPN Advanced Concepts
Interautonomous System PLS VPN Advanced ConceptsInterautonomous System PLS VPN Advanced Concepts
Interautonomous System PLS VPN Advanced ConceptsBrozaa
 
ISP Border Definition
ISP Border DefinitionISP Border Definition
ISP Border DefinitionQrator Labs
 
Cloud Traffic Engineer – Google Espresso Project by Shaowen Ma
Cloud Traffic Engineer – Google Espresso Project  by Shaowen MaCloud Traffic Engineer – Google Espresso Project  by Shaowen Ma
Cloud Traffic Engineer – Google Espresso Project by Shaowen MaMyNOG
 
Building Scalable Cisco Internetworks (Bsci)
Building Scalable Cisco Internetworks (Bsci)Building Scalable Cisco Internetworks (Bsci)
Building Scalable Cisco Internetworks (Bsci)CCNAResources
 
16 bgp
16 bgp16 bgp
16 bgpTCT
 
Demystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the HostDemystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the HostCumulus Networks
 

Ähnlich wie Computer network (14) (20)

Part8-ibgp.pptx
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptx
 
Bgp
BgpBgp
Bgp
 
Bgp
BgpBgp
Bgp
 
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
 
Lec7
Lec7Lec7
Lec7
 
Bigbgp
BigbgpBigbgp
Bigbgp
 
Dynamische Routingprotokolle Aufzucht und Pflege - BGP
Dynamische Routingprotokolle Aufzucht und Pflege - BGPDynamische Routingprotokolle Aufzucht und Pflege - BGP
Dynamische Routingprotokolle Aufzucht und Pflege - BGP
 
Interautonomous System PLS VPN Advanced Concepts
Interautonomous System PLS VPN Advanced ConceptsInterautonomous System PLS VPN Advanced Concepts
Interautonomous System PLS VPN Advanced Concepts
 
ISP Border Definition
ISP Border DefinitionISP Border Definition
ISP Border Definition
 
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
 
Route Leak Prevension with BGP Community
Route Leak Prevension with BGP CommunityRoute Leak Prevension with BGP Community
Route Leak Prevension with BGP Community
 
Cloud Traffic Engineer – Google Espresso Project by Shaowen Ma
Cloud Traffic Engineer – Google Espresso Project  by Shaowen MaCloud Traffic Engineer – Google Espresso Project  by Shaowen Ma
Cloud Traffic Engineer – Google Espresso Project by Shaowen Ma
 
Building Scalable Cisco Internetworks (Bsci)
Building Scalable Cisco Internetworks (Bsci)Building Scalable Cisco Internetworks (Bsci)
Building Scalable Cisco Internetworks (Bsci)
 
Class 7
Class 7Class 7
Class 7
 
11 bgp-ethernet
11 bgp-ethernet11 bgp-ethernet
11 bgp-ethernet
 
16 bgp
16 bgp16 bgp
16 bgp
 
Mpls Services
Mpls ServicesMpls Services
Mpls Services
 
Demystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the HostDemystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the Host
 
Arun project-Final
Arun project-FinalArun project-Final
Arun project-Final
 
Bigbgp (1)
Bigbgp (1)Bigbgp (1)
Bigbgp (1)
 

Mehr von NYversity

Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1NYversity
 
3016 all-2007-dist
3016 all-2007-dist3016 all-2007-dist
3016 all-2007-distNYversity
 
Programming methodology lecture28
Programming methodology lecture28Programming methodology lecture28
Programming methodology lecture28NYversity
 
Programming methodology lecture27
Programming methodology lecture27Programming methodology lecture27
Programming methodology lecture27NYversity
 
Programming methodology lecture26
Programming methodology lecture26Programming methodology lecture26
Programming methodology lecture26NYversity
 
Programming methodology lecture25
Programming methodology lecture25Programming methodology lecture25
Programming methodology lecture25NYversity
 
Programming methodology lecture24
Programming methodology lecture24Programming methodology lecture24
Programming methodology lecture24NYversity
 
Programming methodology lecture23
Programming methodology lecture23Programming methodology lecture23
Programming methodology lecture23NYversity
 
Programming methodology lecture22
Programming methodology lecture22Programming methodology lecture22
Programming methodology lecture22NYversity
 
Programming methodology lecture20
Programming methodology lecture20Programming methodology lecture20
Programming methodology lecture20NYversity
 
Programming methodology lecture19
Programming methodology lecture19Programming methodology lecture19
Programming methodology lecture19NYversity
 
Programming methodology lecture18
Programming methodology lecture18Programming methodology lecture18
Programming methodology lecture18NYversity
 
Programming methodology lecture17
Programming methodology lecture17Programming methodology lecture17
Programming methodology lecture17NYversity
 
Programming methodology lecture16
Programming methodology lecture16Programming methodology lecture16
Programming methodology lecture16NYversity
 
Programming methodology lecture15
Programming methodology lecture15Programming methodology lecture15
Programming methodology lecture15NYversity
 
Programming methodology lecture14
Programming methodology lecture14Programming methodology lecture14
Programming methodology lecture14NYversity
 
Programming methodology lecture13
Programming methodology lecture13Programming methodology lecture13
Programming methodology lecture13NYversity
 
Programming methodology lecture12
Programming methodology lecture12Programming methodology lecture12
Programming methodology lecture12NYversity
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11NYversity
 
Programming methodology lecture10
Programming methodology lecture10Programming methodology lecture10
Programming methodology lecture10NYversity
 

Mehr von NYversity (20)

Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1
 
3016 all-2007-dist
3016 all-2007-dist3016 all-2007-dist
3016 all-2007-dist
 
Programming methodology lecture28
Programming methodology lecture28Programming methodology lecture28
Programming methodology lecture28
 
Programming methodology lecture27
Programming methodology lecture27Programming methodology lecture27
Programming methodology lecture27
 
Programming methodology lecture26
Programming methodology lecture26Programming methodology lecture26
Programming methodology lecture26
 
Programming methodology lecture25
Programming methodology lecture25Programming methodology lecture25
Programming methodology lecture25
 
Programming methodology lecture24
Programming methodology lecture24Programming methodology lecture24
Programming methodology lecture24
 
Programming methodology lecture23
Programming methodology lecture23Programming methodology lecture23
Programming methodology lecture23
 
Programming methodology lecture22
Programming methodology lecture22Programming methodology lecture22
Programming methodology lecture22
 
Programming methodology lecture20
Programming methodology lecture20Programming methodology lecture20
Programming methodology lecture20
 
Programming methodology lecture19
Programming methodology lecture19Programming methodology lecture19
Programming methodology lecture19
 
Programming methodology lecture18
Programming methodology lecture18Programming methodology lecture18
Programming methodology lecture18
 
Programming methodology lecture17
Programming methodology lecture17Programming methodology lecture17
Programming methodology lecture17
 
Programming methodology lecture16
Programming methodology lecture16Programming methodology lecture16
Programming methodology lecture16
 
Programming methodology lecture15
Programming methodology lecture15Programming methodology lecture15
Programming methodology lecture15
 
Programming methodology lecture14
Programming methodology lecture14Programming methodology lecture14
Programming methodology lecture14
 
Programming methodology lecture13
Programming methodology lecture13Programming methodology lecture13
Programming methodology lecture13
 
Programming methodology lecture12
Programming methodology lecture12Programming methodology lecture12
Programming methodology lecture12
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11
 
Programming methodology lecture10
Programming methodology lecture10Programming methodology lecture10
Programming methodology lecture10
 

Kürzlich hochgeladen

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 

Kürzlich hochgeladen (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Computer network (14)

  • 1. Lecture 7: Inter-Domain Routing Credits: Based on lecture by Rob Sherwood
  • 2. What Last time: Intra-domain routing protocols (IGP) - Last time - OSPF link state - RIP distance vector Today: Inter-domain routing protocols (EGP) - Border Gateway Protocol v4 - Path vector routing protocol: list possible paths - No other EGP’s today. . .why?
  • 3. Why Inter vs. Intra? Why not just use OSPF everywhere? - E.g., hierarchies of OSPF areas - Hint: scaling is not the only limitation BGP is a policy control and information hiding protocol - intra == trusted, inter == untrusted
  • 4. Why Inter vs. Intra? Why not just use OSPF everywhere? - E.g., hierarchies of OSPF areas - Hint: scaling is not the only limitation BGP is a policy control and information hiding protocol - intra == trusted, inter == untrusted
  • 5. Why Study BGP? Critical protocol: makes the Internet run - Only widely deployed EGP Active area of problems! - Efficiency - Cogent vs. Level3: Internet partition - Pakistan accidentally took down YouTube - Spammers use prefix hijacking
  • 6. Outline History (very briefly!) Function Properties Policies Example Problems and proposed solutions
  • 7. History Why border gateway protocol? Historical distinction: - 1989: BGPv1, “directional” routing [RFC 1105]: - 1990: BGPv2, bunch of incompatible changes [RFC 1163] - 1991: BGPv3, resolves connection “collisions” [RFC 1267] - 1994: BGPv4 (proposed) [RFC 1654] - 1995: BGPv4 (actual), w. CIDR support [RFC 1771] - Latest revision of BGPv4 spec [RFC 4271] Additional information: - Application of BGP in Internet [RFC 1772] - Experience w. BGPv4 [RFC 1773] - Protocol analysis [RFC 1774]
  • 8. High Level Recall notion of Autonomous System (AS) - Organizations that participate in EGP - Assigned AS Number, originally 16 bits, now 32 [RFC 4893] Abstract each AS down to a single node Exchange prefix-reachability with all neighbors “I can reach prefix 171.67.0.0/14 through ASes 15444 3549 174 46749 32” Select a single path by routing policy Critical: learn many paths, propagate only one! - Add your ASN to advertised paths
  • 9. BGP State BGP speaker conceptually maintains 3 sets of state Adj-RIBs-In - Stands for “Adjacent Routing Information Base, Incoming” - Has unprocessed routes learned from other BGP speakers - Contains both reachable and unreachable routes (in case later become reachable and can be added to Loc-RIB) Loc-RIB (Local RIB) - Contains routes from Adj-RIBs-In selected by policy - First hop of each route must be reachable by IGP or static route Adj-RIBs-Out (Adj-RIBs, Outgoing) - Subset of Loc-RIB to be advertised to peer speakers
  • 10. BGP Example AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 Only 1 Router Per AS (for now)
  • 11. BGP Example 1.2.0.0/16: AS 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 1.2.0.0/16: AS 1 Only 1 Router Per AS (for now)
  • 12. BGP Example AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 1.2.0.0/16: AS 2 1 AS 3 1.2.0.0/16: AS 5 1 Only 1 Router Per AS (for now)
  • 13. BGP Example AS 1 AS 2 AS 4 1.2.0.0/16 AS: 3 2 1 AS 5 AS 3 AS: 4 5 1 Only 1 Router Per AS (for now)
  • 14. BGP Example AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 Only 1 Router Per AS (for now)
  • 15. BGP Implications Explicit AS path == loop free! - Except under churn, IGP/EGP mismatch, etc. Not all ASes know all paths AS abstraction loss of efficiency Shortest AS path not guaranteed Scaling - 32K ASes - 300K+ prefixes
  • 16. BGP protocol details Border routers must connect over TCP port 179 - Bidirectionally exchange messages over long-lived connection Base protocol has four message types - OPEN – Initialize connection. Identifies BGP peers and must be first message sent in each direction - UPDATE – Announce routing changes (most important msg) - NOTIFICATION – Announce error when closing connection - KEEPALIVE – Make sure peer is alive Extensions can define more message types - E.g., ROUTE-REFRESH [RFC 2918]
  • 17. Anatomy of an UPDATE Withdrawn routes: List of withdrawn IP prefixes Network Layer Reachability Information (NLRI) - List of IP prefixes to which path attributes apply Path attributes – various info. about NLRI - ORIGIN, AS PATH, NEXT HOP, MULTI EXIT DISC, LOCAL PREF, ATOMIC AGGREGATE, AGGREGATOR, . . . - Each attribute has 1-byte type, and 1-byte flags, plus length - Can introduce new types of path attribute—e.g., used AS4 PATH for 32-bit AS numbers
  • 18. Transport Details OPEN msg negotiates capabilities [RFC 3392] - E.g., to advertise support for AS4 PATH A full information exchange after connection is expensive! - Keep connection open indefinitely to exchange periodic updates Session resets are expensive (both in CPU and to the entire network!) and should be avoided.
  • 19. Advertisements NLRI: 171.67.0.0/14 AS Path: ASN 15444 3549 174 46749 32 Next Hop IP: just like in RIPv2 Knobs for traffic engineering - Metric, Weight, LocalPath, MED, Communities - Lots of voodoo
  • 20. Getting Your Hands Dirty RouteViews Project: http://www.routeviews.org/ - telnet route-views.linx.routeviews.org - show ip bgp 171.67.0.0/14 longer-prefixes Note that all paths are learned internally Not a production device
  • 22. Route Selection 1/2 Next-Hop reachable? Prefer highest weight - Computed using some AS-specific local policy Prefer highest local-pref Prefer locally originated routes Prefer routes with shortest AS path length
  • 23. Route Selection 2/2 Prefer path with lowest origin type Prefer route with lowest MED value - But note can only compare MEDs from same AS Prefer eBGP over iBGP Prefer routes with lowest cost to egress point - Hot-potato routing Tie-breaking rules - E.g., lowest router-id, oldest route
  • 24. External vs. Internal BGP AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 Only 1 Router Per AS (for now)
  • 25. External vs. Internal BGP AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 iBGP keeps AS consistent Multiple Peering Points!
  • 26. Customer/Provider AS relationships Customers pay for connectivity - E.g., Stanford pays Cogent Customer is a stub, provider is a transit - Amount and cost structure can vary wildly Many customers are multi-homed - Stanford also connects to Calren/Internet2 Typical policy: prefer routes from customers
  • 27. Peer relationships ASes agree to exchange traffic for free - Penalties/renegotiate if imbalance Tier 1 ISPs have no default route: all peer with each other You are Tier i + 1 if you have a default route to a Tier i
  • 28. BGP Relationship Drama Cogent vs. Level3 Level3 and Cogent were peers In 2005, Level3 decided to start charging Cogent Cogent said No Internet partition: Cogent’s customers couldn’t get to Level3’s customers and vice versa - Other ISPs were affected as well They came to a new, undisclosed agreement 3 weeks later
  • 29. BGP Problems and Solutions Security Convergence Scaling (route reflectors) Traffic engineering – AS preprending Multiple stable solutions – BGP ”Wedgies”
  • 30. BGP Security Anyone can source a prefix announcement - BGP is not very secure YouTube’s prefix is 208.65.152.0/22 Pakistani government ordered YouTube blocked - PieNET advertised 208.65.152.0/23 and 208.65.152.128/23 - Longest prefix match caused world-wide outage Spammers steal unused IP space to hide [Feamster] - Advertise very short prefixes—why? Secure BGP is currently in the works
  • 31. BGP Convergence Given a change, how long until the network re-stabilizes? - . . . depends on the change: sometimes never. - Open research problem: “tweak and pray” - Distributed setting is challenging Easier: Does there exist a stable configuration? - Distributed: open research problem - Centralized: NP-Complete problem! [Griffin’99]
  • 32. Scaling iBGP: Route Reflectors AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 iBGP keeps AS consistent Multiple Peering Points!
  • 33. Scaling iBGP: Route Reflectors iBGP Mesh == O(n^2) mess AS 1
  • 34. Scaling iBGP: Route Reflectors Solution: Route Reflectors O(n*k) AS 1
  • 35. Traffic Engineering “Route-map” programs to set weights Route filtering: input and output More specific routes: longest prefix AS prepending: ”32 32 32 32” Imprecise science
  • 36. BGP Wedgies [RFC 4264] A Common config: - Prefer customer routes over non-customer - Then prefer shortest AS path
  • 37. BGP Wedgies [RFC 4264] Backup Route 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 1.2.0.0/16: AS 1
  • 38. BGP Wedgies [RFC 4264] 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 AS 5 1 Backup Route
  • 39. BGP Wedgies [RFC 4264] 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 AS 4 5 1 Backup Route
  • 40. BGP Wedgies [RFC 4264] 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 AS 3 4 5 1 Backup Route
  • 41. BGP Wedgies [RFC 4264] 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 AS 2 3 4 5 1 Backup Route
  • 42. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 2 1 1 1 1
  • 43. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 3 2 1 1 1 1
  • 44. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 4 3 2 1 1 1 1
  • 45. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 Stable
  • 46. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 Link Restored
  • 47. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 1
  • 48. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 5 1
  • 49. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 AS 4 5 1
  • 50. BGP Wedgies [RFC 4264] Backup Route AS 3 1.2.0.0/16: AS 1 1 1 1 AS 1 AS 2 AS 4 AS 5 1.2.0.0/16 Wedged! AS 3 prefers routes from AS 2