6.263 Data Communication Networks



Similar documents
Exterior Gateway Protocols (BGP)

Lecture 18: Border Gateway Protocol"

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

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

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

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

Route Discovery Protocols

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

Lecture 8: Routing I Distance-vector Algorithms. CSE 123: Computer Networks Stefan Savage

Outline. Internet Routing. Alleviating the Problem. DV Algorithm. Routing Information Protocol (RIP) Link State Routing. Routing algorithms

CSE331: Introduction to Networks and Security. Lecture 8 Fall 2006

APNIC elearning: BGP Attributes

Inter-domain Routing. Outline. Border Gateway Protocol

Dynamic Routing Protocols II OSPF. Distance Vector vs. Link State Routing

Border Gateway Protocol BGP4 (2)

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

Interdomain Routing. Outline

Border Gateway Protocol (BGP)

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

E : Internet Routing

Internet inter-as routing: BGP

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

Can Forwarding Loops Appear when Activating ibgp Multipath Load Sharing?

CS Computer Networks 1: Routing Algorithms

How To Understand Bg

CS551 External v.s. Internal BGP

Using the Border Gateway Protocol for Interdomain Routing

Internet Control Message Protocol (ICMP)

APNIC elearning: BGP Basics. Contact: erou03_v1.0

Routing Protocols (RIP, OSPF, BGP)

Lecture 12: Link-state Routing"

Routing Protocols. Interconnected ASes. Hierarchical Routing. Hierarchical Routing

Internet inter-as routing: BGP

Masterkurs Rechnernetze IN2097

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

Introduction to TCP/IP

OSPF Version 2 (RFC 2328) Describes Autonomous Systems (AS) topology. Propagated by flooding: Link State Advertisements (LSAs).

ECSE-6600: Internet Protocols Exam 2

Introduction to LAN/WAN. Network Layer

basic BGP in Huawei CLI

Introduction to Routing

Computer Networks. Main Functions

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

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

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

Routing with OSPF. Introduction

BGP Attributes and Path Selection

BGP Best Path Selection Algorithm

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

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Network Level Multihoming and BGP Challenges

Chapter 4. Distance Vector Routing Protocols

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

Border Gateway Protocol (BGP-4)

The Internet. Internet Technologies and Applications

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

Routing Protocol - BGP

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

Week 4 / Paper 1. Open issues in Interdomain Routing: a survey

GregSowell.com. Mikrotik Routing

Administrative Distance

BGP Router Startup Message Flow

CS 5480/6480: Computer Networks Spring 2012 Homework 3 Due by 1:25 PM MT, Monday March 5 th 2012

Internet Routing Protocols Lecture 04 BGP Continued

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

Understanding Large Internet Service Provider Backbone Networks

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

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

Towards a Next- Generation Inter-domain Routing Protocol. L. Subramanian, M. Caesar, C.T. Ee, M. Handley, Z. Mao, S. Shenker, and I.

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

Link-State Routing Protocols

Routing Protocols OSPF CHAPTER. The following topics describe supported routing protocols. Topics include OSPF, page 9-1 IS-IS Protocol, page 9-3

BGP: Border Gateway Protocol

An Overview of Solutions to Avoid Persistent BGP Divergence

Lecture 13: Distance-vector Routing. Lecture 13 Overview. Bellman-Ford Algorithm. d u (z) = min{c(u,v) + d v (z), c(u,w) + d w (z)}

Question 1. [7 points] Consider the following scenario and assume host H s routing table is the one given below:

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Exercises TCP/IP Networking. Solution. With Solutions

Understanding Route Redistribution & Filtering

Load balancing and traffic control in BGP

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

CS335 Sample Questions for Exam #2

Routing and traffic measurements in ISP networks

KT The Value Networking Company

Network layer: Overview. Network layer functions IP Routing and forwarding

IP - The Internet Protocol

6.02 Practice Problems: Routing

Network Measurement. Why Measure the Network? Types of Measurement. Traffic Measurement. Packet Monitoring. Monitoring a LAN Link. ScienLfic discovery

Ausgewählte Kapitel der Rechnernetze

IP Routing Configuring RIP, OSPF, BGP, and PBR

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

Lesson 5-3: Border Gateway Protocol

The goal of this lecture is to explain how routing between different administrative domains

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Transcription:

6.6 Data Communication Networks Lecture : Internet Routing (some slides are taken from I. Stoica and N. Mckewon & T. Griffin) Dina Katabi dk@mit.edu www.nms.csail.mit.edu/~dina

Books Text Book Data Communication Networks, by Dimitri Betsekas and Robert Gallager Recommended Computer Networks - A Systems Approach, by Larry L. Peterson and Bruce S. Davie, rd edition.

Lecture : Taxonomy of Networks (Mainly notes. Reading: P&D. pp. 64-80 ) Lecture : Routing Algorithms Bertsekas and Gallager Lecture : Internet Routing (The real picture) (Notes. Also you can find the material in P&D 4. except 4..5, 4.., 4.., 4... For algs., see B&G-5..)

IP Addresses & IP Header bit # 0 7 8 5 6 4 version header length Identification DS ECN total length (in bytes) Fragment offset time-to-live (TTL) protocol header checksum 0 D F M F source IP address destination IP address options (0 to 40 bytes) payload 4 bytes IP address: e.g., 8.6.0. IP prefix: e.g., 8/8 contains 4 addresses e.g, 8.6/6 or 8.6.0/4 4

Forwarding 8/8 What s the difference between routing and forwarding? R 9.6/6 Routing is finding the path Forwarding is the action of sending the packet to the next-hop toward its destination Each router has a forwarding table Router R R 8./6 7/8 5../4 Forwarding tables are created by a routing protocol Dest. Addr Next-hop Forwarding: 8/8 R When a packet arrives, router looks up the dst. IP in the forwarding table 8./6 9.6/6 5../4 R R R finds nexthop 7/8 R queues packet to be sent on the interface connected to nexthop Forwarding needs to be fast 5

Picture of the Internet Interior router AS- Border router AS- AS- Internet: A collection of Autonomous Systems (ASes) E.g., MIT network, AT&T, Quest, Sprint, Routing is hierarchical Intra-Domain Routing inside an AS Inter-Domain Routing between ASes 6

Two Main Approaches to Intra-domain Routing Distance Vector Protocols E.g., RIP Based on Distributed Bellman-Ford Algorithm Periodically, each node tells its neighbors about its shortest route to all other nodes in the network Link State Protocols E.g., OSPF Based on Dijkstra Algorithm Periodically, each node tells all nodes about its neighbors (it floods that information) 7

Distance Vector: Control Traffic When the routing table of a node changes, the node sends its table to its neighbors A node updates its table with information received from its neighbors Host C Host A Host D N N N N5 Host B N4 Host E N6 N7 8

Distributed Bellman-Ford Algorithm R Example: Compute routes to R8 4 R R R 7 5 0 R 4 R 8 R 4 R 6 Initial State: All routers except R8 set their route length to. R8 sets its route length to 0. 9

R R Inf Inf R 4, R 8 R 4 Inf R 5, R 8 R 6, R 8 R 7, R 8 Distributed Bellman-Ford Algorithm Example: Compute routes to R8 R R R R 7 4 5 R 4 R 8 R 4 4 R 6 Iterative step: Every T seconds, each router tells its neighbors its lowest-cost to R8 When a router receives a message from neighbor j, it updates its path cost as: If (j is my current nexthop) then cost= j s cost to R8 + cost of the link to j else cost =min(current cost, j s cost to R8 + cost of the link to j) Note, routing tables at each router have both the next-hop and the cost 0

R R 6, R 4, R5 R 4, R 8 R 4 6, R7 R 5, R 8 R 6, R 8 R 7, R 8 Distributed Bellman-Ford Algorithm Example: Compute routes to R8 6 4 6 R R R R 7 4 5 R 4 R 8 R 4 4 R 6 Repeat until no costs change

R R 6, R 4, R5 R 4, R 8 R 4 6, R7 R 5, R 8 R 6, R 8 R 7, R 8 R R 6, R 4, R5 R 4, R 8 R 4 5, R R 5, R 8 R 6, R 8 R 7, R 8 Distributed Bellman-Ford Algorithm Example: Compute routes to R8 6 4 6 R R R R 7 4 5 R 4 R 8 R Solution R R 7 4 5 R 4 R 8 R 4 6 4 5 R 4 R 6 R 4 R 6

Formally At router A, assume c(a,v) is the cost of the edge A-V and D(A,V) is the cost of the path from A to V Initialization: for all neighbors V do if V adjacent to A 4 D(A, V) = c(a,v); 5 else 6 D(A, V) = ; 7 loop: 8 wait (link cost update or update message) 9 if (c(a,v) changes by d) 0 for all destinations Y through V do D(A,Y) = D(A,Y) + d else if (update D(V, Y) received from V) for all destinations Y do 4 if (destination Y through V) 5 D(A,Y) = c(a,v) + D(V, Y); 6 else 7 D(A, Y) = min(d(a, Y), c(a, V) + D(V, Y)); 8 if (there is a new minimum for destination Y) 9 send D(A, Y) to all neighbors 0 forever

A Problem with Bellman-Ford Bad news travels slowly R Consider the calculation of distances to R 4 : Time 0 R R R R R X,R,R, R 4 R,R,R,R R 4 fails R 4 4

A Problem with Bellman-Ford Bad news travels slowly R R Consider the calculation of distances to R 4 : Time 0 R 5,R R 4,R R 5,R R,R,R, R 4 R,R,R,R R 4 fails,r 4,R Counting to infinity,r R 4 5

How are These Loops Caused? Observation : R s metric increases Observation : R picks R as next hop to R4; But, the implicit path from R to R4 includes R! 6

Counting to Infinity Problem Solutions. Set infinity = some small integer (e.g. 00). Stop when count = 00.. Split Horizon: Because R received lowest cost path from R, it does not advertise cost to R. Split-horizon with poison reverse: R advertises infinity to R Can you think of another approach? 7

Two Main Approaches to Intra-domain Routing Distance Vector Protocols E.g., RIP Based on Distributed Bellman-Ford Algorithm Periodically, each node tells its neighbors about its shortest route to all other nodes in the network Link State Protocols E.g., OSPF Based on Dijkstra Algorithm Periodically, each node tells all nodes about its neighbors (it floods that information) 8

Link State Start condition Each node is assumed to know its neighbors Phase : Each node learns the graph Each node broadcasts its neighbor list to all other nodes in a message called LSP LSP contains: Node ID, List of neighbors and the link cost to reach them, Sequence number (needed to avoid stale information from propagating), Time to live (TTL) Reliable flooding mechanism When node J receives LSP from node K, if LSP is the most recent LSP from K that J has seen so far, J saves it in database and forwards a copy on all links except the link on which the LSP was received, otherwise, it discards the LSP Phase : Each node computes shortest paths Each node locally computes shortest paths to all other nodes from global state It uses Dijkstra s shortest path tree (SPT) algorithm 9

Link State: Control Traffic Each node floods info about its neighbors to every node in the network Each node ends up knowing the entire network topology use Dijkstra to compute the shortest path to every other node Host C Host A Host D N N N N5 Host B N4 Host E N6 N7 0

Link State: Node State Host A A B C D E Host C A B C D E A B C D Host D E N N A C D N A C D N5 B E A C D Host B N4 B E A C D B E Host N6 B E N7

Dijkstra s Shortest Path First Algorithm Assumptions: Costs are positive Each router has the graph. Is it scalable? For each source, the alg. finds the spanning tree routed at the source

Step 0 4 5 A Example: Dijkstra s Algorithm Node A uses Dijkstra to find routes from A to all nodes D(x) is distance to X and p(x) is parent of node X in the spanning tree rooted at A start S A 5 B D D(B),p(B),A C E D(C),p(C) 5,A 5 F D(D),p(D),A D(E),p(E) Initialization: S = {A}; for all nodes v 4 if v adjacent to A 5 then D(v) = c(a,v); 6 else D(v) = ; D(F),p(F)

Example: Dijkstra s Algorithm Node A uses Dijkstra to find routes from A to all nodes Step 0 4 5 A start S A AD 5 B D D(B),p(B),A C E 5 D(C),p(C) 5,A 4,D F D(D),p(D),A D(E),p(E),D D(F),p(F) 8 Loop 9 find w not in S s.t. D(w) is a minimum; 0 add w to S; update D(v) for all v adjacent to w and not in S: D(v) = min( D(v), D(w) + c(w,v) ); until all nodes in S; Dijkstra s Key Idea: At each step, find the next closest node 4

Example: Dijkstra s Algorithm Node A uses Dijkstra to find routes from A to all nodes Step 0 4 5 A start S A AD ADE 5 B D D(B),p(B),A C E 5 F D(C),p(C) 5,A 4,D,E D(D),p(D),A D(E),p(E),D D(F),p(F) 4,E 8 Loop 9 find w not in S s.t. D(w) is a minimum; 0 add w to S; update D(v) for all v adjacent to w and not in S: D(v) = min( D(v), D(w) + c(w,v) ); until all nodes in S; 5

Example: Dijkstra s Algorithm Node A uses Dijkstra to find routes from A to all nodes Step 0 4 5 A start S A AD ADE ADEB 5 B D D(B),p(B),A C E 5 F D(C),p(C) 5,A 4,D,E D(D),p(D),A D(E),p(E),D D(F),p(F) 4,E 8 Loop 9 find w not in S s.t. D(w) is a minimum; 0 add w to S; update D(v) for all v adjacent to w and not in S: D(v) = min( D(v), D(w) + c(w,v) ); until all nodes in S; 6

Example: Dijkstra s Algorithm Node A uses Dijkstra to find routes from A to all nodes Step 0 4 5 A start S A AD ADE ADEB ADEBC 5 B D D(B),p(B),A C E 5 F D(C),p(C) 5,A 4,D,E D(D),p(D),A D(E),p(E),D D(F),p(F) 4,E 8 Loop 9 find w not in S s.t. D(w) is a minimum; 0 add w to S; update D(v) for all v adjacent to w and not in S: D(v) = min( D(v), D(w) + c(w,v) ); until all nodes in S; 7

Example: Dijkstra s Algorithm Node A uses Dijkstra to find routes from A to all nodes Step 0 4 5 A start S A AD ADE ADEB ADEBC ADEBCF 5 B D D(B),p(B),A C E 5 F D(C),p(C) 5,A 4,D,E D(D),p(D),A D(E),p(E),D D(F),p(F) 4,E 8 Loop 9 find w not in S s.t. D(w) is a minimum; 0 add w to S; update D(v) for all v adjacent to w and not in S: D(v) = min( D(v), D(w) + c(w,v) ); until all nodes in S; 8

Inter-Domain Routing & BGP 9

Picture of the Internet AS- Interior router Border router AS- AS- Intra-domain routing inside an AS Iner-domain routing between ASes 0

Internet Hierarchy What is an Autonomous System (AS)? A set of routers under a single technical administration, using an intra-domain routing protocol (IGP) and common metrics to route packets within the AS and using an inter-domain routing protocol (EGP) to route packets to other ASes Sometimes ASes use multiple intra-domain routing protocols and metrics, but appear as a single AS to other ASes Each AS is assigned a unique ID

AS Numbers (ASNs) ASNs are 6 bit values. 645 through 6555 are private Currently over 6,000 in use. Genuity: MIT: Harvard: UC San Diego: 777 AT&T: 708, 64, 5074, UUNET: 70, 70, 84, 99, Sprint: 9, 40, 6, 64, ASNs represent units of routing policy

A Logical View of the Internet Internet connectivity is provided by commercial entities called ISPs, who compete for profit yet have to cooperate to provide connectivity Each ISP has its own AS (sometimes multiple ASes) Not all ISPs are created equal Tier ISP Default-free global reachability info Tier ISP Regional or country-wide Tier ISP Local Tier Tier Tier Tier Tier Tier

Inter-AS Relationship: Transit vs. Peering Transit ($$) ISP P Transit ($$$) ISP Y Transit ($) Transit ($$$) Transit ($) ISP Z Peering Transit ($$) Transit ($$$) ISP X Transit ($$) 4

Policy Impact on Routing AS relationships Customer-provider Peers Want Valley-free routes Number links as (+, 0, -) for provider, peer and customer links In any path, you should only see sequence of +, followed by at most one 0, followed by sequence of - 5

Customer-Provider Hierarchy provider customer IP traffic 6

The Peering Relationship peer provider traffic allowed peer customer traffic NOT allowed Peers provide transit between their respective customers Peers do not provide transit between peers Peers (often) do not exchange $$$ 7

Peering Provides Shortcuts peer provider peer customer 8

Policy-Based Routing Policies are used to force customer-provider-peer relationships, backup links, load balancing, Can t use shortest path routing No universal metric policy-based decisions Main characteristic of shortest path does not hold (i x j is shortest route, then x j is shortest route) Problems with distance-vector: Bellman-Ford algorithm may not converge, and may loop Problems with link state: Metric used by different routers are not the same loops LS database too large entire Internet May expose policies to other AS s 9

BGP: Distance Vector with Path Each routing update carries the entire path e.g.,: destination 8.6/6 is reachable using {AS, AS, AS} When AS receives a routing update Reject routes with loops To detect loops check whether my AS is already in path AS remembers loop-free routes For each destination, the AS chooses the best route according its policies. AS advertises a neighbor routes to a subset of all the destinations, depending on its policy E.g., I might hide from you that I know how to get to destination X, because I don t want to deliver your messages to X AS advertises to neighbors only those routes that it uses Ensures that if i x j is the used route, then x j is the used route What happens if an AS advertises routes that it doesn t use? Advantage: Metrics are local - AS chooses path, protocol ensures no loops 40

BGP Operations (Simplified) Establish session on TCP port 79 AS Exchange all active routes BGP session AS Exchange incremental updates While connection is ALIVE exchange route UPDATE messages 4

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 Attributes are used to choose among all routes for the same prefix Example attribute is AS_PATH, which is used to discover loops 4

Implementing Customer/Provider and Peer/Peer relationships using 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 (importing routers). controlling advertisement to other AS s (exporting routes) 4

Importing Routes Based on route attributes First, Prefer customer > peer > provider Then, Shortest AS PATH length Then, look at other route attributes 44

Exporting Routes When an AS exports a route, others can use the AS to forward packets along that route Rules: Export customers routes to everyone why? Export routes to your own addresses to everyone Why? Don t export routes advertised to you by your provider (may advertise them to customers) Why? Don t export routes advertised to you by your peer (may advertise them to customers) Why? 45

Import Routes provider route peer route customer route ISP route From provider From provider From peer From peer (Prefer customer > peer > provider) From customer From customer 46

Export Routes provider route peer route customer route ISP route To provider From provider To peer To peer To customer To customer filters block 47

What problem is BGP solving? Underlying problem Shortest Paths X? Distributed means of computing a solution. RIP, OSPF, IS-IS BGP X could aid in the design of policy analysis algorithms and heuristics aid in the analysis and design of BGP and extensions help explain some BGP routing anomalies provide a fun way of thinking about the protocol 48

An instance of the Stable Paths Problem (SPP) A graph of nodes and edges, Node 0, called the origin, For each non-zero node, a set or permitted paths to the origin. This set always contains the null path. A ranking of permitted paths at each node. 0 0 0 0 5 5 0 0 4 4 0 4 0 0 most preferred least preferred (not null) When modeling BGP : nodes represent BGP speaking routers, and 0 represents a node originating some address block Yes, the translation gets messy! 49

An SPP may have multiple solutions 0 0 0 0 0 0 0 0 0 0 0 DISAGREE 0 0 First solution 0 0 Second solution 50

BAD GADGET : No Stable Solution 0 0 4 0 0 0 0 0 5

Known Results Internet routing has serious convergence problems Result [Griffin et al.]: BGP does not satisfy the stable paths problem. Result [Rexford et al.]: If every AS follows a set of guidelines (valley-free routes) then Internet routing should not have convergence problems. 5

Two Types of BGP Neighbor Relationships AS External Neighbor (ebgp) in a different Autonomous Systems Internal Neighbor (ibgp) in the same Autonomous System ebgp ibgp AS 5

ibgp AS has more than one router participating in ebgp ibgp is run between BGP routers in the same AS to allow all of them to obtain a complete and consistent view of external routes ibgp AS 54

Internal BGP (ibgp) Same messages as ebgp Different rules about re-advertising prefixes: Prefix learned from ebgp can be advertised to ibgp neighbor and vice-versa, but Prefix learned from one ibgp neighbor cannot be advertised to another ibgp neighbor Reason: no AS PATH within the same AS and thus danger of looping. 55

We learned Inter-domain routing uses policy As a result, routing is not a simple optimization of a single number which can be done using shortest path algorithms BGP is designed to route based on policies 56