Week2.1

739 views
620 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
739
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Datagrams
  • Source routing Broadcast
  • Circuit switched.
  • Do Multiaccess problem for: smoke signals, radio, ethernet When can I tell there is a collision? Does everyone know there is a collision? [if not, I might get screwed]
  • Week2.1

    1. 1. Chapter 1IntroductionA note on the use of these ppt slides:We’re making these slides freely available to all (faculty, students, readers).They’re in PowerPoint form so you can add, modify, and delete slides(including this one) and slide content to suit your needs. They obviously Computer Networking:represent a lot of work on our part. In return for use, we only ask the A Top Down Approach ,following: If you use these slides (e.g., in a class) in substantially unaltered form, 3rd/5th edition.that you mention their source (after all, we’d like people to use our book!) Jim Kurose, Keith Ross If you post any slides in substantially unaltered form on a www site, thatyou note that they are adapted from (or perhaps identical to) our slides, and Pearson/Addison-note our copyright of this material. Wesley, April 2009.Thanks and enjoy! JFK/KWRAll material copyright 1996-2009J.F Kurose and K.W. Ross, All Rights Reserved Introduction 1-1
    2. 2. Goals Examine the Types of Network Models Understand nature of an Internet Protocol Introduction 1-2
    3. 3. Postal System • Verify postage • “Route” letter Take letter to local post office• Write address Drop letter• Put stamp• Close envelop Take letter to destination’s postal office Take letter to Check destination• Check address destination address 3• Open envelope
    4. 4. Other Information NetworksSending messages by birds Fire signals 4
    5. 5. Other Networks 5
    6. 6. Taxonomy of Communication Networks Communication networks can be classified based on the way in which the nodes exchange information: Skeleton View of Internet 6
    7. 7. Taxonomy of Communication Networks Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Broadcast Communication Network 7
    8. 8. Broadcast Communication Networks • Information transmitted by any node is received by every other node in the network – Usually only in LANs (Local Area Networks)  E.g., WiFi, Ethernet (classical, but not current)  E.g., lecture! • What problems does this raise? • Problem #1: limited range (the killer) • Problem #2: privacy of communication • Problem #3: coordinating access to the shared communication medium (Multiple Access Problem) 8
    9. 9. Taxonomy of Communication Networks Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Broadcast Communication Communication Network Network 9
    10. 10. Switched Communication Networks Information transmitted along a path of intermediary nodes “switches” or “routers” Each switch acts as a small switchboard Information comes in on one link Switch directs it out some other link Basic issue: how do the switches figure out the next hop along the path? 10
    11. 11. Taxonomy of Communication Networks Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Broadcast Communication Communication Network Network Circuit-Switched Communication Network 11
    12. 12. Circuit SwitchingEnd-end resources reserved for “call” link bandwidth, switch capacity dedicated resources: no sharing circuit-like (guaranteed) performance call setup required Introduction 1-12
    13. 13. Circuit Switchingnetwork resources  dividing link bandwidth (e.g., bandwidth) into “pieces” divided into “pieces”  frequency division pieces allocated to calls  time division resource pieceidle if not used by owning call (no sharing) Introduction 1-13
    14. 14. Circuit Switching (e.g., Phone Network)• Establish: source creates circuit to destination – Nodes along the path store connection info – Nodes generally reserve resources for the connection – If circuit not available: “Busy signal”• Transfer: source sends data over the circuit – No destination address, since nodes know path• Teardown: source tears down circuit when done 14
    15. 15. Circuit Switching With Human Operator 15
    16. 16. Telephone Network Almon Brown Strowger (1839 - 1902) 1889: Invents the mechanical switching system for telephone network
    17. 17. Timing in Circuit Switching Host 1 Host 2 Switch 1 Switch 2 time 17
    18. 18. Timing in Circuit Switching Host 1 Host 2 Switch 1 Switch 2 propagation delay between Host 1 Circuit and Switch1 Establishment time 18
    19. 19. Timing in Circuit Switching Host 1 Host 2 Switch 1 Switch 2 Transmission delay propagation delay between Host 1 Circuit and Switch1 Establishment time 19
    20. 20. Timing in Circuit Switching Host 1 Host 2 Switch 1 Switch 2 Transmission delay propagation delay between Host 1 Circuit and Switch1 Establishment time 20
    21. 21. Timing in Circuit Switching Host 1 Host 2 Switch 1 Switch 2 Transmission delay propagation delay between Host 1 Circuit and Switch1 Establishment propagation delay between Host 1 and Host 2 time 21
    22. 22. Timing in Circuit Switching Host 1 Host 2 Switch 1 Switch 2 Transmission delay propagation delay between Host 1 Circuit and Switch1 Establishment propagation delay between Host 1 and Host 2 Transfer Information time 22
    23. 23. Timing in Circuit Switching Host 1 Host 2 Switch 1 Switch 2 Transmission delay propagation delay between Host 1 Circuit and Switch1 Establishment propagation delay between Host 1 and Host 2 Transfer Information time Circuit Teardown 23
    24. 24. Circuit Switching• Node (switch) in a circuit switching network incoming links Node outgoing links How do the black and orange circuits share the outgoing link? 24
    25. 25. Circuit Switching: Multiplexing a Link• Time-division • Frequency-division – Each circuit allocated – Each circuit allocated certain time slots certain frequencies frequency time time 25
    26. 26. Time-Division Multiplexing Illustration Frames Slots = 0 1 2 3 4 5 0 1 2 3 4 5 • Time divided into frames; frames into slots • Relative slot position inside a frame determines to which conversation data belongs – E.g., slot 0 belongs to orange conversation • Requires synchronization between sender and receiver— surprisingly non-trivial! • In case of non-permanent conversations – Need to dynamically bind a slot to a conversation • If a conversation does not use its circuit the capacity is lost! 26
    27. 27. Taxonomy of Communication Networks Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Broadcast Communication Communication Network Network Circuit-Switched Packet-Switched Communication Communication Network Network 27
    28. 28. Packet Switchingeach end-end data stream resource contention: divided into packets  aggregate resource user A, B packets share demand can exceed network resources amount available each packet uses full link  congestion: packets bandwidth queue, wait for link use resources used as needed  store and forward: packets move one hop at a timeBandwidth division into “pieces”  Node receives complete Dedicated allocation packet before forwarding Resource reservation Introduction 1-28
    29. 29. Packet Switching• Data sent as chunks of formatted bit-sequences (Packets)• Packets have following structure: Header Data Trailer (sometimes)  Header and Trailer carry control information (e.g., destination address, checksum)• Each packet traverses the network from node to node along some path (Routing) based on header info.• Usually, once a node receives the entire packet, it stores it (hopefully briefly) and then forwards it to the next node (Store-and-Forward Networks) 29
    30. 30. Packet Switching• Node in a packet switching network incoming links Node outgoing links Memory 30
    31. 31. Packet-switching: store-and-forward L R R R takes L/R seconds to Example: transmit (push out)  L = 7.5 Mbits packet of L bits on to  R = 1.5 Mbps link at R bps  transmission delay = 15 store and forward: sec entire packet must arrive at router before it can be transmitted on next link delay = 3L/R (assuming more on delay shortly … zero propagation delay) Introduction 1-31
    32. 32. Packet Switching: Statistical Multiplexing 100 Mb/s A Ethernet statistical multiplexing C 1.5 Mb/s B queue of packets waiting for output link D ESequence of A & B packets does not have fixed pattern, bandwidth shared on demand ² statistical multiplexing.TDM: each host gets same slot in revolving TDM frame. Introduction 1-32
    33. 33. Packet Switching: Multiplexing/Demultiplexing• Data from any conversation can be transmitted at any given time – Single conversation can use the entire link capacity if it is alone• How to tell them apart? – Use meta-data (header) to describe data 33
    34. 34. Taxonomy of Communication Networks Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Broadcast Communication Communication Network Network Circuit-Switched Packet-Switched Communication Communication Network Network Datagram Network 34
    35. 35. Datagram Packet SwitchingEach packet is independently switchedEach packet header contains full destination addressNo resources are pre-allocated (reserved) inadvanceLeverages “statistical multiplexing” (or stat-muxing)Gambling that packets from different conversations won’tall arrive at the same time, so we don’t need enoughcapacity for all of them at their peak transmission rateAssuming independence of traffic sources, can computeprobability that there is enough capacityExample: IP networks; postal system 35
    36. 36. Timing of Datagram Packet Switching Host 1 Host 2 Node 1 Node 2 propagation delay between Host 1 and Packet 1 Node 1 36
    37. 37. Timing of Datagram Packet Switching Host 1 Host 2 Node 1 Node 2 propagation delay betweentransmission Host 1 andtime of Packet 1 Packet 1at Host 1 Node 1 37
    38. 38. Timing of Datagram Packet Switching Host 1 Host 2 Node 1 Node 2 propagation delay betweentransmission Host 1 andtime of Packet 1 Packet 1 processingat Host 1 Node 1 Packet 1 delay of Packet 1 at Node 2 Packet 1 38
    39. 39. Timing of Datagram Packet Switching Host 1 Host 2 Node 1 Node 2 propagation delay betweentransmission Host 1 andtime of Packet 1 Packet 1 processingat Host 1 Node 1 Packet 2 Packet 1 delay of Packet 3 Packet 1 Packet 2 at Node 2 Packet 1 Packet 3 Packet 2 Packet 3 39
    40. 40. Datagram Packet Switching Host C Host A Host D Node 1 Node 2 Node 3 Node 5 Host B Node 7 Host E Node 6 Node 4 40
    41. 41. Datagram Packet Switching Host C Host A Host D Node 1 Node 2 Node 3 Node 5 Host B Node 7 Host E Node 6 Node 4 41
    42. 42. Datagram Packet Switching Host C Host A Host D Node 1 Node 2 Node 3 Node 5 Host B Node 7 Host E Node 6 Node 4 42
    43. 43. Taxonomy of Communication Networks Communication networks can be classified based on the way in which the nodes exchange information: Communication Network Switched Broadcast Communication Communication Network Network A hybrid of circuits and Circuit-Switched Packet-Switched packets; headers include a Communication Communication “circuit identifier” established Network Network during a setup phase Datagram Virtual Circuit Network Network 43
    44. 44. Advantages of Circuit Switching• Guaranteed bandwidth – Predictable communication performance – Not “best-effort” delivery with no real guarantees• Simple abstraction – Reliable communication channel between hosts – No worries about lost or out-of-order packets• Simple forwarding – Forwarding based on time slot or frequency – No need to inspect a packet header• Low per-packet overhead – Forwarding based on time slot or frequency – No IP (and TCP/UDP) header on each packet 44
    45. 45. Disadvantages of CircuitSwitching• Wasted bandwidth – Bursty traffic leads to idle connection during silent period – Unable to achieve gains from “statistical multiplexing”• Blocked connections – Connection refused when resources are not sufficient – Unable to offer “okay” service to everybody• Connection set-up delay – No communication until the connection is set up – Unable to avoid extra latency for small data transfers• Network state – Network nodes must store per-connection information – Unable to avoid per-connection storage and state – This makes failures more disruptive! 45
    46. 46. Packet-Switching vs. Circuit-Switching• Performance advantage of packet-switching over circuit switching: Exploitation of statistical multiplexing• Reliability advantage: since routers don’t know about individual conversations, when a router or link fails, it’s: Easy to fail over to a different path• Deployability advantage: easier for different parties to link their networks together because they’re not promising to reserve resources for one another• Disadvantage: packet-switching must handle congestion – More complex routers (more buffering, sophisticated dropping) – Harder to provide good network services (e.g., delay and bandwidth guarantees) 46
    47. 47. Packet switching versus circuit switchingPacket switching allows more users to use network!  1 Mb/s link  each user:  100 kb/s when “active”  active 10% of time N users  circuit-switching: 1 Mbps link  10 users  packet switching:  with 35 users, probability > 10 active at same time is less than .0004 (leave as Introduction exercise) 1-47
    48. 48. Packet switching versus circuit switching Is packet switching an outright winner?  great for bursty data resource sharing  simpler, no call setup  excessive congestion: packet delay and loss  protocols needed for reliable data transfer, congestion control  Q: How to provide circuit-like behavior?  bandwidth guarantees needed for audio/video apps  still an unsolved problem (chapter 7)Q: human analogies of reserved resources (circuitswitching) versus on-demand allocation (packet-switching)? Introduction 1-48
    49. 49. CombinationsCan a packet switched network run over a circuit-switched one?Can a circuit-switched network run over a packet-switched one? 49
    50. 50. What’s a protocol?human protocols: network protocols: “what’s the time?”  machines rather than “I have a question” humans introductions  all communication activity in Internet governed by protocols… specific msgs sent… specific actions protocols define format, taken when msgs order of msgs sent and received, or other received among network events entities, and actions taken on msg transmission, receipt Introduction 1-50
    51. 51. What’s a protocol?a human protocol and a computer network protocol: Hi TCP connection request Hi TCP connection Got the response time? Get http://www.awl.com/kurose-ross 2:00 <file> time Q: Other human protocols? Introduction 1-51
    52. 52. What Is A Protocol?• A protocol is an agreement on how to communicate• Includes syntax and semantics – How a communication is specified & structured  Format, order messages are sent and received – What a communication means  Actions taken when transmitting, receiving, or when a timer expires 52
    53. 53. Examples of Protocols in Human Interactions• Telephone 1. (Pick up / open up the phone.) 2. Listen for a dial tone / see that you have service. 3. Dial. 4. Should hear ringing … 5. Callee: “Hello?” – Caller: “Hi, it’s Alice ….” Or: “Hi, it’s me” (← what’s that about?) – Caller: “Hey, do you think … blah blah blah …” pause – Callee: “Yeah, blah blah blah …” pause 53
    54. 54. Examples of Protocols in Human Interactions• Asking a question 1. Raise your hand. 2. Wait to be called on. – Or: wait for speaker to pause and vocalize 54
    55. 55. Example: HyperText Transfer Protocol GET /courses/archive/spring06/cos461/ HTTP/1.1 Host: www.cs.princeton.edu User-Agent: Mozilla/4.03 Request CRLF HTTP/1.1 200 OK Date: Mon, 6 Feb 2006 13:09:03 GMT Server: Netscape-Enterprise/3.5.1 Last-Modified: Mon, 6 Feb 2006 11:12:23 GMTResponse Content-Length: 21 CRLF Site under construction 55
    56. 56. Example: The Internet Protocol (IP)Problem:Many different network technologiese.g., Ethernet, Token Ring, ATM, Frame Relay, etc.How can you hook them together? • n x n translations?IP was invented to glue them togethern translationsMinimal requirements (datagram)The Internet is founded on IP“IP over everything” 56
    57. 57. What does an internet protocoldo?What would the protocol need to communicate? 57
    58. 58. Example: IP Packet 4-bit 4-bit Header 8-bit Type of 16-bit Total Length (Bytes) Version Length Service (TOS) 3-bit 16-bit Identification 13-bit Fragment Offset Flags 8-bit Time to 8-bit Protocol 16-bit Header Checksum 20-byte Live (TTL) header 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload 58
    59. 59. Example: IP: “Best-Effort” Packet Delivery Protocol Datagram packet switching Send data in packets Header with source & destination address Service it provides: Packets may be lost Packets may be corrupted Packets may be delivered out of ordersource destination IP network 59
    60. 60. Example: Transmission Control Protocol • Communication service – Ordered, reliable byte stream – Simultaneous transmission in both directions • Key mechanisms at end hosts – Retransmit lost and corrupted packets – Discard duplicate packets and put packets in order – Flow control to avoid overloading the receiver buffer – Congestion control to adapt sending rate to network load TCP connection source network destination 60
    61. 61. Protocol Standardization• Ensure communicating hosts speak the same protocol – Standardization to enable multiple implementations – Or, the same folks have to write all the software• Standardization: Internet Engineering Task Force – Based on working groups that focus on specific issues – Produces “Request For Comments” (RFCs)  Promoted to standards via rough consensus and running code – IETF Web site is http://www.ietf.org – RFCs archived at http://www.rfc-editor.org• De facto standards: same folks writing the code – P2P file sharing, Skype, <your protocol here>… 61
    62. 62. SummaryExamined the types of Communication NetworksGot introduced to the concept of protocol
    63. 63. Acknowledgment & CopyrightThe instructor duly acknowledges the authors of the text book “Computer Networking: A Top- down approach”, James Kurose & Keith Ross and the instructors of EE122 “Computer Networks” course at UC Berkeley, Ian Stoica, Scott Shenker, Jennifer Rexford, Vern Paxson and other instructors at Princeton University for the course material.Please note: certain modifications may have been done to adapt the slides to the current audience -Bruhadeshwar @cs335 Spring 2011(C)

    ×