Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Computer Networks and Communications [Δίκτυα Υπολογιστών και Επικοινωνίες] Lectures 10-13: Back to applications… The e-mail app. Univ. of the Aegean.

Similar presentations


Presentation on theme: "1 Computer Networks and Communications [Δίκτυα Υπολογιστών και Επικοινωνίες] Lectures 10-13: Back to applications… The e-mail app. Univ. of the Aegean."— Presentation transcript:

1 1 Computer Networks and Communications [Δίκτυα Υπολογιστών και Επικοινωνίες] Lectures 10-13: Back to applications… The e-mail app. Univ. of the Aegean Financial and Management Engineering Dpt Petros KAVASSALIS

2 2 What you will learn in this course A set of fundamental concepts for understanding Data Networks and the Internet A set of fundamental concepts for understanding Data Networks and the Internet  What is the Internet?  Internet architecture and layers  Internet applications and services  New concepts in the evolution of the Internet  The Internet goes Wireless… Familiarization with the structure and organization of Digital Networks Familiarization with the structure and organization of Digital Networks  Business and Social Networks  Electronic Markets and Online Feedback Mechanisms

3 3 Who am I? PhD in Economics and Management (Univ. Paris Dauphine & Ecole polytechnique) PhD in Economics and Management (Univ. Paris Dauphine & Ecole polytechnique) Research experience Research experience  Ecole polytechnique, Paris  MIT Center of Technology Policy and Industrial Development, MIT CTPID (MIT Internet Telecommunications Convergence Consortium) Current positions Current positions  Univ. of the Aegean (FME): Assoc. Professor  RACTI: Director of ATLANTIS Group

4 4 Communication tools e-mail: pkavassalis [at] atlantis-group.gr e-mail: pkavassalis [at] atlantis-group.gr Course web site: see fme website Course web site: see fme website

5 5 Course Textbook [http://books.google.gr/books?id=Pd- z64SJRBAC&dq=tanenbaum+networks&printsec=frontcover&source=bn&hl=el&ei=ml- dSfH9L4S2jAeJ5L3ZBQ&sa=X&oi=book_result&resnum=4&ct=result]

6 Supplementary Texts & References William Stallings, Computer Networking with Internet Protocols, Prentice Hall, 2004 William Stallings, Computer Networking with Internet Protocols, Prentice Hall, 2004 William Stallings, Computer Networking with Internet Protocols, Prentice Hall, 2004 William Stallings, Computer Networking with Internet Protocols, Prentice Hall, 2004 James F. Kurose and Keith W. Ross, Computer Networking: A Top-Down Approach, Addison-Wesley, 2008 James F. Kurose and Keith W. Ross, Computer Networking: A Top-Down Approach, Addison-Wesley, 2008 James F. Kurose and Keith W. Ross, Computer Networking: A Top-Down Approach, Addison-Wesley, 2008 James F. Kurose and Keith W. Ross, Computer Networking: A Top-Down Approach, Addison-Wesley, 2008 6

7 7 Students evaluation Class Participation (20%) Class Participation (20%)+ Assignments (20%) Assignments (20%)+ Final Exam (60%) Final Exam (60%)

8 Reminder (1): Overview of the Internet Petros KAVASSALIS 8 The structure of the Internet is roughly hierarchical

9 Reminder (2): A network architecture Petros KAVASSALIS 9

10 Reminder (3): TCP/IP in practice Petros KAVASSALIS 10

11 Create a network app Write programs that  Run on (different) end systems  Communicate over network  Think about that: Server software communicates with browser software No need to write software for network-core devices  Network-core devices do not run user applications  Applications on end systems allows for rapid app development, propagation Petros KAVASSALIS 11 application transport network data link physical application transport network data link physical application transport network data link physical

12 Application architectures Client-server Client-server Peer-to-peer (P2P) Peer-to-peer (P2P) Hybrid of client-server and P2P Hybrid of client-server and P2P Petros KAVASSALIS 12

13 Client-server Server:  Always-on host  Permanent IP address  Server farms for scaling Clients:  Communicate with server  May be intermittently connected  May have dynamic IP addresses  Do not communicate directly with each other Petros KAVASSALIS 13

14 P2P No always-on server No always-on server Arbitrary end systems directly communicate Arbitrary end systems directly communicate peers are intermittently connected and change IP addresse peers are intermittently connected and change IP addresse  **** Highly scalable but difficult to manage Petros KAVASSALIS 14

15 Hybrid Skype  voice-over-IP P2P application  centralized server: finding address of remote party:  client-client connection: direct (not through server) Instant messaging  chatting between two users is P2P  centralized service: client presence detection/location o user registers its IP address with central server when it comes online o user contacts central server to find IP addresses of buddies Petros KAVASSALIS 15

16 An Internet application example: e-mail Most heavily used application on any network Most heavily used application on any network Protocols Protocols  Simple Mail Transfer Protocol (SMTP) o TCP/IP o Delivery of simple text messages  Multi-purpose Internet Mail Extension (MIME) o Delivery of other types of data o Voice, images, video clips Petros KAVASSALIS 16

17 SMTP RFC 821 (please locate the document!) RFC 821 (please locate the document!) Not concerned with format of messages or data Not concerned with format of messages or data  Covered in RFC 822 (see later) SMTP uses info written on envelope of mail SMTP uses info written on envelope of mail  Message header Does not look at contents Does not look at contents  Message body Mail created by user agent program (mail client): Message consists of: Mail created by user agent program (mail client): Message consists of:  Header containing recipient’s address and other info  Body containing user data Messages queued and sent as input to SMTP sender program Messages queued and sent as input to SMTP sender program  Typically a server process (daemon on UNIX) Petros KAVASSALIS 17

18 Mail message content Each queued message has: Each queued message has:  Message text o RFC 822 header with message envelope and list of recipients o Message body, composed by user  A list of mail destinations o Derived by user agent from header o May be listed in header o May require expansion of mailing lists o May need replacement of mnemonic names with mailbox names Petros KAVASSALIS 18

19 Mail example Date: Tue 19 May 2008 10:37:17 (EST) From: “Petros Kavassalis” From: “Petros Kavassalis” Subject: Xronia Polla To: el……@gmail.com Cc: petros@cfp.mit.edu Follows the main text, delimited from the header by a blank line  Message viewed as having envelope and contents  Envelope contains information required to transmit and deliver message  Message is sequence of lines of text Petros KAVASSALIS 19

20 Mail structure SMTP: protocol for exchanging email msgs RFC 821+822: standard for text message format: header lines, e.g., header lines, e.g.,  To:  From:  Subject: body body  the “message”, ASCII characters only Petros KAVASSALIS 20 header body blank line

21 SMTP operation architecture Petros KAVASSALIS 21

22 SMTP Sender Takes message from queue Takes message from queue Transmits to proper destination host Transmits to proper destination host  Via SMTP transaction  Over one or more TCP connections to port 25 Host may have multiple senders active Host may have multiple senders active Host should be able to create receivers on demand Host should be able to create receivers on demand When delivery complete, sender deletes destination from list for that message When delivery complete, sender deletes destination from list for that message When all destinations processed, message is deleted When all destinations processed, message is deleted Petros KAVASSALIS 22

23 Room for optimization If message destined for multiple users on a given host If message destined for multiple users on a given host  It is sent only once  = Delivery to users handled at destination host If multiple messages ready for given host If multiple messages ready for given host  a single TCP connection can be used  = Saves overhead of setting up and dropping connection Petros KAVASSALIS 23

24 SMTP reliability Used to transfer messages from sender to receiver over TCP connection Used to transfer messages from sender to receiver over TCP connection Attempts to provide reliable service Attempts to provide reliable service No guarantee to recover lost messages No guarantee to recover lost messages No end to end acknowledgement to originator No end to end acknowledgement to originator Error indication delivery not guaranteed Error indication delivery not guaranteed Generally considered reliable Generally considered reliable Petros KAVASSALIS 24

25 SMTP Receiver Accepts arriving message Accepts arriving message Places in user mailbox or copies to outgoing queue for forwarding Places in user mailbox or copies to outgoing queue for forwarding Receiver must: Receiver must:  Verify local mail destinations  Deal with errors o Transmission o Lack of disk space Sender responsible for message until receiver confirm complete transfer Sender responsible for message until receiver confirm complete transfer  Indicates mail has arrived at host, not user Petros KAVASSALIS 25

26 SMTP Forwarding and Conversation Mostly direct transfer from sender host to receiver host Mostly direct transfer from sender host to receiver host May go through intermediate machine via forwarding capability May go through intermediate machine via forwarding capability  Sender can specify route  Target user may have moved SMTP limited to conversation between sender and receiver SMTP limited to conversation between sender and receiver Main function is to transfer messages Main function is to transfer messages Rest of mail handling beyond scope of SMTP Rest of mail handling beyond scope of SMTP  May differ between systems Petros KAVASSALIS 26

27 Main operations (1) Connection setup Connection setup Exchange of command-response pairs Exchange of command-response pairs Connection termination Connection termination Connection setup Connection setup  Sender opens TCP connection with receiver  Once connected, receiver identifies itself  Sender identifies itself  Receiver accepts sender’s identification  (If mail service not available, step 2 above becomes: service not available) Petros KAVASSALIS 27

28 Main operations (2) Connection setup Connection setup Exchange of command-response pairs Exchange of command-response pairs Connection termination Connection termination Exchange of command-response pairs Exchange of command-response pairs  Sender may send one or more messages to receiver  MAIL command identifies originator  Gives reverse path to used for error reporting  Receiver returns 250 OK or appropriate fail/error message  One or more RCPT commands identifies recipients for the message  Separate reply for each recipient  DATA command transfers message text  End of message indicated by line containing just period (.) Petros KAVASSALIS 28

29 Main operations (3) Connection setup Connection setup Exchange of command-response pairs Exchange of command-response pairs Connection termination Connection termination  Sender sends QUIT and waits for reply  Then initiate TCP close operation  Receiver initiates TCP close after sending reply to QUIT Petros KAVASSALIS 29

30 Mail access protocols SMTP: delivery/storage to receiver’s server SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server Mail access protocol: retrieval from server  POP: Post Office Protocol [RFC 1939] o authorization (agent server) and download  IMAP: Internet Mail Access Protocol [RFC 1730] o more features (more complex) o manipulation of stored msgs on server  HTTP: gmail, Hotmail, Yahoo! Mail, etc. Petros KAVASSALIS 30 user agent sender’s mail server user agent SMTP access protocol receiver’s mail server

31 MIME Extension to RFC822 Extension to RFC822 SMTP can not transmit executables SMTP can not transmit executables  Uuencode and other schemes are available o Not standardized Can not transmit text including international characters (e.g. â, å, ä, è, é, ê, ë) Can not transmit text including international characters (e.g. â, å, ä, è, é, ê, ë)  Need 8 bit ASCII Servers may reject mail over certain size Servers may reject mail over certain size Translation between ASCII and EBCDIC not standard Translation between ASCII and EBCDIC not standard Some SMTP implementations do not adhere to standard Some SMTP implementations do not adhere to standard  CRLF, truncate or wrap long lines, removal of white space, etc. Petros KAVASSALIS 31

32 MIME in a nutshell Five new message header fields Five new message header fields  MIME version  Content type  Content transfer encoding  Content Id  Content Description Number of content formats defines Number of content formats defines Transfer encoding defined Transfer encoding defined Petros KAVASSALIS 32 From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data....................................base64 encoded data

33 Content types Text body Text body Multipart Multipart  Mixed, Parallel, Alternative, Digest Message Message  RFC 822, Partial, External-body Image Image  jpeg, gif Video Video  mpeg Audio Audio  Basic Application Application  Postscript  octet stream Petros KAVASSALIS 33


Download ppt "1 Computer Networks and Communications [Δίκτυα Υπολογιστών και Επικοινωνίες] Lectures 10-13: Back to applications… The e-mail app. Univ. of the Aegean."

Similar presentations


Ads by Google