Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecturer : Ms.Trần Thị Ngọc Hoa Chapter 8 File Transfer Protocol – Simple Mail Transfer Protocol.

Similar presentations


Presentation on theme: "Lecturer : Ms.Trần Thị Ngọc Hoa Chapter 8 File Transfer Protocol – Simple Mail Transfer Protocol."— Presentation transcript:

1 Lecturer : Ms.Trần Thị Ngọc Hoa Chapter 8 File Transfer Protocol – Simple Mail Transfer Protocol

2 Lecturer : Ms.Trần Thị Ngọc Hoa Objectives  Configuring a Web Service Infrastructure FTP SMTP

3 Lecturer : Ms.Trần Thị Ngọc Hoa Configuring FTP  Definition : provides a method by which users can upload and download data through web pages or networks.  Versions : FTP 6 FTP 7  RFC 959  uses two TCP Ports one for control one for data transfers  command-response protocol

4 Lecturer : Ms.Trần Thị Ngọc Hoa FTP Commands  Due to multiple hardware types and operating systems file are converted to four environmentally neutral data type for transport and the converted to local types at the destination ASCIIANVT-ASCII EBCDICEEBCDIC Text IMAGEIRaw binary, series of octets LOCALLRaw binary using a variable byte size  Client responsibility to tell server data type to use  Default data type, unless otherwise specified is ASCII

5 Lecturer : Ms.Trần Thị Ngọc Hoa FTP Commands  USERRUser name, userid for access control  PASSO Password for access control  ACCTO Account info  CWDOChange working directory  CDUPOChange to parent directory  SMNTOStructure mount, mount a different file system  QUITRinforms server that client wants out  REINOrestarts session at authentication phase  PORTRHost addr and data port to use

6 Lecturer : Ms.Trần Thị Ngọc Hoa FTP Commands  PASVOPassive; informs server that client will contact to set up data connections, ask server to sent port info  TYPERData type, type of subsequent transfers  STRURFile structure  MODERTransfer mode  RETRRRetrieve, download the file from server  STORRStore, upload the specified to server  STOUOStore unique, same as store but server picks unique file name

7 Lecturer : Ms.Trần Thị Ngọc Hoa Understanding SMTP 1. Jane invokes her e-mail service on her local machine. 2. Jane supplies Elvis’s e-mail address, composes a message, and instructs the SMTP user agent (e-mail service) to send the message. 3. The message is sent to Jane’s mail server and placed in a queue. 4. The client side of SMTP, running on Jane’s mail server, uses DNS to locate the destination mail server. 5. Jane’s mail server opens a TCP connection to the SMTP server at the destination. Jane’s SMTP client sends the message into the TCP connection. 6. Elvis’s SMTP server receives the message and places it in Elvis’s mailbox. 7. An Elvis impersonator reads the message at his convenience.

8 Lecturer : Ms.Trần Thị Ngọc Hoa Understanding SMTP TCP SMTP (client) IP TCP SMTP (server) IP SMTP agent Jane’s Local HostJane’s Mail ServerElvis’s Mail Server 1. Jane invokes her local SMTP agent 2. Jane constructs e-mail message TO: elvis@graceland.com elvis@graceland.com Dear Elvis, I don’t believe you’re really dead. Please reply. Love, Jane Doe 3. Jane sends e-mail to her mail server for delivery4. Jane’s Mail Server establishes a TCP connection with Elvis’s 5. Mail is delivered via a sequence of TCP packets exchanges IP header TCP header SMTP header Text of Message 6. Elvis’s Mail Server receives e-mail and puts it in his mailbox 7. TCP Connection is terminated

9 Lecturer : Ms.Trần Thị Ngọc Hoa Understanding SMTP Exchange of SMTP messages after an initial TCP handshake 220 graceland.com Sender: Message: Server (Elvis’s Mail Server) Meaning: Connection established with mail server ID Client (Jane’s Mail Server) HELO marist.edu SMTP Connect from (Mail Server ID) Server (Elvis’s Mail Server) 250 Hello marist.edu SMTP Connection message acknowledged Client (Jane’s Mail Server) MAIL FROM: jane.doe@marist.edu Sender’s e-mail address is supplied Server (Elvis’s Mail Server) 250 jane.doe@marist.edujane.doe@marist.edu Sender’s URL Received ok Client (Jane’s Mail Server) RCPT TO:elvis@graceland.comelvis@graceland.com Identifies the Receiver’s URL Server (Elvis’s Mail Server) 250 elvis@graceland.com …Recipient okelvis@graceland.com Acknowledges previous message and indicates a valid recipient on this mail server Client (Jane’s Mail Server) DATA Ready to send data Server (Elvis’s Mail Server) 354 Enter mail, end with “.” on sep. line Ready to receive message Client (Jane’s Mail Server) I can’t believe you’re really dead. Please reply. Love, Jane Doe Client (Jane’s Mail Server). Period on separate line signifies the end of message Server (Elvis’s Mail Server) 250 Message accepted for delivery Acknowledges receipt of the e-mail Client (Alice’s Mail Server) QUIT Indicates no more e-mails to transmit Server (Elvis’s Mail Server) 221 graceland.com closing connection SMTP connection with indicated MS closed

10 Lecturer : Ms.Trần Thị Ngọc Hoa Lab Demo


Download ppt "Lecturer : Ms.Trần Thị Ngọc Hoa Chapter 8 File Transfer Protocol – Simple Mail Transfer Protocol."

Similar presentations


Ads by Google