Governing Communication


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Governing Communication

  1. 1. CMPE 151: Network Administration Lecture 2
  2. 2. Review? <ul><li>Network protocols. </li></ul><ul><li>TCP/IP. </li></ul>
  3. 3. Outline <ul><li>Network protocols. </li></ul><ul><li>IP </li></ul><ul><li>TCP </li></ul>
  4. 4. What are protocols? <ul><li>Set of rules governing communication between network elements (applications, hosts, routers). </li></ul><ul><li>Protocols define: </li></ul><ul><ul><li>Format and order of messages. </li></ul></ul><ul><ul><li>Actions taken on receipt of a message. </li></ul></ul><ul><li>Protocols are hard to design </li></ul><ul><ul><li>We need design guidelines! </li></ul></ul>
  5. 5. Protocol stack Host Host Application Transport Network Link User A User B Teleconferencing Layering: technique to simplify complex systems Peers
  6. 6. Layering Characteristics <ul><li>Each layer relies on services from layer below and exports services to layer above. </li></ul><ul><li>Interface defines interaction, </li></ul><ul><li>Hides implementation - layers can change without disturbing other layers (black box). </li></ul>
  7. 7. Encapsulation
  8. 8. OSI Model: 7 Protocol Layers <ul><li>Physical: how to transmit bits </li></ul><ul><li>Data link: how to transmit frames </li></ul><ul><li>Network: how to route packets hop2hop </li></ul><ul><li>Transport: how to send packets end2end </li></ul><ul><li>Session: how to tie flows together </li></ul><ul><li>Presentation: byte ordering, security </li></ul><ul><li>Application: everything else! </li></ul>
  9. 9. Layering Functionality <ul><li>Reliability </li></ul><ul><li>Flow control </li></ul><ul><li>Fragmentation </li></ul><ul><li>Multiplexing </li></ul><ul><li>Connection setup (handshaking) </li></ul><ul><li>Addressing/naming (locating peers) </li></ul>
  10. 10. Example: Transport layer <ul><li>First end-to-end layer. </li></ul><ul><li>End-to-end state. </li></ul><ul><li>May provide reliability, flow and congestion control. </li></ul>
  11. 11. Example: Network Layer <ul><li>Point-to-point communication. </li></ul><ul><li>Network and host addressing. </li></ul><ul><li>Routing. </li></ul>
  12. 12. Internetworking
  13. 13. Internetworking <ul><li>Interconnection of 2 or more networks forming an internetwork, or internet. </li></ul><ul><ul><li>LANs, MANs, and WANs. </li></ul></ul><ul><li>Different networks mean different protocols. </li></ul><ul><ul><li>TCP/IP, IBM’s SNA, DEC’s DECnet, ATM, Novell and AppleTalk. </li></ul></ul>
  14. 14. Internetworks (cont’d)
  15. 15. TCP/IP <ul><li>TCP/IP is the most widely used internetworking protocol suite </li></ul><ul><ul><li>Initially funded through ARPA. </li></ul></ul><ul><ul><li>Picked up by NSF. </li></ul></ul><ul><ul><li>Used in the Internet. </li></ul></ul><ul><li>Other internetworking protocols exist but are less used </li></ul><ul><ul><li>Example: AppleTalk, X.25, etc. </li></ul></ul>
  16. 16. IP
  17. 17. The Internet Protocol: IP <ul><li>Glues Internet together. </li></ul><ul><li>Common network-layer protocol spoken by all Internet participating networks. </li></ul><ul><li>Best effort datagram service: </li></ul><ul><ul><li>No reliability guarantees. </li></ul></ul><ul><ul><li>No ordering guarantees. </li></ul></ul>
  18. 18. IP (cont’d) <ul><li>IP is responsible for datagram routing. </li></ul><ul><li>Important : each datagram is routed independently! </li></ul><ul><ul><li>Two different datagrams from same source to same destination can take different routes! </li></ul></ul><ul><ul><li>Why? </li></ul></ul><ul><ul><li>Implications? </li></ul></ul>
  19. 19. IP (cont’d) <ul><li>IP provides a best effort delivery mechanism </li></ul><ul><ul><li>Does not guarantee to prevent duplicate datagrams, delayed and out-of-order delivery, corruption of data or datagram loss </li></ul></ul><ul><li>Reliable delivery is provided by the transport layer , not the network layer (IP) </li></ul><ul><li>Network layer (IP) can detect and report errors without actually fixing them </li></ul>
  20. 20. The Internet Protocol Router Router Host Host Application Transport Network IP IP IP IP Network
  21. 21. Datagrams <ul><li>Transport layer breaks data streams into datagrams which are transmitted over Internet, possibly being fragmented. </li></ul><ul><li>When all datagram fragments arrive at destination, reassembled by network layer and delivered to transport layer at destination host. </li></ul>
  22. 22. IP Datagram Format <ul><li>IP datagram consists of header and data (or payload). </li></ul><ul><li>Header: </li></ul><ul><ul><li>20-byte fixed (mandatory) part. </li></ul></ul><ul><ul><li>Variable length optional part. </li></ul></ul>
  23. 23. IP Versions <ul><li>IPv4: IP version 4. </li></ul><ul><ul><li>Current, predominant version. </li></ul></ul><ul><ul><li>32-bit long addresses. </li></ul></ul><ul><li>IPv6: IP version 6. </li></ul><ul><ul><li>Evolution of IPv4. </li></ul></ul><ul><ul><li>Longer addresses (16-byte long). </li></ul></ul>
  24. 24. IP(v4) Header Format Header Payload
  25. 25. Encapsulation <ul><li>Each datagram is encapsulated within a data link layer frame </li></ul><ul><ul><li>The whole datagram is placed in the data area of the frame. </li></ul></ul><ul><ul><li>The data link layer addresses for source and destination included in the frame header. </li></ul></ul>
  26. 26. Encapsulation - Example
  27. 27. Encapsulation Across Multiple Hops <ul><li>Each router in the path from source to destination: </li></ul><ul><ul><li>Decapsulates datagram from incoming frame. </li></ul></ul><ul><ul><li>Forwards datagram - determines next hop. </li></ul></ul><ul><ul><li>Encapsulate datagram in outgoing frame. </li></ul></ul>
  28. 28. Encapsulation Across Multiple Hops - Example
  29. 29. Maximum Transfer Unit <ul><li>Each data link layer technology specifies the maximum size of a frame. </li></ul><ul><ul><li>Called the Maximum Transfer Unit (MTU). </li></ul></ul><ul><ul><ul><li>Ethernet: 1,500 bytes. </li></ul></ul></ul><ul><ul><ul><li>Token Ring: 2048 or 4096 bytes. </li></ul></ul></ul><ul><li>What happens when large packet wants to travel through network with smaller MTU? </li></ul><ul><ul><li>Maximum payloads (data portion of datagram) range from 48 bytes (ATM cells) to 64Kbytes (IP packets). </li></ul></ul>
  30. 30. Fragmentation <ul><li>Another solution (used by IP): fragmentation. </li></ul><ul><li>Gateways break packets into fragments to fit the network’s MTU ; each sent as separate datagram. </li></ul><ul><li>Gateway on the other side have to reassemble fragments into original datagram. </li></ul>
  31. 31. Keeping Track of Fragments <ul><li>Fragments must be numbered so that original data stream can be reconstructed. </li></ul><ul><li>Define elementary fragment size that can pass through every network. </li></ul><ul><li>When packet fragmented, all pieces equal to elementary fragment size, except last one (may be smaller). </li></ul><ul><li>Datagram may contain several fragments. </li></ul>
  32. 32. Fragmentation - Example
  33. 33. Addressing
  34. 34. Universal Addressing <ul><li>One key aspect of internetworks is unique addresses. </li></ul><ul><li>Sending host puts destination internetworking address in the packet. </li></ul><ul><li>Destination addresses can be interpreted by any intermediate router/gateway. </li></ul><ul><li>Router/gateway examines address and forwards packet on to the destination. </li></ul>
  35. 35. IP Addresses <ul><li>Each machine on the Internet has a unique IP address. </li></ul><ul><li>The IP address is different from the “physical” /“MAC” address. </li></ul><ul><ul><li>The “physical address” is the address of a computer (actually, of a NIC) in the LAN. </li></ul></ul><ul><ul><ul><li>It is only know within the LAN. </li></ul></ul></ul><ul><ul><li>The IP address is a universal address. </li></ul></ul><ul><ul><li>When a packet arrives in a LAN, there needs to be a conversion from IP to MAC address (local “ address resolution ”). </li></ul></ul>
  36. 36. IP Addresses (cont’d) <ul><li>An IP address is represented by a binary number with 32 bits (in IPv4). </li></ul><ul><ul><li>Meaning that there are around 4 billion addresses. </li></ul></ul><ul><ul><li>Often IP addresses are represented in “dotted decimal”, such as </li></ul></ul><ul><ul><ul><li>Each group of numbers can go from 0 to 255. </li></ul></ul></ul>
  37. 37. IP Address Organization <ul><li>Each IP address is divided into a prefix and a suffix </li></ul><ul><ul><li>Prefix identifies network to which computers are attached. </li></ul></ul><ul><ul><li>Suffix identifies computers within that network. </li></ul></ul>
  38. 38. Network and Host Numbers <ul><li>Every network in a TCP/IP internet is assigned a unique network number. </li></ul><ul><li>Each host on a specific network is assigned a host address that is unique within that network. </li></ul><ul><li>Host’s IP address is the combination of the network number (prefix) and host address (suffix). </li></ul><ul><li>Assignment of network numbers must be coordinated globally; assignment of host addresses can be managed locally. </li></ul>
  39. 39. IP Address Format <ul><li>IP address are 32 bits long. </li></ul><ul><li>There are different classes of addresses , corresponding to different subdivisions of the 32 bits into prefix and suffix. </li></ul><ul><ul><li>Some address classes have large prefix , small suffix. </li></ul></ul><ul><ul><ul><li>Many such networks, few hosts per network. </li></ul></ul></ul><ul><ul><li>Other address classes have small prefix, large suffix. </li></ul></ul><ul><ul><ul><li>Few such networks, many hosts per network. </li></ul></ul></ul>
  40. 40. IP Address Format (cont’d) <ul><li>How can we recognize to which class an IP address belongs to? </li></ul><ul><ul><li>Look at the first 4 bits! </li></ul></ul>
  41. 41. IP Address Format (cont’d) <ul><li>Class A, B and C are primary classes. </li></ul><ul><ul><li>Used for ordinary addressing. </li></ul></ul><ul><li>Class D is used for multicast , which is a limited form of broadcast. </li></ul><ul><ul><li>Internet hosts join a multicast group. </li></ul></ul><ul><ul><li>Packets are delivered to all members of the group. </li></ul></ul><ul><ul><li>Routers manage delivery of single packets from source to all members of multicast group. </li></ul></ul><ul><li>Class E is reserved. </li></ul>
  42. 42. IP Addresses (cont’d) <ul><li>Another way to determine the address class is by looking at the first group of numbers in the dotted decimal notation </li></ul>
  43. 43. Networks and Hosts in Each Class
  44. 44. Understanding IP Addresses <ul><li>Examples: </li></ul><ul><ul><li>10 . 0.0.37 (class A) </li></ul></ul><ul><ul><li>128.10 . 0.1 (class B) </li></ul></ul><ul><ul><li>192.5.48 . 3 (class C) </li></ul></ul>
  45. 45. IP addresses: how to get one? <ul><li>ICANN (Internet Corporation for Assigned Names and Numbers) coordinate IP address assignment. </li></ul><ul><li>How does host get its IP address in the network? 2 possibilities: </li></ul><ul><ul><li>1: Hard-coded by system administrator in a file inside the host. </li></ul></ul><ul><ul><li>2: DHCP : “Dynamic Host Configuration Protocol” </li></ul></ul><ul><ul><ul><li>Dynamically get address: “plug-and-play”. </li></ul></ul></ul>
  46. 46. DHCP <ul><li>DHCP allows a computer to join a new network and automatically obtain an IP address The network administrator establishes a pool of addresses for DHCP to assign. </li></ul><ul><li>When a computer boots, it broadcasts a DHCP request to which a server sends a DHCP reply. </li></ul>
  47. 47. DHCP (Cont’d) <ul><li>DHCP allows non-mobile computers that run server software to be assigned a permanent address (won’t change when the computer reboots). </li></ul><ul><ul><li>The permanent address actually needs to be re-negotiated after a certain period of time. </li></ul></ul>
  48. 48. The Internet Transport Protocols: TCP and UDP <ul><li>UDP: user datagram protocol (RFC 768). </li></ul><ul><ul><li>Connection-less protocol. </li></ul></ul><ul><li>TCP: transmission control protocol (RFCs 793, 1122, 1323). </li></ul><ul><ul><li>Connection-oriented protocol. </li></ul></ul>
  49. 49. UDP <ul><li>Provides connection-less, unreliable service. </li></ul><ul><ul><li>No delivery guarantees. </li></ul></ul><ul><ul><li>No ordering guarantees. </li></ul></ul><ul><ul><li>No duplicate detection. </li></ul></ul><ul><li>Low overhead. </li></ul><ul><ul><li>No connection establishment/teardown. </li></ul></ul><ul><li>Suitable for short-lived connections. </li></ul><ul><ul><li>Example: client-server applications. </li></ul></ul>
  50. 50. TCP <ul><li>Reliable end-to-end communication. </li></ul><ul><li>TCP transport entity: </li></ul><ul><ul><li>Runs on machine that supports TCP. </li></ul></ul><ul><ul><li>Interfaces to the IP layer. </li></ul></ul><ul><ul><li>Manages TCP streams. </li></ul></ul><ul><ul><ul><li>Accepts user data, breaks it down and sends it as separate IP datagrams. </li></ul></ul></ul><ul><ul><ul><li>At receiver, reconstructs original byte stream from IP datagrams. </li></ul></ul></ul>
  51. 51. TCP Reliability <ul><li>Reliable delivery. </li></ul><ul><ul><li>ACKs. </li></ul></ul><ul><ul><li>Timeouts and retransmissions. </li></ul></ul><ul><li>Ordered delivery. </li></ul>
  52. 52. TCP Service Model 1 <ul><li>Obtained by creating TCP end points. </li></ul><ul><ul><li>Example: UNIX sockets. </li></ul></ul><ul><ul><li>Socket number or address: IP address + 16-bit port number (TSAP). </li></ul></ul><ul><ul><li>Multiple connections can terminate at same socket. </li></ul></ul><ul><ul><li>Connections identified by socket ids at both ends. </li></ul></ul><ul><ul><li>Port numbers below 1024: well-known ports reserved for standard services. </li></ul></ul><ul><ul><ul><li>List of well-known ports in RFC 1700. </li></ul></ul></ul>
  53. 53. TCP Service Model 2 <ul><li>TCP connections are full-duplex and point-to-point. </li></ul><ul><li>Byte stream (not message stream). </li></ul><ul><ul><li>Message boundaries are not preserved e2e. </li></ul></ul>A B C D 4 512-byte segments sent as separate IP datagrams A B C D 2048 bytes of data delivered to application in single READ
  54. 54. TCP Byte Stream <ul><li>When application passes data to TCP, it may send it immediately or buffer it. </li></ul><ul><li>Sometimes application wants to send data immediately. </li></ul><ul><ul><li>Example: interactive applications. </li></ul></ul><ul><ul><li>Use PUSH flag to force transmission. </li></ul></ul><ul><ul><li>TCP could still bundle PUSH data together (e.g., if it cannot transmit it right away). </li></ul></ul><ul><li>URGENT flag. </li></ul><ul><ul><li>Also forces TCP to transmit at once. </li></ul></ul>
  55. 55. TCP Protocol Overview 1 <ul><li>TCP’s TPDU: segment. </li></ul><ul><ul><li>20-byte header + options. </li></ul></ul><ul><ul><li>Data. </li></ul></ul><ul><li>TCP entity decides the size of segment. </li></ul><ul><ul><li>2 limits: 64KByte IP payload and MTU. </li></ul></ul><ul><ul><li>Segments that are too large are fragmented. </li></ul></ul><ul><ul><ul><li>More overhead by addition of IP header. </li></ul></ul></ul>
  56. 56. TCP Protocol Overview 2 <ul><li>Sequence numbers. </li></ul><ul><ul><li>Reliability, ordering, and flow control. </li></ul></ul><ul><ul><li>Assigned to every byte . </li></ul></ul><ul><ul><li>32-bit sequence numbers. </li></ul></ul>
  57. 57. TCP Connection Setup <ul><li>3-way handshake. </li></ul>Host 1 Host 2 SYN (SEQ=x) SYN(SEQ=y,ACK=x+1) (SEQ=x+1, ACK=y+1)
  58. 58. TCP Connection Release 1 <ul><li>Abrupt release: </li></ul><ul><ul><li>Send RESET. </li></ul></ul><ul><ul><li>May cause data loss. </li></ul></ul>
  59. 59. TCP Connection Release 2 <ul><li>Graceful release: </li></ul><ul><ul><li>Each side of the connection released independently. </li></ul></ul><ul><ul><ul><li>Either side send TCP segment with FIN=1. </li></ul></ul></ul><ul><ul><ul><li>When FIN acknowledged, that direction is shut down for data. </li></ul></ul></ul><ul><ul><ul><li>Connection released when both sides shut down. </li></ul></ul></ul><ul><ul><li>4 segments: 1 FIN and 1 ACK for each direction; 1st. ACK+2nd. FIN combined. </li></ul></ul>
  60. 60. TCP Connection Release 3 <ul><li>Timers to avoid 2-army problem. </li></ul><ul><ul><li>If response to FIN not received within 2*MSL (maximum segment lifetime), FIN sender releases connection. </li></ul></ul><ul><li>After connection released, TCP waits for 2*MSL (e.g., 120 sec) to ensure all old segments have aged. </li></ul>
  61. 61. TCP Transmission <ul><li>Sender process initiates connection. </li></ul><ul><li>Once connection established, TCP can start sending data. </li></ul><ul><li>Sender writes bytes to TCP stream. </li></ul><ul><li>TCP sender breaks byte stream into segments. </li></ul><ul><ul><li>Each byte assigned sequence number. </li></ul></ul><ul><ul><li>Segment sent and timer started. </li></ul></ul>
  62. 62. TCP Transmission (cont’d) <ul><li>If timer expires, retransmit segment. </li></ul><ul><ul><li>After retransmitting segment for maximum number of times, assumes connection is dead and closes it. </li></ul></ul><ul><li>If user aborts connection, sending TCP flushes its buffers and sends RESET segment. </li></ul><ul><li>Receiving TCP decides when to pass received data to upper layer. </li></ul>
  63. 63. TCP Flow Control <ul><li>Sliding window. </li></ul><ul><ul><li>Receiver’s advertised window . </li></ul></ul><ul><ul><ul><li>Size of advertised window related to receiver’s buffer space. </li></ul></ul></ul><ul><ul><ul><li>Sender can send data up to receiver’s advertised window. </li></ul></ul></ul>
  64. 64. TCP Flow Control: Example 2K;SEQ=0 ACK=2048; WIN=2048 2K; SEQ=2048 ACK=4096; WIN=0 ACK=4096; WIN=2048 1K; SEQ=4096 App. writes 2K of data 4K 2K 0 App. reads 2K of data 2K 1K App. does 3K write Sender blocked Sender may send up to 2K
  65. 65. TCP Flow Control: Observations <ul><li>TCP sender not required to transmit data as soon as it comes in from application. </li></ul><ul><ul><li>Example: when first 2KB of data comes in, could wait for more data since window is 4KB. </li></ul></ul><ul><li>Receiver not required to send ACKs as soon as possible. </li></ul><ul><ul><li>Wait for data so ACK is piggybacked. </li></ul></ul>
  66. 66. Congestion Control <ul><li>Why do it at the transport layer? </li></ul><ul><ul><li>Real fix to congestion is to slow down sender. </li></ul></ul><ul><li>Use law of “conservation of packets”. </li></ul><ul><ul><li>Keep number of packets in the network constant. </li></ul></ul><ul><ul><li>Don’t inject new packet until old one leaves. </li></ul></ul><ul><li>Congestion indicator: packet loss. </li></ul>
  67. 67. TCP Congestion Control <ul><li>Like, flow control, also window based. </li></ul><ul><ul><li>Sender keeps congestion window (cwin) . </li></ul></ul><ul><ul><li>Each sender keeps 2 windows: receiver’s advertised window and congestion window. </li></ul></ul><ul><ul><li>Number of bytes that may be sent is min(advertised window, cwin). </li></ul></ul>
  68. 68. TCP Congestion Control (cont’d) <ul><li>Slow start [Jacobson 1988]: </li></ul><ul><ul><li>Connection’s congestion window starts at 1 segment. </li></ul></ul><ul><ul><li>If segment ACKed before time out, cwin=cwin+1. </li></ul></ul><ul><ul><li>As ACKs come in, current cwin is increased by 1. </li></ul></ul><ul><ul><li>Exponential increase. </li></ul></ul>
  69. 69. TCP Congestion Control (cont’d) <ul><li>Congestion Avoidance: </li></ul><ul><ul><li>Third parameter: threshold . </li></ul></ul><ul><ul><li>Initially set to 64KB. </li></ul></ul><ul><ul><li>If timeout, threshold=cwin/2 and cwin=1. </li></ul></ul><ul><ul><li>Re-enters slow-start until cwin=threshold. </li></ul></ul><ul><ul><li>Then, cwin grows linearly until it reaches receiver’s advertised window. </li></ul></ul>
  70. 70. TCP Congestion Control: Example threshold timeout threshold cwin time
  71. 71. TCP Retransmission Timer <ul><li>When segment sent, retransmission timer starts. </li></ul><ul><ul><li>If segment ACKed, timer stops. </li></ul></ul><ul><ul><li>If time out, segment retransmitted and timer starts again. </li></ul></ul>
  72. 72. How to set timer? <ul><li>Based on round-trip time: time between a segment is sent and ACK comes back. </li></ul><ul><li>If timer is too short, unnecessary retransmissions. </li></ul><ul><li>If timer is too long, long retransmission delay. </li></ul>
  73. 73. Jacobson’s Algorithm 1 <ul><li>Determining the round-trip time: </li></ul><ul><ul><li>TCP keeps RTT variable. </li></ul></ul><ul><ul><li>When segment sent, TCP measures how long it takes to get ACK back ( M ). </li></ul></ul><ul><ul><li>RTT = alpha*RTT + (1-alpha)M. </li></ul></ul><ul><ul><li>alpha: smoothing factor; determines weight given to previous estimate. </li></ul></ul><ul><ul><li>Typically, alpha=7/8. </li></ul></ul>
  74. 74. Jacobson’s Algorithm 2 <ul><li>Determining timeout value: </li></ul><ul><ul><li>Measure RTT variation, or |RTT-M|. </li></ul></ul><ul><ul><li>Keeps smoothed value of cumulative variation D=alpha*D+(1-alpha)|RTT-M|. </li></ul></ul><ul><ul><li>Alpha may or may not be the same as value used to smooth RTT. </li></ul></ul><ul><ul><li>Timeout = RTT+4*D. </li></ul></ul>
  75. 75. Client-Server Model Client Kernel File Server Kernel Printer Server Kernel
  76. 76. File Transfer <ul><li>Sharing remote files: “on-line” access versus “file transfer”. </li></ul><ul><li>“ On-line” access transparent access to shared files, e.g., distributed file system. </li></ul><ul><li>Sharing through file transfer: user copies file then operates on it. </li></ul>
  77. 77. The Web and HTTP
  78. 78. The Web <ul><li>WWW, or the world-wide web is a resource discovery service. </li></ul><ul><ul><li>Resource space is organized hierarchically, and resources are linked to one another according to some relation. </li></ul></ul><ul><ul><li>Hypertext organization: link “granularity”; allows links within documents. </li></ul></ul><ul><ul><li>Graphical user interface. </li></ul></ul>
  79. 79. The Client Side <ul><li>Users perceive the Web as a vast collection of information. </li></ul><ul><ul><li>Page is the Web’s information transfer unit. </li></ul></ul><ul><ul><li>Each page may contain links to other pages. </li></ul></ul><ul><ul><li>Users follow links by clicking on them which takes them to the corresponding page. </li></ul></ul><ul><ul><li>This process can go on indefinetly, traversing several pages located in different places. </li></ul></ul>
  80. 80. The Browser <ul><li>Program running on client that retrieves and displays pages. </li></ul><ul><ul><li>Interacts with server of page. </li></ul></ul><ul><ul><li>Interprets commands and displays page. </li></ul></ul><ul><li>Examples: Mosaic, Netscape’s Navigator and Communicator, Microsoft Internet Explorer. </li></ul><ul><li>Other features: back, forward, bookmark, caching, handle multimedia objects. </li></ul>
  81. 81. Domain Name System (DNS) <ul><li>Basic function: translation of names (ASCII strings) to network (IP) addresses and vice-versa. </li></ul><ul><li>Example: </li></ul><ul><ul><li> <-> </li></ul></ul>
  82. 82. DNS <ul><li>Hierarchical name space. </li></ul><ul><li>Distributed database. </li></ul><ul><li>RFCs 1034 and 1035. </li></ul>
  83. 83. How is it used? <ul><li>Client-server model. </li></ul><ul><ul><li>Client DNS (running on client hosts), or resolver. </li></ul></ul><ul><ul><li>Application calls resolver with name. </li></ul></ul><ul><ul><li>Resolver contacts local DNS server (using UDP) passing the name. </li></ul></ul><ul><ul><li>Server returns corresponding IP address. </li></ul></ul>
  84. 84. Name Resolution 1 <ul><li>Application wants to resolve name. </li></ul><ul><li>Resolver sends query to local name server. </li></ul><ul><ul><li>Resolver configured with list of local name servers. </li></ul></ul><ul><ul><li>Select servers in round-robin fashion. </li></ul></ul><ul><li>If name is local, local name server returns matching authoritative RRs. </li></ul><ul><ul><li>Authoritative RR comes from authority managing the RR and is always correct. </li></ul></ul><ul><ul><li>Cached RRs may be out of date. </li></ul></ul>
  85. 85. Name Resolution 2 <ul><li>If information not available locally (not even cached), local NS will have to ask someone else. </li></ul><ul><ul><li>It asks the server of the top-level domain of the name requested. </li></ul></ul>
  86. 86. Electronic Mail <ul><li>Non-interactive. </li></ul><ul><ul><li>Deferred mail (e.g., destination temporarily unavailable). </li></ul></ul><ul><li>Spooling: </li></ul><ul><ul><li>Message delivery as background activity. </li></ul></ul><ul><ul><li>Mail spool: temporary storage area for outgoing mail. </li></ul></ul>
  87. 87. Mail system User interface User sends mail User reads mail Outgoing mail spool Mailboxes incoming mail Client (send) Server (receive) TCP connection (outgoing) TCP connection (incoming)
  88. 88. Observations <ul><li>When user sends mail, message stored is system spool area. </li></ul><ul><li>Client transfer runs on background. </li></ul><ul><li>Initiates transfer to remote machine. </li></ul><ul><li>If transfer succeeds, local copy of message removed; otherwise, tries again later (30 min) for a maximum interval (3 days). </li></ul>
  89. 89. Remote access
  90. 90. Telnet User’s machine Telnet client OS TCP connection over Internet Telnet server OS
  91. 91. Telnet basic operation <ul><li>When user invokes telnet, telnet client on user machine establishes TCP connection to specified server. </li></ul><ul><li>TCP connection established; user’s keystrokes sent to remote machine. </li></ul><ul><li>Telnet server sends back response, echoed on user’s terminal. </li></ul><ul><li>Telnet server can accept multiple concurrent connections. </li></ul>