network applications overview email n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Network Applications: Overview, Email PowerPoint Presentation
Download Presentation
Network Applications: Overview, Email

Loading in 2 Seconds...

play fullscreen
1 / 56
callum-holman

Network Applications: Overview, Email - PowerPoint PPT Presentation

86 Views
Download Presentation
Network Applications: Overview, Email
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. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Lappeenrannan teknillinen yliopisto TITE Prof. Esa Kerttula 13.3.2009 Tietokoneverkot ja datasiirto Päivä 1: luento 4d Network Applications: Overview, Email

  2. Outline • Recap • ISO/OSI Layering and Internet Layering • Application layer overview • Examples

  3. no reservation: all arrivals into the single link with rate R, the queueing delay + transmission delay: Recap: Statistical Multiplexing A simple model to compare bandwidth efficiency of - reservation/dedication (aka circuit-switching) and - no reservation (aka packet switching)setup - a single bottleneck link with rate R - n flows; each flow has an arrival rate of a/n • reservation: each flow uses its own reserved (sub)link with rate R/n, the queueing delay + transmission delay:

  4. Virtual-Circuit Switching Host C Host D Host A Node 1 Node 2 Node 3 Node 5 Host B Host E Node 7 Node 6 Node 4

  5. Virtual-Circuit Switching Host C Host D Host A Node 1 Node 2 Node 3 Node 5 Host B Host E Node 7 Node 6 Node 4

  6. communication network broadcastcommunication switchednetwork circuit-switchednetwork packet-switched network virtual circuit network datagram network Recap: Summary of the Taxonomy of Communication Networks

  7. Recap: Layering • Layered reference model for discussion • Modularization eases maintenance, updating of system • Physical vs logical communication • Key design decision: what functionalities to put in each layer?

  8. Example: Where to Provide Reliability ? R S A L2 L2 L1 L1 L1 • Solution 1: the network (lower layer L1) provides reliability; i.e., each hop provides reliability • Solution 2: the end host (higher layer L2) provides reliability; i.e., end-to-end check and retry

  9. What are the Reasons for Implementing Reliability at Higher Layer ? • The lower layer cannot completely provide the functionality • the receiver has to do the check anyway! • Implementing it at lower layer increases complexity, cost and overhead at lower layer • shared by all upper layer applications  everyone pays for it, even if you do not need it • The upper layer • knows the requirements better and thus may choose a better approach to implement it S A R L2 L2 L1 L1 L1

  10. S A R L2 L2 L1 L1 L1 Are There Reasons Implementing Reliability at Lower Layer ? • Improve performance, e.g., if high cost/delay/… on a link local reliability • improves efficiency • reduces delay • Share common code, e.g., reliability is required by multiple applications

  11. Summary: End-to-End Arguments • If a higher layer can do it, don’t do it at a lower layer -- the higher the layer, the more it knows about the best what it needs • Add functionality in lower layers iff it (1) is used by and improves performance of a large number of (current and potential future) applications, (2) does not hurt (too much) other applications, and (3) does not increase (too much) complexity/overhead • Practical tradeoff, e.g., • allow multiple interfaces at a lower layer (one provides the function; one does not)

  12. Examples • We used reliability as an example • Assume two layers (L1: network; L2: end-to-end). Where may you implement the following functions? • security (privacy of traffic) • quality of service (e.g., delay/bandwidth guarantee) • flow control (e.g., not to overwhelm network links or receiver) S A R L2 L2 L1 L1 L1

  13. Challenges • Challenges to build a good (networking) system: find the right balance between: end-to-end arguments reuse, interoperability,implementation effort (apply layering concepts) performance No universal answer: the answer depends on the goals and assumptions!

  14. Outline • Recap • ISO/OSI Layering and Internet Layering • Application layer overview • Examples

  15. ISO/OSI Reference Model • Seven layers • lower three layers are hop-by-hop • next four layers are end-to-end (host-to-host) Application Application Presentation Presentation Session Session Transport Transport Network Network Network Datalink Datalink Datalink Physical Physical Physical Physical medium

  16. Internet Layering • Lower three layers are hop-by-hop • Next two layers are end-to-end Application Application Transport Transport Network Network Network Datalink Datalink Datalink Physical Physical Physical Physical medium

  17. application transport network link physical Internet Protocol Layers • A rough division • Five layers • Application: supporting network applications • ftp, smtp, http, p2p, IP telephony • Transport: host-host data transfer • tcp, udp • Network: routing of datagram from source to destination • ip • Link: data transfer between neighboring network elements • ethernet, 802.11, cable, DSL, … • Physical: bits “on the wire” • cable, optical fiber, wireless

  18. The Hourglass Architecture of the Internet Email WWW FTP Telnet SSL end users TCP UDP IP network infrastructure Ethernet Wireless Cable/DSL

  19. Link Layer: Services Provided by Ethernet • Multiplexing/demultiplexing • from/to the network layer • Multiple access control • send frame to peer sharing the common channel • Error detection Email WWW FTP Telnet SSL TCP UDP IP Cable/DSL Ethernet Wireless

  20. Network Layer: Services Provided by IP • Routing • best-effort to send packets from source to destination • Multiplexing/demultiplexing • from/to the transport • Fragmentation and reassembling • partition a fragment into smaller packets • removed in IPv6 • Error detection • Does not provide • reliability or reservation Email WWW FTP Telnet SSL TCP UDP IP Ethernet Wireless Cable/DSL

  21. Network Layer: IPv4Header

  22. Services Provided by UDP • A connectionless service • Does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee • why is there a UDP? Email WWW FTP Telnet SSL TCP UDP IP Ethernet Wireless Cable/DSL

  23. Transport Layer: Services Provided by TCP • Multiplexing/demultiplexing • Reliable transport • between sending and receiving processes • setup required between sender and receiver: aconnection-oriented service • Flow control • sender won’t overwhelm receiver • Congestion control • throttle sender when network overloaded • Error detection • Does not provide • timing, minimum bandwidth guarantees Email WWW FTP Telnet SSL TCP UDP IP Ethernet Wireless FDDI

  24. Transport Layer: TCP Header

  25. Transmission control protocol (TCP) multiplexing/demultiplexing reliable data transfer rate control: flow control and congestion control User data protocol (UDP) multiplexing/demultiplexing Services Provided by Transport Host B Host A Hello I am ready DATA ACK

  26. Secure Socket Layer: Services • server authentication • authentication through trusted certificate authority (CA): server obtains a certificate from one of the trusted CAs • data encryption and integrity • client authentication (optional)

  27. Secure Socket Layer Architecture HTTP POP3

  28. SSL Record-Layer Packet Format 20: change_cipher 21: alert 22: handshake 23: application

  29. Summary: The Big Picture of the Internet • Hosts and routers: • ~500 mil. hosts • organized roughly hierarchical • backbone links 10  40Gbps • Software: • datagram switching with virtualcircuit support at backbone • layered network architecture • use end-to-end arguments to determine the servicesprovided by each layer • the hourglass architecture of the Internet Email WWW FTP Telnet SSL TCP UDP IP Ethernet Wireless Cable/DSL

  30. Outline • Recap • ISO/OSI Layering and Internet Layering • Application layer overview • Examples

  31. Conceptual + implementation aspects of network application protocols client server paradigm peer to peer paradigm Learn about protocols by examining common application-layer protocols smtp/pop http ftp dns p2p Application Layer: Goals

  32. Network application: communicating, distributed processes a process is a program that is running within a host a user agent is a process serving as an interface to the user web: browser streaming audio/video: media player processes running in different hosts communicate by an application-layer protocol e.g., email, Web Application-layer protocols one “piece” of an app define messages exchanged by apps and actions taken implementing services by using the service provided by the lower layer, i.e., the transport layer application transport network data link physical application transport network data link physical Network Applications vs. Application-layer Protocols

  33. API: application programming interface Defines interface between application and transport layer Example: Socket API sometimes called "Berkeley sockets" acknowledging their heritage from Berkeley Unix a socket consists of a hostIP address and a port number e.g., email (SMTP) port number 25, web port number 80 an application process binds to a socket %netstat –anp --tcp two processes communicate by sending data into socket, reading data out of socket There are other API’s such as XTI (X/Open Transport Interface), a slight modification of the Transport Layer Interface (TLI) developed by AT&T. How does an ApplicationAccess the Transport Service? More later!

  34. App. and Trans.: App. Protocols and their Transport Protocols • An application needs to choose the transport protocol Underlying transport protocol TCP/SSL TCP TCP/SSL TCP typically UDP TCP or UDP typically UDP Application layer protocol smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g., Vocaltec) NFS proprietary Application e-mail remote terminal access Web file transfer Internet telephony remote file server streaming multimedia

  35. Typical network app has two pieces: client and server request reply application transport network data link physical application transport network data link physical Client-Server Paradigm Client (C): • initiates contact with server (“speaks first”) • typically requests service from server • for Web, client is implemented in browser; for e-mail, in mail reader Server (S): • provides requested service to client • e.g., Web server sends requested Web page; mail server delivers e-mail Two questions to ask about a C-S application- How does a client locate a server process?- Is the application scalable, extensible, robust?

  36. Outline • Recap • ISO/OSI Layering and Internet Layering • Application layer overview • Examples

  37. Three major components: User agents Mail servers Protocols between mail servers SMTP between mail server and user agent POP3: Post Office Protocol [RFC 1939] IMAP: Internet Mail Access Protocol [RFC 1730] user agent user agent user agent user agent user agent user agent SMTP SMTP SMTP POP3 or IMAP mail server mail server mail server outgoing message queue user mailbox Electronic Mail

  38. Email as a Client-Server Application S: 220 mr1.its.yale.edu C: HELO cyndra.yale.edu S: 250 Hello cyndra.cs.yale.edu, pleased to meet you C: MAIL FROM: <spoof@cs.yale.edu> S: 250 spoof@cs.yale.edu... Sender ok C: RCPT TO: <yry@yale.edu> S: 250 yry@yale.edu ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Date: Wed, 23 Jan 2008 11:20:27 -0500 (EST) C: From: "Y. R. Yang" <yry@cs.yale.edu> C: To: "Y. R. Yang" <yry@cs.yale.edu> C: Subject: This is subject C: C: This is the message body! C: Please don’t spoof!C: C: . S: 250 Message accepted for delivery C: QUIT S: 221 mr1.its.yale.edu closing connection

  39. SMTP: protocol for exchanging email msgs RFC 822: standard for text message format: Header lines, e.g., To: From: Subject: Body the “message”, ASCII characters only header body Mail Message Format blank line

  40. MIME: multimedia mail extension, RFC 2045, 2056 Additional lines in msg header declare MIME content type From: yry@cs.yale.edu To: cs433@cs.yale.edu Subject: Network map. MIME-Version: 1.0 Content-Type: image/jpeg Content-Transfer-Encoding: base64 base64 encoded data ..... ......................... ......base64 encoded data Message Format: Multimedia Extensions MIME version multimedia data type, subtype, parameter declaration method used to encode data encoded data

  41. Multipart Type: How Attachment Works From: yry@cs.yale.edu To: cs433@cs.yale.edu Subject: Network map. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=98766789 --98766789 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Hi, Attached is network topology map. --98766789 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data ..... ......................... ......base64 encoded data --98766789--

  42. Authorization phase client commands: user: declare username pass: password server responses +OK -ERR Transaction phase, client: list: list message numbers retr: retrieve message by number dele: delete quit POP3 Protocol: Mail Access S: +OK POP3 server ready C: user alice S: +OK C: pass hungry S: +OK user successfully logged on C: list S: 1 498 S: 2 912 S: . C: retr 1 S: <message 1 contents> S: . C: dele 1 C: retr 2 S: <message 1 contents> S: . C: dele 2 C: quit S: +OK POP3 server signing off %telnet <netid>.mail.yale.edu 110 %openssl s_client –connect pop.gmail.com:995

  43. Discussions: Positive • Some decisions we can learn from the design of the email application • separate protocols for different functions • email retrieval (e.g., POP3, IMAP) • mail transmission (SMTP) • simple/basic requests to implement basic control; fine-grain control through ASCII header and message body • make the protocol easy to read/debug/extend (analogy with end-to-end layered design?) • status code in response makes message easy to parse

  44. Discussions: Negative • Some design features which are missing • handling spam • http://www.yale.edu/its/email/spam/spam.html

  45. Optional Slides

  46. Details of the Seven ISO/OSI Layers

  47. Physical Layer (1) • Service: moves information between two systems connected by a physical link • Interface: specifies how to send a bit • Protocol: coding scheme used to represent a bit, voltage levels, duration of a bit • Examples: coaxial cable, optical fiber links; transmitters, receivers

  48. Datalink Layer (2) • Service: • framing, i.e., attach frames separator • send data frames between peers • others: • arbitrates the access to common physical media • ensures reliable transmission • provides flow control • Interface: sends a data unit (packet) to a machine connected to the same physical media • Protocol: layer addresses, implement Medium Access Control (MAC) (e.g., CSMA/CD)…

  49. Network Layer (3) • Service: • delivers a packet to a specified destination • performs fragmentation/reassembly of packets • others: • packet scheduling • buffer management • Interface: sends a packet to a specified destination • Protocol: defines global unique addresses; constructs routing tables; implement packet forwarding; fragments/reassembles packets

  50. Data and Control Planes • Data plane: concerned with • packet forwarding • buffer management • packet scheduling • Control Plane: concerned with installing and maintaining the states for the data plane