You are on page 1of 16

Computer Communication & Networks

Lecture 27 Application Layer: Electronic mail and FTP http://web.uettaxila.edu.pk/CMS/coeCCNbsSp09/index.asp

Waleed Ejaz waleed.ejaz@uettaxila.edu.pk

1

Application Layer 2 .

Application Layer Topics to Cover DNS Remote Logging Electronic Mail File Transfer 3 .

 One of the most popular Internet services is electronic mail (e-mail). 4 . The designers of the Internet probably never imagined the popularity of this application program. Its architecture consists of several components that we discuss in this chapter.

IMAP 5 . POP3.Electronic Mail SMTP.

elm.a. “mail reader”  composing.g.k.Electronic Mail Three major components:  outgoing message queue user mailbox user agent mail server user agent mail server   user agents mail servers simple mail transfer protocol: SMTP SMTP SMTP mail server User Agent  a. Eudora. editing. Outlook.. Netscape Messenger  outgoing. reading mail messages  e. incoming messages stored on server user agent SMTP user agent user agent user agent 6 .

Services of User Agent 7 .

Electronic Mail: mail servers Mail Servers  user agent mail server user agent mail server user agent   mailbox contains incoming messages for user message queue of outgoing (to be sent) mail messages SMTP protocol between mail servers to send email messages  client: sending mail server  “server”: receiving mail server SMTP SMTP mail server SMTP user agent user agent user agent 8 .

Electronic Mail: SMTP [RFC 2821]    uses TCP to reliably transfer email message from client to server. port 25 direct transfer: sending server to receiving server three phases of transfer  handshaking (greeting)  transfer of messages  closure  messages must be in 7-bit ASCII 9 .

Scenario: Alice sends message to Bob 1) Alice uses UA to compose message and “to” bob@someschool. message placed in message queue 3) Client side of SMTP opens TCP connection with Bob’s mail server 1 user agent 2 mail server 3 4) SMTP client sends Alice’s message over the TCP connection 5) Bob’s mail server places the message in Bob’s mailbox 6) Bob invokes his user agent to read message mail server 4 5 6 user agent 10 .edu 2) Alice’s UA sends message to her mail server.

Mail access protocols user agent SMTP SMTP access protocol user agent sender’s mail server   receiver’s mail server SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server  POP: Post Office Protocol [RFC 1939]  authorization (agent <-->server) and download  IMAP: Internet Mail Access Protocol [RFC 1730]  more features (more complex)  manipulation of stored msgs on server  HTTP: Hotmail . Yahoo! Mail. etc. 11 .

The exchange of commands and responses in POP3 12 .

E-mail address 13 .

FTP 14 .

FTP: the file transfer protocol FTP FTP user client interface file transfer FTP server user at host   local file system remote file system   transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from remote)  server: remote host ftp: RFC 959 ftp server: port 21 15 .

data connections      TCP control connection FTP client contacts FTP server port 21 at port 21. server closes connection. When server receives a command for a file transfer.FTP: separate control. specifying TCP as transport protocol TCP data connection Client obtains authorization FTP FTP port 20 over control connection client server Client browses remote directory  Server opens a second TCP by sending commands over data connection to transfer control connection. earlier authentication 16 . another file. the  Control connection: “out of band” server opens a TCP data connection to client  FTP server maintains After transferring one file. “state”: current directory.