FTP & E LECTRONIC MAIL د. عـــادل يوسف أبو القاسم.

Slides:



Advertisements
Similar presentations
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Advertisements

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,
2: Application Layer1 ECE5650 FTP, , DNS, and P2P.
Layer Aplikasi Risanuri Hidayat. Applications and application-layer protocols Application: communicating, distributed processes –e.g., , Web, P2P.
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.
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
2: Application Layer1 Traceroute – roundtrip times from source to the given hop traceroute to ( ), 30 hops max, 38 byte packets.
Electronic Mail and SMTP
Ftp: File Transfer Protocol  ftp specification: RFC 959 ( file transfer FTP server FTP user interface FTP client local.
Chapter 2: Application layer  2.1 Web, HTTP and HTML (We will continue…)  2.2 FTP  2.3 SMTP 9/22/2009 Lecture 7, MAT 279, Fall
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.
26.1 Chapter 26 Remote Logging, Electronic Mail, and File Transfer Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
Simple Mail Transfer Protocol
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.
Electronic Mail Three major components: SMTP user agents mail servers
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.
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Trying out HTTP (client side) for yourself
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Lecture51 Administrative Things r Grader: Yona Raekow Office hours: Wed. 1pm-3pm or Th. 11am-1pm r Homeworks.
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.
Communications and Networks Lecture 5 Instructor: Rina Zviel-Girshin.
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.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
DNS,SMTP,MIME.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
2: Application Layer1 Reminder r Homework 1 for Wednesday: m Problems #3-5,11,16,18-20 m Half of the problems will be graded r Feel free to send me .
Computer Networks26-1 Chapter 26. Remote Logging, Electronic Mail and File Transfer.
FTP (File Transfer Protocol) & Telnet
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Simple Mail Transfer Protocol (SMTP)
Electronic Mail. Client Software and Mail Hosts –Client PC has client software that communicates with user’s mail host –Mail hosts deliver.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_c Application Protocols: HTTP, FTP, SMTP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part.
File Transfer Protocol (FTP)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 26 (Data Communication and Networking): Remote Logging, Electronic Mail, and.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
TFTP: Trivial file transfer protocol
CSE 524: Lecture 6 Application layer protocols. Where we’re at… ● Internet architecture and history ● Internet protocols in practice ● Application layer.
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.
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.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Electronic Mail: SMTP, POP IMAP, and MIME.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
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
@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.
Dr. Adil Yousif University of Alneelian – Master of CS - IT Electronic Mail.
© 2010 Computer Science Faculty, Kabul University FTP AND ELECTRONICE MAIL 5 TH LECTURE 4, May, 2010 Baseer Ahmad Baheer.
Application Layer instructors at St. Clair College in Windsor, Ontario for their slides. Special thanks to instructors at St. Clair College in Windsor,
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
Remote Logging, Electronic Mail, and File Transfer
Application layer 1 Principles of network applications 2 Web and HTTP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
CS4470 Computer Networking Protocols
SMTP, POP3, IMAP.
Chapter 2: Application layer
Remote Logging, Electronic Mail,
The Application Layer: SMTP, FTP
Chapter 2 Application Layer
Presentation transcript:

FTP & E LECTRONIC MAIL د. عـــادل يوسف أبو القاسم

FTP (F ILE T RANSFER P ROTOCOL ) FTP is a protocol for transferring a file to/ from one host to another host. FTP is a client/server model.

FTP IS A CLIENT / SERVER MODEL client: side that initiates transfer (either to/from remote) server: remote host ftp server : port 21

FTP: SEPARATE CONTROL DATA CONNECTIONS FTP client contacts FTP server at port 21, TCP is transport protocol. client authorized over control connection client browses remote directory by sending commands over control connection. when server receives file transfer command, server opens second TCP connection (for file) to client

FTP: SEPARATE CONTROL DATA CONNECTIONS C ONT. The port 21 is used for the control connection and the port 20 for the data connection.

FTP COMMANDS RESPONSES Sample commands: sent as ASCII text over control channel USER username PASS password LIST return list of file in current directory RETR filename retrieves (gets) file STOR filename stores (puts) file onto remote host

S AMPLE RETURN CODES status code and phrase (as in HTTP) 331 Username OK, password required 125 data connection already open; transfer starting 425 Can’t open data connection 452 Error writing file

8 The following shows an actual FTP session that parallels Example The colored lines show the responses from the server control connection; the black lines show the commands sent by the client. The lines in white with black background show data transfer. Example (1)

We show an example of anonymous FTP. We assume that some public data are available at internic.net. Example (2)

Electronic Mail

 Just like ordinary mail, is asynchronous people send and read messages when it is convenient for them, without having to coordinate with other peoples' schedules.  Three major components: 1.user agents 2.mail servers 3.simple mail transfer protocol: SMTP Electronic Mail:

Electronic Mail Cont.

Alice's mail server transfers Alice's message to Bob's mail server.

User Agents (UA)  User agents allow users to read, reply to, forward, save, and compose messages.  When Alice is finished composing her message, her user agent sends the message to her mail server, where the message is placed in the mail server's outgoing message queue.  When Bob wants to read a message, his user agent obtains the message from his mailbox in his mail server.

 GUI (graphical user interface) user agents became popular, allowing users to view and compose multimedia messages.  Currently, Eudora, Microsoft's Outlook Express, and Netscape's Messenger are among the popular GUI user agents for . GUI user agents

 Mail servers form the core of the infrastructure.  Each recipient, such as Bob, has a mailbox located in one of the mail servers.  Bob's mailbox manages and maintains the messages that have been sent to him.  A typical message starts its journey in the sender's user agent, travels to the sender's mail server, and then travels to the recipient's mail server, where it is deposited in the recipient's mailbox. Mail Servers

 When Bob wants to access the messages in his mailbox, the mail server containing the mailbox authenticates Bob (with user names and passwords).  Alice's mail server must also deal with failures in Bob's mail server.  If Alice's server cannot deliver mail to Bob's server, Alice's server holds the message in a message queue and attempts to transfer the message later.  Reattempts are often done every 30 minutes or so; if there is no success after several days, the server removes the message and notifies the sender (Alice) with an message. Mail Servers Cont.

 SMTP uses the reliable data transfer service of TCP to transfer mail from the sender's mail server to the recipient's mail server on port 25.  SMTP has two sides: client side والذي يتم تنفيذه في ال server المرسل. و server side والذي يتم تنفيذه في ال server المستلم. كل من ال server side و ال client side من برتكول SMTP موجودة في كل mail server.  When a mail server sends mail (to other mail servers), it acts as an SMTP client.  When a mail server receives mail (from other mail servers) it acts as an SMTP server. Simple Mail Transfer Protocol (SMTP)

 SMTP has direct transfer from sending server to receiving server  command/response interaction  commands: ASCII text  response: status code and phrase  messages must be in 7-bit ASCII  SMTP uses persistent connections SMTP Cont.

1. Alice تستخدم UA (User Agent) لانشاء بريد وارساله الى 2. ال UA في جهاز Alice يقوم بارسال الرسالة الى Alice’smail server والذي يضع الرسالة في ال message queue. 3.Client side من برتكول ال SMTP في Alice’smail server يقوم بفتح TCP connection مع Bob’s mail server Scenario: Alice sends message to Bob (1)

4. SMTP client يقوم بارسال رسالة Alice من خلال ال TCP connection. 5.Bob’s mail server يقوم بوضع الرسالة في Bob ‘s mail box. 6.Bob يقوم باستخدام user agent لقراءة الرسالة. Scenario: Alice sends message to Bob(2)

Scenario: Alice sends message to Bob(3)

كل منهما يستخدم لارسال ملفات من جهاز الى آخر. كل منهما يستخدم persistent connections Comparison with HTTP (The similarities)

HTTP is a pull protocol – حيث يقوم شخص ما برفع معلومات على Web server ويقوم المستخدمون باستخدام برتكول HTTP لقراءة to pull هذه المعلومات من ال server. The TCP connection يتم انشاءها بواسطة الجهاز الذي يريد الحصول على الملف. في المقابل SMTP is a push protocol حيث ان ال server المرسل يقوم بارسال pushes لل server المستقبل. كما ان ال TCP connection يتم ان شاءها بواسطة الجهاز الذي يريد ارسال الملف. Comparison with HTTP (The differences)

Mail message format

While the message headers described in RFC 822 are satisfactory for sending ordinary ASCII text, they are not sufficiently rich enough for multimedia messages (e.g., messages with images, audio and video) or for carrying non-ASCII text formats (e.g., characters used by languages other than English). The MIME Extension for Non-ASCII Data

لارسال محتوى رسالة ايميل تحتوى على بيانات غير ال ASCII text فإن user agent للمرسل يجب ان يضيف headers جديدة في الرسالة. Two key MIME headers for supporting multimedia are the Content-Type: header and the Content-Transfer-Encoding: header. The Content-Type: header allows the receiving user agent to take an appropriate action on the message. The MIME Extension for Non-ASCII Data Cont.

For example, by indicating that the message body contains a JPEG image, the receiving user agent can direct the message body to a JPEG decompression routine. The MIME Extension for Non-ASCII Data Cont.

29 AL: M ESSAGE FORMAT : MULTIMEDIA EXTENSIONS MIME: multimedia mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type From: To: Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data base64 encoded data multimedia data type, subtype, parameter declaration method used to encode data MIME version encoded data

في الماضي كان مستلم رسائل البريد الالكتروني يقرأ الرسائل التي تصله بالدخول (logging ) الى جهاز ال server, غالبا باستخدام Telnet, وبعد ذلك يقوم بتنفيذ برامج قراءة الرسائل في ذلك الجهاز. لكن الآن فأن المستخدم يقوم بقراءة الرسائل باستخدام user agent والتي تقوم بتنفيذ برامج قراءة الرسائل في جهاز المستلم local PC سواء كان ذلك الجهاز عبارة عن office PC, a home PC, or a portable PC Mail access protocols

بتشغيل ال user agent في ال local PC يمكن للمستخدم ان يتمتع بكثير من المزايا كالقدرة على عرض رسائل ال multimedia وعرض ال attachments. من اشهر ال mail user agents والتي تعمل على local PCs هي Eudora, Microsoft's Outlook Express, and Netscape's Messenger. جهاز المستلم يجب ان يكون دائما يعمل ويجب ان يكون متصلا بالانترنت حتى يتمكن من استلام الرسائل الجديدة. Mail access protocols Cont.

لكن هذا السيناريو يعتبر غير عملي لمعظم مستخمي الانترنت. بدلاً عن ذلك المستخدم يقوم بتشغيل ال user agent في ال local PC لكن يصل لل mailbox من خلال shared mail server يكون دائما متصلا بالانترنت ودائما يعمل ويتشارك فيه مجموعة من المستخدمين. هذا ال mail server عادة ما تتم ادارته بواسطة ال user's ISP والتي يمكن ان تكون شركة او مجمع سكني او معهد او جامعة. Mail access protocols Cont.

الآن بما انه لدينا user agents يعمل على local PCs ولدينا mail servers مقدم بواسطة ISPs, فإننا نحتاج الى برتكول يسمح لل user agent و ال the mail server بالاتصال. Mail access protocols Cont.

34 M AIL ACCESS PROTOCOLS 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. user agent sender’s mail server user agent SMTP POP3 or IMAP receiver’s mail server

35 W EB BASED E - MAIL More and more users today are using browser- based services such as Hotmail or Yahoo! Mail. With these servers, the user agent is an ordinary Web browser and the user communicates with its mailbox on its mail server via HTTP. When a recipient, such as Bob, wants to access the messages in his mailbox, the messages are sent from Bob's mail server to Bob's browser using the HTTP protocol rather than the POP3 or IMAP protocol.

36 W EB BASED E - MAIL C ONT. When a sender with an account on an web- based server, wants to send a message, the message is sent from his browser to his mail server over HTTP rather than over SMTP. The mail server, however, still sends messages to, and receives messages from, other mail servers using SMTP. This solution to mail access is enormously convenient for the user on the go.

37 W EB BASED E - MAIL C ONT. The user need only to be able to access a browser in order to send and receive messages. The browser can be in an Internet cafe, in a friend's house, in a hotel room with a Web TV, Web-based is so convenient however, Its principle disadvantage is that it can be slow, as the server is typically far from the client and interaction with the server is done through CGI scripts.

Thank You