Computer Networks with Internet Technology William Stallings Chapter 03 Traditional Applications.

Slides:



Advertisements
Similar presentations
1 Electronic Mail u Three major components: u user agents u mail servers u simple mail transfer protocol: SMTP u User Agent u a.k.a. “mail reader” u composing,
Advertisements

1 Computer Networks and Communications [Δίκτυα Υπολογιστών και Επικοινωνίες] Lectures 10-13: Back to applications… The app. Univ. of the Aegean.
1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
Application Layer Pertemuan 25 Matakuliah: H0484/Jaringan Komputer Tahun: 2007.
Chapter 6: Distributed Applications Business Data Communications, 5e.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
TCP/IP Protocol Suite 1 Chapter 20 Upon completion you will be able to: Electronic Mail: SMTP, POP, and IMAP Understand four configurations of architecture.
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Electronic Mail and SMTP
William Stallings Data and Computer Communications 7 th Edition Chapter 22 Distributed Applications.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 22 – Internet Applications Electronic Mail.
Chapter 30 Electronic Mail Representation & Transfer
Esimerkki: Sähköposti. Lappeenranta University of Technology / JP, PH, AH Electronic Mail Three major components: user agents mail servers simple mail.
Sistem Jaringan dan Komunikasi Data #8. Electronic Mail  most heavily used application on any network  Simple Mail Transfer Protocol (SMTP)  TCP/IP.
Simple Mail Transfer Protocol
Chapter 7: Internet-Based Applications Business Data Communications, 6e.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Mail Server Fitri Setyorini. Content SMTP POP3 How mail server works IMAP.
Simple Mail Transfer Protocol (SMTP) Kanika Thapar CISC 856 TCP/IP and Upper Layer Protocols 11/8/2007 (Some slides provided by Ezra Kissel, some figures.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
Electronic Mail (SMTP, POP, IMAP, MIME)
Internet Engineering Course
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
CSE401N: Computer Networks Lecture-5 Electronic Mail S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Intro to Computer Networks Bob Bradley The University of Tennessee at Martin.
Review: –How do we address “a network end-point”? –What services are provided by the Internet? –What is the network logical topology observed by a network.
Application Layer Protocols Simple Mail Transfer Protocol.
Electronic Mail. Most heavily used application on any network Uses client-server architecture –Electronic mail client accepts mail from user and delivers.
Chapter 7: Internet-Based Applications Business Data Communications, 6e.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
Application Protocols: ELECTRONIC MAIL (SMTP, POP) CSNB534 Semester 2, 2007/2008 Asma Shakil.
Electronic Mail Originally –Memo sent from one user to another Now –Memo sent to one or more mailboxes Mailbox –Destination point for messages.
1 Applications Electronic Mail. 2 Electronic Mail Many user applications use client-server architecture. Electronic mail client accepts mail.
Sending and Receiving Mails
Simple Mail Transfer Protocol (SMTP)
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 22 – Internet Applications Electronic Mail.
SMTP( 简单邮件传输协议 ) SIMPLE MAIL TRANSFER PROTOCOL RFC 2812.
Internet Applications
File Transfer Protocol (FTP)
Application Layer1 Electronic Mail. Application Layer2 Electronic Mail Three major components: r user agents r mail servers r simple mail transfer protocol:
1 SMTP - Simple Mail Transfer Protocol –RFC 821 POP - Post Office Protocol –RFC 1939 Also: –RFC 822 Standard for the Format of ARPA Internet Text.
Chapter 16: Distributed Applications Business Data Communications, 4e.
Lecture 6: Sun: 8/5/1435 Distributed Applications Lecturer/ Kawther Abas CS- 492 : Distributed system & Parallel Processing.
SIMPLE MAIL TRANSFER PROTOCOL. Introduction Simple Mail Transfer Protocol is the standard protocol on the Internet and part of the TCP/IP protocol.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
SMTP - Simple Mail Transfer Protocol RFC 821
Chapter 16: Distributed Applications Business Data Communications, 4e.
CS440 Computer Networks 1 Neil Tang 12/01/2008.
Slides based on Carey Williamson’s: FTP & SMTP1 File Transfer Protocol (FTP) r FTP client contacts FTP server at port 21, specifying TCP as transport protocol.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
COMP 431 Internet Services & Protocols
1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
© MMII JW RyderCS 428 Computer Networks1 Electronic Mail  822, SMTP, MIME, POP  Most widely used application service  Sometimes only way a person ever.
William Stallings Data and Computer Communications 7th Edition
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Networking Applications
Chapter 6: Distributed Applications
CS- 492 : Distributed system & Parallel Processing
Chapter 2: Application layer
William Stallings Data and Computer Communications
Internet and Intranet Protocols and Applications
William Stallings Data and Computer Communications
Chapter 2 Application Layer
Presentation transcript:

Computer Networks with Internet Technology William Stallings Chapter 03 Traditional Applications

Electronic Mail Most heavily used application on any network Simple Mail Transfer Protocol (SMTP) —TCP/IP —Delivery of simple text messages Multi-purpose Internet Mail Extension (MIME) —Delivery of other types of data —Voice, images, video clips

SMTP RFC 821 Not concerned with format of messages or data —Covered in RFC 822 (see later) SMTP uses info written on envelope of mail —Message header Does not look at contents —Message body Except: —Standardize message character set to 7 bit ASCII —Add log info to start of message Shows path taken

Basic Operation 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 —Typically a server process (daemon on UNIX)

Mail Message Contents Each queued message has: —Message text RFC 822 header with message envelope and list of recipients Message body, composed by user —A list of mail destinations Derived by user agent from header May be listed in header May require expansion of mailing lists May need replacement of mnemonic names with mailbox names If BCCs (Blind Carbon Copies) indicated, user agent needs to prepare correct message format

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

Optimization 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, a single TCP connection can be used —Saves overhead of setting up and dropping connection

Possible Errors Host unreachable Host out of operation TCP connection fail during transfer Sender can re-queue mail —Give up after a period Faulty destination address —User error —Target user changed address —Redirect if possible —Inform user if not

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

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

SMTP Forwarding Mostly direct transfer from sender host to receiver host May go through intermediate machine via forwarding capability —Sender can specify route —Target user may have moved

Conversation SMTP limited to conversation between sender and receiver Main function is to transfer messages Rest of mail handling beyond scope of SMTP —May differ between systems

Figure 3.9 SMTP Mail Flow

SMTP System Overview Commands and responses between sender and receiver Initiative with sender —Establishes TCP connection Sender sends commands to receiver e.g. HELO Each command generates exactly one reply e.g. 250 requested mail action ok; completed

SMTP Replies Leading digit indicates category —Positive completion reply (2xx) —Positive intermediate reply (3xx) —Transient negative completion reply (4xx) —Permanent negative completion reply (5xx)

Operation Phases Connection setup Exchange of command-response pairs Connection termination

Connection Setup Sender opens TCP connection with receiver Once connected, receiver identifies itself —220 service ready Sender identifies itself —HELO Receiver accepts sender’s identification —250 OK If mail service not available, step 2 above becomes: —421 service not available

Mail Transfer 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 (.)

Closing Connection Two steps Sender sends QUIT and waits for reply Then initiate TCP close operation Receiver initiates TCP close after sending reply to QUIT

SMTP Commands

Sample SMTP Exchange S: HELO pc-ycc R: 250 euler.im.ncnu.edu.tw Hello …, pleased to meet you S: MAIL FROM: R: 250 OK S: RCPT TO: R: 250 OK S: RCPT TO: R: 550 No such user here S: DATA R: 354 Start mail input; end with. S: Blah blah blah…. S:…etc. etc. etc. S:. R: 250 OK S: QUIT S: HELO pc-ycc R: 250 euler.im.ncnu.edu.tw Hello …, pleased to meet you S: MAIL FROM: R: 250 OK S: RCPT TO: R: 250 OK S: RCPT TO: R: 550 No such user here S: DATA R: 354 Start mail input; end with. S: Blah blah blah…. S:…etc. etc. etc. S:. R: 250 OK S: QUIT

Format for Text Messages RFC 882 Message viewed as having envelope and contents Envelope contains information required to transmit and deliver message Message is sequence of lines of text —Uses general memo framework —Header usually keyword followed by colon followed by arguments

Example Message Date: Tue, 16 Jan :37:17 (EST) From: “William Stallings” Subject: The syntax of RFC 822 To: Cc: This is the main text, delimited from the header by a blank line.

Multipurpose Internet Mail Extension (MIME) Extension to RFC822 SMTP can not transmit executables —Uuencode and other schemes are available Not standardized Can not transmit text including international characters (e.g. â, å, ä, è, é, ê, ë) —Need 8 bit ASCII Servers may reject mail over certain size Translation between ASCII and EBCDIC not standard SMTP gateways to X.400 can not handle none text data in X.400 messages Some SMTP implementations do not adhere to standard —CRLF, truncate or wrap long lines, removal of white space, etc.

Overview of MIME Five new message header fields —MIME version —Content type —Content transfer encoding —Content Id —Content Description Number of content formats defines Transfer encoding defined

Content Types Text —Plain Multipart —Mixed, Parallel, Alternative, Digest Message —RFC 822, Partial, External-body Image —jpeg, gif Video —mpeg Audio —Basic Application —Postscript —octet stream

... From: "Yen-Cheng Chen" To: Subject: test mail! Date: Wed, 22 May :27: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0047_01C2019E.69F32C40“ Status: This is a multi-part message in MIME format =_NextPart_000_0047_01C2019E.69F32C40 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: 7bit Start of Body! Yen-Cheng =_NextPart_000_0047_01C2019E.69F32C40 Content-Type: text/plain; name="a.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="a.txt“ This is the first and only one line of the file =_NextPart_000_0047_01C2019E.69F32C From: "Yen-Cheng Chen" To: Subject: test mail! Date: Wed, 22 May :27: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0047_01C2019E.69F32C40“ Status: This is a multi-part message in MIME format =_NextPart_000_0047_01C2019E.69F32C40 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: 7bit Start of Body! Yen-Cheng =_NextPart_000_0047_01C2019E.69F32C40 Content-Type: text/plain; name="a.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="a.txt“ This is the first and only one line of the file =_NextPart_000_0047_01C2019E.69F32C40-- multipart/mixed

Content-Transfer-Encoding Reliable delivery across wide range of environments Content transfer encoding field —Six values —Three (7bit, 8bit, binary) no encoding done Provide info about nature of data Quoted-printable —Data largely printable ASCII characters —Non-printing characters represented by hex code Base64 —Maps arbitrary binary input onto printable output X-token —Named nonstandard encoding

Content-Transfer-Encoding Content-Transfer-Encoding: base ~63  A~Za~z0~9+/ Radix bits 32 bits

Quoted-printable Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable 暨南大學 =B3=AF=AB=DB=BF=FE A=B A=3DB 一年 =365 天

Discussion Mail Relay Junk mail Virus Spreading via mails Mail Security: authentication, privacy, integrity,… MIME applications Developing mail applications

POP3 Post Office Protocol - Version 3 RFC 1939 / Std 53 To retrieve s from server (POP3 server) Three states —Authorization State —Transaction State —Update State

POP3 Commands Authorization State —USER username —PASS password —APOP name digest Transaction State —STAT —LIST [msgNo] —RETR msgNo —DELE msgNo —NOOP —RSET —TOP msgNo line —UIDL [msgNo] Update State —QUIT

S: +OK POP3 server ready C: USER mrose S: +OK User name accepted, password please C: PASS pwd999 S: +OK Mailbox open, 2 messages (320 octets) C: STAT S: +OK C: LIST S: +OK 2 messages (320 octets) S: S: S:. C: RETR 1 S: +OK 120 octets S: S:. C: DELE 1 S: +OK message 1 deleted C: QUIT S: +OK dewey POP3 server signing off (maildrop empty) S: +OK POP3 server ready C: USER mrose S: +OK User name accepted, password please C: PASS pwd999 S: +OK Mailbox open, 2 messages (320 octets) C: STAT S: +OK C: LIST S: +OK 2 messages (320 octets) S: S: S:. C: RETR 1 S: +OK 120 octets S: S:. C: DELE 1 S: +OK message 1 deleted C: QUIT S: +OK dewey POP3 server signing off (maildrop empty)