Download presentation
Presentation is loading. Please wait.
Published byJared Underwood Modified over 8 years ago
1
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامهنویسی در اینترنت 1 SMTP, FTP
2
درس مهندسی اینترنت Common protocols defined for URLs n HTTP is also used as a generic protocol for communication between user agents and proxies/gateways to other Internet systems, including those supported by the next protocols: – SMTP, NNTP, FTP n In this way, HTTP allows basic hypermedia access to resources available from diverse applications
3
درس مهندسی اینترنت Transmission by using the HTTP HTTP/TCP/IP packets TCP/IP packets DNS/UDP/IP packets
4
درس مهندسی اینترنت Web Client-Browser Detailed Operation The browser determines the URL –(by seeing what was selected after user clicking) The browser asks DNS for the IP address of turul.eet.bme.hu DNS replies 152.66.72.101 The browser makes a TCP connection to port 80 on 152.66.72.97 It then sends a GET /subjects/index.html command The turul.eet.bme.hu server sends the file index.html The TCP connection is released The browser displays all the text in the index.html The browser fetches and displays all images in the index.html
5
درس مهندسی اینترنت ftp: separate control, data connections ftp client contacts ftp server at port 21, specifying TCP as transport protocol two parallel TCP connections opened: –control: exchange commands, responses between client, server. “out of band control” –data: file data to/from server ftp server maintains “state”: current directory, earlier authentication FTP client FTP server TCP control connection port 21 TCP data connection port 20
6
درس مهندسی اینترنت Electronic Mail: mail servers Mail Servers mailbox contains incoming messages (yet to be read) 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 mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP
7
درس مهندسی اینترنت Electronic Mail: smtp [RFC 821] 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 command/response interaction –commands: ASCII text –response: status code and phrase messages must be in 7-bit ASCII
8
درس مهندسی اینترنت Sample smtp interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: S: 250 alice@crepes.fr... Sender ok C: RCPT TO: S: 250 bob@hamburger.edu... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C:. S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection
9
درس مهندسی اینترنت bash-2.05b$ telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 Nimrud.eet.bme.hu ESMTP Sendmail 8.12.11/8.12.11; Mon, 13 Nov 2006 18:25:25 +0100 mail from: unknown@nonamed.hu 250 2.1.0 unknown@nonamed.hu... Sender ok rcpt to: hosszu@nimrud.eet.bme.hu 250 2.1.5 hosszu@nimrud.eet.bme.hu... Recipient ok data 354 Enter mail, end with "." on a line by itself asda sdas. Emailing with non-existing sender Here any text can be written, but it must be followed by a line with a simple point Command, this ends the header Open a session with the SMTP server The sender The recipient
10
درس مهندسی اینترنت Mail message format smtp: protocol for exchanging email msgs RFC 822: standard for text message format: header lines, e.g., –To: –From: –Subject: different from smtp commands! body –the “message”, 7-bit ASCII characters only header body blank line
11
درس مهندسی اینترنت Message format: multimedia extensions MIME: multimedia mail extension, RFC 2045, 2056 supports inclusion on non-ASCII data in email message additional lines in message header declare MIME (Multimedia Internet Mail Extensions) content type 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 multimedia data type, subtype, parameter declaration method used to encode data MIME version encoded data
12
درس مهندسی اینترنت Multipart Type From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=98766789 --98766789 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Dear Bob, Please find a picture of a crepe. --98766789 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data....................................base64 encoded data --98766789--
13
درس مهندسی اینترنت Mail access protocols SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server –POP3: Post Office Protocol [RFC 1939] authorization (agent server) and download –IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored messages on server –HTTP: Hotmail, Yahoo! Mail, SquirrelMail, etc. user agent sender’s mail server user agent SMTP POP3 or IMAP receiver’s mail server
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.