1 / 52

Outline

Outline. Recap Network components & basic mechanisms Routing Flow control Continue Basic queueing analysis Construct routing table. Network components. h osts. routers. links. Basic mechanisms. h osts. ?. routers. ?. ?. ?. ?. links. How to choose path? How fast to send?.

sheryl
Télécharger la présentation

Outline

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Outline • Recap • Network components & basic mechanisms • Routing • Flow control • Continue • Basic queueing analysis • Construct routing table

  2. Network components hosts routers links

  3. Basic mechanisms hosts ? routers ? ? ? ? links How to choose path? How fast to send? video packets

  4. How to choose path? • Router by router decision • IP + routing table • Longest prefix matching

  5. RTT 1 2 W 1 2 W data ACKs 1 2 W 1 2 W How fast to send? • window flow control • W * packet_size / RTT Source time Destination time

  6. Outline • Recap • Network components & basic mechanisms • Routing • Flow control • Continue • Basic queueing analysis • Construct routing table

  7. Links may get congested How long does it take for a packet to get transmitted?

  8. Basic queueing analysis (expected) delay T Packets arrive randomly Packets arrive uniformly Arrival rate λ Queueing analysis studies what happens if arrival is random.

  9. Poisson arrival Poisson arrival: Interpretation: time Independent, exponentially distributed with mean 1/λ. expected delay T Arrival rate λ

  10. Poisson arrival holds more generally

  11. Outline • Recap • Network components & basic mechanisms • Routing • Flow control • Continue • Basic queueing analysis • Construct routing table

  12. We already know • Router by router decision • IP + routing table • Longest prefix matching What is missing? How to construct the routing table.

  13. Two layers of routing • Choose which AS? • - BGP • How to route inside an AS? • - OSPF Autonomy system (AS) e.g., AT&T, Verizon, MIT. Internet A B

  14. Why two layers? • Different objectives • Choose AS: special policies • Inside AS: minimize delay, # hops • Simplify routing • Choose AS: ignore details inside AS • Inside AS: only details inside AS

  15. Inter-domain routing: BGP • Peering relation: A-B, B-C • A, B, C carry each other’s traffic free • of charge • B only advertises B to A and to C • A does not know how to reach C through this. A must have transit relation with anther ISP (not shown here) that carries its traffic to C. • Transit relation: A-B, B-C • Customer-provider relation, e.g., B is provider for A and for C. A (C) pays B for carrying to/from A (C). • B advertises {B,C} to A and {A, B} to C so that all ISP’s know how to reach all destinations.

  16. Inter-domain routing: BGP A typical configuration

  17. Inter-domain routing: BGP BGP is policy-based routing • Generally not shortest-path • Other factors are generally more important in determining an AS-path than performance • Peering agreement • Pricing (revenue/cost) with next hop • Reliability, security, political reasons • Can lead to oscillation and bad performance

  18. Inter-domain routing: BGP Example BGP policy at Berkeley: If possible, avoid AT&T Choose path with smallest #hops Alphabetical Berkeley decision: use path Sprint-Verizon-MIT to reach MIT

  19. Border Gateway Protocol (BGP) Every AS keeps a list of (Destination, Path) pairs & policies. Policy: avoid AT&T. How to reach MIT from Berkeley? Verizon (MIT, Verizon---MIT) AT&T (MIT, AT&T---MIT) Sprint (MIT, NA) Berkeley (MIT, NA)

  20. Border Gateway Protocol (BGP) Every AS keeps a list of (Destination, Path) pairs& policies. Policy: avoid AT&T. How to reach MIT from Berkeley? Verizon (MIT, Verizon---MIT) (MIT, Verizon---AT&T---MIT) AT&T (MIT, AT&T---MIT) (MIT, AT&T---Verizon---MIT) Sprint (MIT, Sprint---Verizon---MIT) (MIT, Sprint---AT&T---MIT) Berkeley (MIT, Berkeley---AT&T---MIT)

  21. Border Gateway Protocol (BGP) Every AS keeps a list of (Destination, Path) pairs & policies. Policy: avoid AT&T. How to reach MIT from Berkeley? Verizon (MIT, Verizon---MIT) AT&T (MIT, AT&T---MIT) Sprint (MIT, Sprint---Verizon---MIT) Berkeley (MIT, Berkeley---AT&T---MIT) (MIT, Berkeley---Sprint---Verizon---MIT)

  22. Border Gateway Protocol (BGP) In BGP, each AS • Announces itself to other ASes and which ASes it can reach • Obtains ASes reachability info from neighboring Ases • Propagate reachability info to all routers internal to the AS • Determine “good” routes to ASes based on reachability info and AS policy

  23. BGP: potential oscillation Example BGP policy to reach D: Prefer 2-hop path to 1-hop Avoid 3-hop paths Oscillation: Every node will alternate between choosing an 1-hop path and 2-hop path

  24. Some questions Q1: Why not 3-level, or N-level, routing? Q2: How can a source ensure that its packets follow the inter-domain path it wants? Q3: In BGP, can one prevent a domain from lying and funneling all traffic through itself in order eavesdrop?

  25. Lecture outline Inter-domain routing • BGP Intra-domain routing • Shortest path algortihms Coding • FEC, network coding

  26. Shortest-path algorithm • Dijkstra • Bellman-Ford

  27. Dijkstra Each step, add one node with shortest distance.

  28. Pseudo code function Dijkstra(Graph, source): for each vertex v in Graph: // Initializations dist[v] := infinity ; // Unknown distance function from source to v previous[v] := undefined ; // Previous node in optimal path end for // from source dist[source] := 0 ; // Distance from source to source Q := the set of all nodes in Graph ; // All nodes in the graph are unoptimized while Q is not empty: // The main loop u := vertex in Q with smallest distance in dist[] ; // Source node in first case remove u from Q ; for each neighbor v of u: // where v has not yet been removed from Q alt := dist[u] + dist_between(u, v) ; if alt < dist[v]: // Relax (u,v,a) dist[v] := alt ; previous[v] := u ; end if end for end while return dist; endfunction

  29. Bellman-Ford Each iteration, tell neighbor updated distance. Pick the best neighbor. Consider how to reach D (dist, next_hop) @ each node A B C E F (inf,--) (inf,--) (2,D) (4,D) (inf,--) (inf,--) (5,C) (2,D) (3,C) (5,E) (6,B) (5,B) (4,E) (4,E) (2,D) (2,D) (3,C) (3,C) (4,E) (4,E) iteration

  30. Pseudo code procedure BellmanFord(list vertices, list edges, vertex source) // Step 1: initialize graph for each vertex v in vertices if v is source then dist[v] := 0 else dist[v] := infinity previous[v] := null // Step 2: relax edges repeatedly for i from 1 to size(vertices)-1: // # iterations is upper bounded for each edge (u, v) with weight w in edges // for each pair of neighbors if dist[u] + w < dist[v] dist[v] := dist[u] + w previous[v] := u

  31. Compare Dijsktra & BF • Message exchange • Dijkstra: every node sends only its incident link costs to all other nodes. This requires O(|V| |E|) messages. • BF: every node sends only to its neighbors least-cost estimates from itself to all other nodes • Speed of convergence • Disjstra: above implementation takes O(|V|2); can be reduced using heap • BF: can converge slowly and have routing loops during transient; count-to-infinity problem (can be solved using poisoned reverse) • No clear winner • Both are used on Internet • RIP: distance-vector protocol • OSPF: link-state protocol (meant to be successor to RIP)

  32. Count-to-infinity problem Example Link between B & C fails A and B will not realize it, a routing route is created and their cost estimate to C keeps going up A solution: poisoned reverse: instead of telling B its true cost (2) to reach C, A tells B that its cost to reach A is infinity because A uses B to reach C.

  33. Compare Dijsktra & BF • Dijkstra algorithm • Needs global information (link-state alg) • Each node broadcasts link-state packets to all other nodes in network • Each node executes Dijkstraalg to calculate shortest paths to all other nodes • After k iteration, shortest paths to k destinations are known (and they are the k shortest paths among the shortest paths to all nodes) • Terminates after N-1 iterations (N = #nodes)

  34. Compare Dijsktra & BF • Bellman-Ford algorithm • Only needs local information (distance-vector alg) • Each node exchanges with neighbors the vector of distances from itself to all other nodes • Each node then updates the next hop and associated distance to all other nodes using Bellman-Ford (DP) equation • Decentralized, asynchronous, distributed

  35. Other questions • How can routers trust each other ? • How to deal with non-convergence in DV protocol? How often is oscillation encountered in practice? • Router R1 can route a pkt to host A through R2 or R3; R2 can route through R4 or R5 and has chosen R4. But R1 prefers R5 to R2 to R4. What happens?

  36. Other questions • What is timescale for routing update? • What are major impediments to making significant changes to routing architecture? Would a bio-inspired routing system feasible? • Can network coding & FEC be combined?

  37. Lecture outline Inter-domain routing • BGP Intra-domain routing • Shortest path algortihms Coding • FEC, network coding

  38. FEC: packet erasure code Recover from packet loss Coding • Input: n packets • Output: m packets • = bit-by-bit XOR of a random subset of • Header of specifies the subset used to generate

  39. FEC: example : received pkt Decoding: received pkts

  40. FEC: example : received pkt Decoding:

  41. FEC: example : received pkt Decoding:

  42. FEC: example : received pkt Decoding:

  43. FEC: example : received pkt Decoding:

  44. FEC: example : received pkt Decoding:

  45. FEC: example : received pkt Decoding:

  46. FEC: example : received pkt Decoding:

  47. FEC: example : received pkt Decoding:

  48. FEC: example : received pkt Decoding:

  49. FEC: example : received pkt Decoding:

  50. FEC: packet erasure code Decoding • If for some i, then for all pkts that contains • Remove from the collection of rec’d pkts • Repeat until all have been decoded • If at one step, there is no then decoding fails

More Related