1 / 70

Midterm Review

Midterm Review. EE 122, Fall 2013 Sylvia Ratnasamy http://inst.eecs.berkeley.edu/~ee122 / Material thanks to Ion Stoica , Scott Shenker , Jennifer Rexford, Nick McKeown , and many other colleagues. Logistics. Test is in this classroom starting at 5:40 exactly

becca
Download Presentation

Midterm Review

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. Midterm Review EE 122, Fall 2013 Sylvia Ratnasamy http://inst.eecs.berkeley.edu/~ee122/ Material thanks to Ion Stoica, Scott Shenker, Jennifer Rexford, Nick McKeown, and many other colleagues

  2. Logistics • Test is in this classroom starting at 5:40 exactly • Closed book, closed notes, etc. • Single two-sided “cheat sheet”, 8pt minimum • No calculators, electronic devices, etc. • Test does not require any complicated calculation • I will have extra office hours tomorrow, Oct 22. • 11am-1pm in 413 Soda Hall

  3. General Guidelines (1) • Test only assumes material covered in lecture & sections • Text: only to clarify details and context for the above • The test doesn’t require you to do complicated calculations or packet accounting • Use this as a hint to whether you are on the right track • You don’t need to memorize packet headers • We’ll provide the IP header for your reference on the exam sheet • You do need to understand how things work • not for the sake of knowing gory details but to understand pros/cons, when a solution is applicable/useful/useless, etc.

  4. General Guidelines (2) • Be prepared to: • Weigh design options outside of the context we studied them in e.g., I had a TCP connection, then BGP went nuts…” • Contemplate new designs we haven’t talked about • e.g., I introduce a new IP address format; how does this affect..” • e.g., I take a little bit of UDP, mix it with some TCP sliding window..” • Don’t let this daunt you. Reason from what you know about the pros/cons of solutions we did study • e.g., TCP is inefficient when…

  5. General Guidelines (3) • Exam format (tentative!) Q1) 20 multiple-choice questions • ordered (roughly) from easiest to hardest Q2) A set of “here’s a scenario, tell me if the following is true/false”-style questions • ordered (roughly) from easiest to hardest within each scenario Q3,4,5,6: more traditional questions • (we think) 3 < 4 < 5 < 6 (< implies easier than) • sub-questions within each question ordered easiest to hardest • Pace yourself accordingly.

  6. This Review • Walk through what we expect you to know: key topics, important aspects of each • Just because I didn’t cover it in review doesn’t mean you don’t need to know it • But if I covered it today, you should know it • My plan: summarize, not explain • Stop me when you want to discuss something further!

  7. Topics • Architecture: concepts and principles (lecs. 2, 3) • IP Routing (lecs. 4-9) • Overall context • Computing routes (DV, LS, path vector) • IP addressing • Inter-domain • Router architecture • Transport (lecs. 10-13) • Role of the transport layer • UDP vs. TCP • TCP details: reliability, flow and congestion control • Fairness and Router-assisted CC (lec. 13)

  8. Architecture • Concepts you should be familiar with • packet delays • packet vs. circuit switching • statistical multiplexing • layering • end-to-end argument and best-effort service

  9. Properties of Links • Bandwidth (capacity): “width” of the link • number of bits sent (or received) per unit time (bits/sec or bps) • Latency (delay): “length” of the link • propagation time for data to travel along the link (seconds) • Bandwidth-Delay Product (BDP): “volume” of the link • amount of data that can be “in flight” at any time delay x bandwidth bandwidth Latency

  10. Packet DelaySending a 100B packet from A to B? A B 1Mbps, 1ms 100Byte packet time=0 Time to transmit 800 bits=800x1/106s The last bit reaches B at (800x1/106)+1/103s = 1.8ms Packet Delay = Transmission Delay + Propagation Delay Packet Delay = (Packet Size ÷ Link Bandwidth) + Link Latency Time

  11. Circuit switching Idea: source reserves network capacity along a path (1) Node A sends a reservation request (2) Interior switches establish a connection -- i.e., “circuit” (3) A starts sending data (4) A sends a “teardown circuit” message B A

  12. Circuit switching: pros and cons • Pros • guaranteed performance • fast transfers (once circuit is established) • Cons • wastes bandwidth if traffic is “bursty” • connection setup adds delay • recovery from failure is slow

  13. Packet Switching • Data is sent as chunks of formatted bits (Packets) • Packets consist of a “header” and “payload” • Switches “forward” packets based on their headers • Each packet travels independently • No link resources are reserved in advance. Instead packet switching leverages statistical multiplexing

  14. Packet switching: pros and cons • Cons • no guaranteed performance • header overhead per packet • queues and queuing delays • Pros • efficient use of bandwidth (stat. muxing) • no overhead due to connection setup • resilient -- can `route around trouble’

  15. Statistical Multiplexing: Three Flows with Bursty Traffic Data Rate 1 Time Data Rate 2 Capacity Time Data Rate 3 Time

  16. When Each Flow Gets 1/3rd of Capacity Frequent Overloading Data Rate 1 Time Data Rate 2 Time Data Rate 3 Time

  17. When Flows Share Total Capacity Time No Overloading Time Time

  18. Statistical Multiplexing • Allows efficient use of network bandwidth • Relies on the assumption that not all flows burst at the same time • similar assumption and failure case as insurance • Queues absorb transient traffic bursts but also introduce queuing delay • We will not be asking you to do detailed calculations of queuing delay on the test

  19. Layering • Layering is a particular form of modularization • System is broken into a vertical hierarchy of logically distinct entities (layers) • Service provided by one layer is based solely on the service provided by layer below • Rigid structure: easy reuse, performance suffers

  20. Physical Network Application Transport Data link In the context of the Internet This is not a typo Applications …built on… Reliable (or unreliable) transport …built on… L7 Best-effort global packet delivery L4 L3 …built on… L2 Best-effort local packet delivery L1 …built on… Physical transfer of bits

  21. Physical Physical Network Network Application Application Transport Transport Data link Data link Protocols and Layers Communication between peer layers ondifferent systems is defined by protocols L7 L7 L4 L4 L3 L3 L2 L2 L1 L1

  22. User A User B Appl: Get index.html Trans: Connection ID Net: Source/Dest Link: Src/Dest Layer Encapsulation

  23. Application Application What gets implemented where? • Lower three layers implemented everywhere • Top two layers implemented only at hosts Transport Transport Network Network Network Datalink Datalink Datalink Physical Physical Physical Host A Router Host B

  24. Ethernet FDDI optical PPP UDP TCP NTP DNS SMTP HTTP IP radio Physical Network Application Transport Data link copper PSTN Protocols at different layers There is just one network-layer protocol, IP The “narrow waist” of the Internet hourglass L7 L4 L3 L2 L1

  25. Implications of Hourglass Benefits of a single network-layer protocol (IP) • Allows arbitrary networks to interoperate • Any network that supports IP can exchange packets • Decouples applications from low-level networking technologies • Applications function on allnetworks

  26. Benefits of Layering • Modularity allows abstraction and reuse • Narrow waist allows interoperability • Innovation at each layer can proceed in parallel

  27. Drawbacks of Layering • Rigid structure may hurt performance • Duplication of functionality • Information hiding • (Secondary) Headers start to get really big • Layer violations • for performance: e.g., TCP-over-wireless • for security: e.g., firewalls

  28. Summary of End-to-End Principle • Design principle guiding the placement of functionality in a (networked) system • Builds on observation that some application properties can only be correctly implemented end-to-end • Reliability, security, etc. • Supporting these properties in the network may be unwise • Doesn’t reduce host implementation complexity • Does increase network complexity • Might impose overhead on apps that don’t need the functionality • However, implementing in the network can improve performance in some cases • Key argument for why IP offers only “best-effort” delivery • Reliability implemented at the endhost (TCP)

  29. Topics • Architecture: concepts and principles (lecs. 2, 3) • IP Routing (lecs. 4-9) • Overall context • Computing routes (DV, LS, path vector) • IP addressing • Inter-domain • Router architecture • Transport (lecs. 10-13) • Role of the transport layer • UDP vs. TCP • TCP details: reliability, flow and congestion control • Fairness and Router-assisted CC (lec. 13)

  30. Context and Terminology “Autonomous System (AS)” or “Domain”Region of a network under a singleadministrative entity “End hosts” “Clients”, “Users” “End points” “BorderRouters” “Route” or“Path” “InteriorRouters”

  31. Internet Routing • Internet Routing works at two levels • Each AS runs an intra-domain routing protocol that establishes routes within its domain • Link State, e.g., Open Shortest Path First (OSPF) • Distance Vector, e.g., Routing Information Protocol (RIP) • ASes participate in an inter-domain routing protocolthat establishes routes between domains • Path Vector, e.g., Border Gateway Protocol (BGP)

  32. Link State Routing • Each node maintains its local “link state” (LS) • Each node floods its local link state • Hence, each node learns the entire network topology • Can use an algorithm such as Dijkstra’s to compute shortest paths • We won’t test your ability to solve Dijkstra’s under pressure • But you should know the high level properties of LS • every node maintains complete topology • link updates flooded everywhere • may have transient loops while nodes have inconsistent topology information

  33. Distance Vector Routing • Each router knows the links to its neighbors • Each router has provisional “least cost” estimate to every other router -- its distance vector (DV) • E.g.: Router A: “A can get to B with cost 11” • Routers exchange this DV with their neighbors • Routers look over the set of options offered by their neighbors and select the best one • Iterative process converges to set of shortest paths

  34. DV: You should understand • How DV works • what’s in a DV; how nodes process and update DVs • The counting to infinity problem • why it occurs • Poison Reverse • when it does/doesn’t fix counting-to-infinity

  35. C A B Link cost changes here DV: Link Cost Changes 60 4 1 50 via Stable state C sends its DV to A, B A-B changed B sends itsDV to A, C A sends its DV to B, C Node A to This is the “Counting to Infinity” Problem Node B Node C “bad news travels slowly” (not yet converged)

  36. C B A Link cost changes here DV: Poisoned Reverse 60 4 1 If B routes through C to get to A:B tells C its (B’s) distance to A is infinite 50 via Stable state C sends its DV to A, B A-B changed B sends itsDV to A, C A sends its DV to B, C Node A to Node B ∞ ∞ ∞ ∞ ∞ ∞ Node C ∞ ∞ ∞ ∞ Converges after C receives another update from B

  37. “Count to Infinity”: root cause A B C • C’s path to A goes via B • C advertises its distance-to-A to B • When B’s link to A increases in cost; B thinks it can get to A via C at a lower cost

  38. “Poison Reverse”: key idea A B C • C’s path to A goes via B • C tells B its distance to A is infinity • When B’s link to A increases in cost; B no longerthinks it can get to A via C at a lower cost

  39. Topics • Architecture: concepts and principles (lecs. 2, 3) • IP Routing (lecs. 4-9) • Overall context • Computing routes (DV, LS, path vector) • IP addressing • Inter-domain • Router architecture • Transport (lecs. 10-13) • Role of the transport layer • UDP vs. TCP • TCP details: reliability, flow and congestion control • Fairness and Router-assisted CC (lec. 13)

  40. Addressing Goal: ScalableRouting • State: Small forwarding tables at routers • Much less than the number of hosts • Churn: Limited rate of change in routing tables • Traffic, inconsistencies, complexity Ability to aggregate addresses iscrucial for both (one entry to summarize many addresses)

  41. 00001100 00100010 10011110 00000101 Hierarchy in IP Addressing • 32 bits are partitioned into a prefix and suffix components • Prefix is the network component; suffix is host component • Interdomain routing operates on the network prefix • “slash” notation: 12.34.158.0/23  network with a 23 bitprefix and 29 host addresses 12 34 158 5 Network (23 bits) Host (9 bits)

  42. IP addressing  scalable routing? • Hierarchical address allocation helps routing scalability if allocation matches topological hierarchy • Problem: may not be able to aggregate addresses for “multi-homed” networks • similar problem with mobile hosts • Two competing forces in scalable routing • aggregation reduces number of routing entries • multi-homing increases number of entries

  43. BGPand Inter-Domain Routing • Destinations are IP prefixes (12.0.0.0/8) • Nodes are Autonomous Systems (ASes) • Links represent both physical connections and business relationships • customer-provider or peer-to-peer • BGP is the protocol for inter-domain routing • path-vector protocol • policy-driven route selection

  44. BGP extends DV • With some important differences • routes selected based on policy, not just shortest path • path vector (useful to avoid loops) • may aggregate routes (aggregating prefixes)

  45. Topology and policy is shaped by the business relationships between ASes • Three basic kinds of relationships between ASes • AS A can be AS B’s customer • AS A can be AS B’s provider • AS A can be AS B’s peer • Business implications • Customer pays provider • Peers don’t pay each other • Exchange roughly equal traffic

  46. Route export Policy imposed in how routes are selected and exported • Selection: Which path to use? • controls whether/how traffic leaves the network • Export: Which path to advertise? • controls whether/how traffic enters the network Route selection Customer 1 Can reach 128.3/16 blah blah 10 Competitor 5

  47. Typical Export Policy We’ll refer to these as the “Gao-Rexford” rules (capture common -- but not required! -- practice!) You must know this!

  48. Typical Selection Policy • In decreasing order of priority • make/save money (send to customer > peer > provider) • maximize performance (smallest AS path length) • minimize use of my network bandwidth (“hot potato”) • … • BGP uses route attributes to implement the above • ASPATH, LOCAL_PREF, MED, … You should know the general idea/goal for each attribute; we won’t quiz you on the detailed implementation

  49. Policy Dictates Route Selection Pr Cu Q Peer Peer • ASesprovide “transit” between their customers • Peers do not provide transit between other peers A B C D E F traffic not allowed traffic allowed

  50. 20 Bytes of Standard Header, then Options 4-bit Header Length 8-bit Type of Service (TOS) 4-bit Version 16-bit Total Length (Bytes) 3-bit Flags 16-bit Identification 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload

More Related