CMPT 880: Internet Architectures and Protocols

Slides:



Advertisements
Similar presentations
Network Layer4-1 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables! r routing table exchange would.
Advertisements

Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol –Datagram format.
13 –Routing Protocols Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Lecture 8 Overview. Graph abstraction u y x wv z Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v),
Routing - I Important concepts: link state based routing, distance vector based routing.
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Data Communication and Networks Lecture 7 Networks: Part 2 Routing Algorithms October 27, 2005.
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
Routing Algorithms and Routing in the Internet
Network Layer4-1 Chapter 4: Network Layer, partb The slides are adaptations of the slides available by the main textbook authors, Kurose&Ross.
14 – Inter/Intra-AS Routing
Announcement r Project 2 due next week! r Homework 3 available soon, will put it online r Recitation tomorrow on Minet and project 2.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 18.
14 – Inter/Intra-AS Routing Network Layer Hierarchical Routing scale: with > 200 million destinations: can’t store all dest’s in routing tables!
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Introduction 1 Lecture 21 Network Layer (Routing Activity) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
RSC Part II: Network Layer 6. Routing in the Internet (2 nd Part) Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
Introduction 1 Lecture 19 Network Layer (Routing Protocols) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
Network Layer4-1 Chapter 4 Network Layer Part 3: Routing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March.
CS 3830 Day 29 Introduction 1-1. Announcements r Quiz 4 this Friday r Signup to demo prog4 (all group members must be present) r Written homework on chapter.
10-1 Last time □ Transitioning to IPv6 ♦ Tunneling ♦ Gateways □ Routing ♦ Graph abstraction ♦ Link-state routing Dijkstra's Algorithm ♦ Distance-vector.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
13 – Routing Algorithms Network Layer.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer4-1 Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then d x (y)
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
Network Layer4-1 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information.
Introduction 1 Lecture 19 Network Layer (Routing Algorithms) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 20 Omar Meqdadi Department of Computer Science and Software Engineering University.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter4_3.
CS 4284 Systems Capstone Godmar Back Networking. CS 4284 Spring 2013 Summary Basics of Network Layer –Routing (path selection) vs Forwarding (switching)
Transport Layer3-1 Network Layer Every man dies. Not every man really lives.
Network Layer4-1 Routing Algorithm Classification Global or decentralized information? Global: r all routers have complete topology, link cost info r “link.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
4: Network Layer4a-1 Distance Vector Routing Algorithm iterative: r continues until no nodes exchange info. r self-terminating: no “signal” to stop asynchronous:
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
Network Layer4-1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol.
Routing in the Internet
14 – Inter/Intra-AS Routing
Chapter 4: Network Layer
CS 5565 Network Architecture and Protocols
Chapter 7 Dynamic Routing
Chapter 4: Network Layer
Chapter 4 Network Layer A note on the use of these ppt slides:
Network Layer Introduction Datagram networks IP: Internet Protocol
Road Map I. Introduction II. IP Protocols III. Transport Layer
Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.
Chapter 4-4 routing and IP routing
Routers Routing algorithms
Chapter 4: Network Layer
CS4470 Computer Networking Protocols
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
CMPE 252A : Computer Networks
Chapter 4: Network Layer
Network Layer (contd.) Routing
CMPT 771/471: Internet Architecture & Protocols
Chapter 4: Network Layer
Network Layer: Link-state and Distance-Vector Routing Protocols
Network Layer: Internet Inter-Domain Routing
Chapter 4: Network Layer
CSCD 330 Network Programming
Chapter 4 Network Layer A note on the use of these ppt slides:
Presentation transcript:

CMPT 880: Internet Architectures and Protocols School of Computing Science Simon Fraser University CMPT 880: Internet Architectures and Protocols Introduction II Instructor: Dr. Mohamed Hefeeda

Review of Basic Networking Concepts Internet structure Protocol layering and encapsulation Internet services and socket programming Network Layer Network types: Circuit switching, Packet switching Addressing, Forwarding, Routing Transport layer Reliability and congestion control TCP, UDP Link Layer Multiple Access Protocols Ethernet

Network Layer in the Internet Recall the big picture… Transport layer: TCP, UDP IP protocol addressing conventions datagram format packet handling conventions Routing protocols path selection RIP, OSPF, BGP Network layer forwarding table ICMP protocol error reporting router “signaling” Link layer physical layer

Routing algorithm: find the least-cost path Graph Abstraction u y x w v z 2 1 3 5 Graph: G = (N,E) N = set of routers = {u, v, w, x, y, z } E = set of links ={(u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z)} cost of link (x1, x2): Metric value, e.g., c(w,z) = 5 could be 1 (typical), or inversely related to bandwidth, or inversely related to congestion Routing algorithm: find the least-cost path

Classification of Routing Algorithms Global or local information? Global: all routers have complete topology, link cost info “link state” algorithms Local: each router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors “distance vector” algorithms

A Link-State Routing Algorithm Dijkstra’s algorithm net topology, link costs known to all nodes accomplished via “link state broadcast” all nodes have same info computes least cost paths from one node (source) to all other nodes gives forwarding table for that node iterative: after k iterations, know least cost path to k destinations

A Link-State Routing Algorithm Notation: c(x,y): link cost from node x to y; c(x,y) = ∞ if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitively known

Dijsktra’s Algorithm 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min { D(v), D(w) + c(w,v) } 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N'

Dijkstra’s algorithm: example Step 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u D(w),p(w) 5,u 4,x 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ 4,y u y x w v z 2 1 3 5

Dijkstra’s algorithm: example (2) Resulting shortest-path tree from u: u y x w v z Resulting forwarding table in u: v x y w z (u,v) (u,x) destination link

Dijkstra’s algorithm, discussion What is the time complexity of Dijkstra’s algorithm? Input: n nodes (other than source) each iteration: need to check all nodes not in N 1st iteration : n comparisons 2nd : n -1 3rd : n-2 nth : 1 Total: n(n+1)/2 comparisons  complexity : O(n2) more efficient implementations possible: O(nlogn) Using heap data structure Possible solutions for oscillation: Routers do not run algorithm at the same time, they randomize the time they send out link advertisement

Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define dx(y) := cost of least-cost path from x to y Then dx(y) = min {c(x,v) + dv(y) } where min is taken over all neighbors v of x v

Bellman-Ford example Determine du(z) How would you use BF equation to v z 2 1 3 5 Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3 B-F equation says: du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 How would you use BF equation to construct shortest paths?

Distance Vector Algorithm Define Dx(y) = estimate of least cost from x to y Distance vector: Dx = [Dx(y): y є N ] Node x knows cost to each neighbor v: c(x,v) Node x maintains Dx = [Dx(y): y є N ] Node x also maintains its neighbors’ distance vectors For each neighbor v, x maintains Dv = [Dv(y): y є N ]

Distance vector algorithm Basic idea: Each node periodically sends its own distance vector estimate to neighbors When a node x receives new DV estimate from neighbor, it updates its own DV using B-F equation: Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N Under minor, natural conditions, the estimate Dx(y) converge to the actual least cost dx(y)

Distance Vector Algorithm Each node: Iterative Continues until no more info is exchanged Each iteration caused by: local link cost change DV update message from neighbor Asynchronous Nodes do not operate in lockstep Distributed Each node receives info only from its directly attached neighbors NO Global info wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors

z y x Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3 node x table x y z x y z 0 2 7 ∞ from cost to cost to cost to x y z x y z x 0 2 3 x 0 2 3 from y 2 0 1 from y 2 0 1 z 7 1 0 z 3 1 0 node y table cost to cost to cost to x z 1 2 7 y x y z x y z x y z x ∞ ∞ x 0 2 7 ∞ 2 0 1 x 0 2 3 y from y from 2 0 1 from y 2 0 1 z z ∞ ∞ ∞ 7 1 0 z 3 1 0 node z table cost to cost to Example cost to x y z x y z x y z x 0 2 7 x 0 2 3 x ∞ ∞ ∞ from y from y 2 0 1 from y 2 0 1 ∞ ∞ ∞ z z z 3 1 0 3 1 0 7 1 time

Distance Vector: link cost changes Link cost decreased: node detects local link cost change updates routing info, recalculates distance vector if DV changes, notify neighbors 1 y 4 1 x z 50 At time t0, y detects the link-cost change, updates its DV, and informs its neighbors. At time t1, z receives the update from y and updates its table. It computes a new least cost to x and sends its neighbors its DV. At time t2, y receives z’s update and updates its distance table. y’s least costs do not change and hence y does not send any message to z. “good news travels fast”

Distance Vector: link cost changes Link cost increased: t0: y detects change, updates its cost to x to be 6. Why? Because z previously told y that “I can reach x with cost of 5.” 6 = min {60+0, 1+5} Now we have a routing loop! Pkts destined to x from y go back and forth between y and z forever (or until loop is broken) t1: z gets the update from y. z updates its cost to x to be?? 7 = min {50+0, 1+6} Algorithm will take 44 iterations to stabilize This is called “count to infinity” problem! Solutions? 60 y 4 1 x z 50 “Bad news travels slow”

Distance Vector: link cost changes x z 1 4 50 y 60 Poisoned reverse: If z routes through y to get to x: Then z tells y that its (z’s) distance to x is infinity (so y won’t route to x via z) Will this completely solve count to infinity problem? No! Loops involving three or more nodes will not be detected

Comparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only But send entire table Speed of Convergence LS: O(n2) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table  some degree of robustness DV: node can advertise incorrect path cost each node’s table used by others error propagates thru network In The Internet: LS: OSPF (recent, more features) DV: RIP (old, small nets)

Hierarchical Routing Our routing study thus far - idealization all routers identical network “flat” … not true in practice scale: with 200 million destinations: can’t store all dest’s in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network

Hierarchical Routing aggregate routers into regions, “autonomous systems” (AS) routers in same AS run same routing protocol “intra-AS” routing protocol routers in different AS can run different intra-AS routing protocol Gateway router Direct link to router in another AS

Interconnected ASes 3c 3a 2c 3b 2a AS3 2b 1c 1a 1b AS1 1d Intra-AS Routing algorithm Inter-AS Forwarding table 3c Forwarding table is configured by both intra- and inter-AS routing algorithm Intra-AS sets entries for internal dests Inter-AS & Intra-As sets entries for external dests

Inter-AS tasks AS1 needs: Suppose router in AS1 receives datagram for which dest is outside of AS1 Router should forward packet towards one of the gateway routers, but which one? AS1 needs: to learn which dests are reachable through AS2 and which through AS3 to propagate this reachability info to all routers in AS1 Job of inter-AS routing! 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b 3c

Example: Choosing among multiple ASes Now suppose AS1 learns from the inter-AS protocol that subnet x is reachable from AS3 and from AS2 To configure forwarding table, router 1d must determine towards which gateway it should forward packets for dest x Hot potato routing: send packet towards closest of two routers Learn from inter-AS protocol that subnet x is reachable via multiple gateways Use routing info from intra-AS protocol to determine costs of least-cost paths to each of the gateways Hot potato routing: Choose the gateway that has the smallest least cost Determine from forwarding table the interface I that leads to least-cost gateway. Enter (x,I) in forwarding table

Internet inter-AS routing: BGP BGP (Border Gateway Protocol): the de facto standard BGP provides each AS a means to: Obtain subnet reachability information from neighboring ASes Propagate the reachability information to all routers internal to the AS Determine “good” routes to subnets based on reachability information and policy Allows a subnet to advertise its existence to rest of the Internet: “I am here” Why reachability? Why not exact route? Because exact route will impose too much overhead. Routers would Have to handle a huge amount of information. With reachability (i.e., AS path), core routers have in their tables Around 140,000 entries! This is a tradeoff between scalability and route optimality. BGP BGP is concerned with finding any route to destination, not necessarily the optimal route.

BGP basics Pairs of routers (BGP peers) exchange routing info over semi-permanent TCP connections: BGP sessions Note: BGP sessions do not correspond to physical links When AS2 advertises a prefix to AS1, AS2 is promising it will forward any datagrams destined to that prefix towards the prefix AS2 can aggregate prefixes in its advertisement 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b 3c eBGP session iBGP session

Distributing reachability info With eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1 1c can then use iBGP to distribute this new prefix reach info to all routers in AS1 1b can then re-advertise the new reachability info to AS2 over the 1b-to-2a eBGP session When router learns about a new prefix, it creates an entry for the prefix in its forwarding table. 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b 3c eBGP session iBGP session

Path attributes & BGP routes When advertising a prefix, advert. includes BGP attributes prefix + attributes = “route” Two important attributes: AS-PATH: contains the ASes on the path to the prefix NEXT-HOP: Indicates the specific internal-AS router to next-hop AS. (There may be multiple links from current AS to next-hop-AS.) When gateway router receives route advert., uses import policy to accept/decline

BGP messages BGP messages exchanged using TCP BGP messages: OPEN: opens TCP connection to peer and authenticates sender UPDATE: advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION: reports errors in previous msg; also used to close connection

BGP route selection Router may learn about more than 1 route to some prefix. Router must select a route Elimination rules: Local preference value attribute: policy decision Shortest AS-PATH Closest NEXT-HOP router: hot potato routing Additional criteria

BGP Routing Policy A,B,C are provider networks X,W,Y are customer (of provider networks) X is dual-homed: attached to two provider networks X does not want to route traffic from B via X to C … so X will not advertise to B a route to C

BGP Routing Policy (2) A advertises to B the path AW B advertises to X (its client) the path BAW Should B advertise to C the path BAW? No way! B gets no “revenue” for routing CBAW since neither W nor C are B’s customers Rule of thumb: a provider wants to route only to/from its customers! (unless there is a mutual peering deal)

Why different Intra- and Inter-AS routing ? Policy: Inter-AS: admin wants control over how its traffic routed, who routes through its net. Intra-AS: single admin, so no policy decisions needed Scale: hierarchical routing saves table size, reduced update traffic Performance: Intra-AS: can focus on performance Inter-AS: policy may dominate over performance Is routing in the Internet optimal? NO, because: - BGP policies may mandate longer paths - BGP advertises only AS path. ASes have different sizes. Even if they have the same size, we do not know the cost of paths within ASes. - A route may (typically) crosses multiple ASes, each with its own intra-domain routing algorithm with different metric. This makes it hard to even define an optimality criterion.

Unicast, multicast, broadcast Unicast: one source, one destination E.g., web session Multicast: one source, multiple destinations Subset of all possible destinations E.g., streaming a hockey game to interested fans Broadcast: one source, all destinations E.g., broadcasting link state info to ALL routers in a domain in OSPF protocol Anycast: multiple possible sources, one destination Sources have same (anycast) address Request is forwarded to appropriate source (Still in research phases) We will not cover these topics!