Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.
-
Upload
thomasina-morton -
Category
Documents
-
view
213 -
download
0
Transcript of Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.
![Page 1: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/1.jpg)
Lecturer: Maxim Podlesny
Sep 29 2008
CSE 473
File Transfer and Electronic Email in Internet
![Page 2: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/2.jpg)
2
File Transfer Overview
• Application protocol: FTP
• Main parts: client host and server host
• Parts of interaction: client authentication and file
transfer
• Used transport protocol: TCP
![Page 3: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/3.jpg)
3
FTP Session
• Two TCP connections (out-of-band)– Control connection employing port 21– Data connection employing port 20
• Data transfer– One data connection per one file transfer
• Control information– One control connection per FTP session– User account – Commands to change directory on server side– Commands to put and get a file from server
• Keeping state information for each session
![Page 4: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/4.jpg)
4
Control Interaction
• Client commands:– USER <name>– PASS <password>– LIST– RETR <filename>– STOR <filename>
• Server reply:– 331: username OK, password required– 125: transfer starting– 425: can’t open data connection– 452: error writing file
![Page 5: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/5.jpg)
5
Email System Overview
• Application protocol: SMTP (Simple Mail Transfer
Protocol)
• Main parts:
– Sender side: agent, mail server
– Receiver side: agent, mail server
• Used transport protocol: TCP
![Page 6: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/6.jpg)
6
SMTP
• Interaction between mail servers and sender-his
mail server
• Text of a mail: 7-bit ASCII
• TCP connection uses 25 port
• Handshaking
• One connection for sending a bunch of messages
between the servers
![Page 7: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/7.jpg)
7
Message Structure
• From: <…>• To: <…>• Subject: <…>• [MIME headers]• Received: from < > by <> <time>
– Inserted to a message by a SMTP receiving server– May consist of several records due to forwarding
• <Body of a message>
![Page 8: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/8.jpg)
8
Comparison with HTTP
• HTTP vs. SMTP
– transferring files
– persistent connections
– pull vs. push protocol
– any characters vs. 7-bit ASCII
– one message per object vs. one message per all objects
![Page 9: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/9.jpg)
9
MIME
• Purpose: sending content different from ASCII text
• Placement: additional headers in the message
• Structure:
– Content-Type header
• Indicates the type of non-ASCII data (video file, jpeg
file, …)
– Content-Transfer-Encoding header
• Type of encoding used for non-ASCII data (base64,
…)
![Page 10: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/10.jpg)
10
Mail Access Protocol
• Purpose: reading email from receiver’s SMTP
server
– SMTP – pushing protocol
– Getting email is a pulling operation
• Protocols: POP3, IM AP, HTTP
![Page 11: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/11.jpg)
11
POP3
• TCP connection uses port 110• Phases:
– Authentication• Getting access to SMTP server
– Transaction• Retrieving messages• Marking messages for deletion• Obtaining mail statistics
– Update• Deleting messages• Closing a session
• Download-and-keep, download-and-delete
![Page 12: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/12.jpg)
12
POP3 (cont.)
• Authentication– user <name>– pass <password>
• Transaction– list, retr, dele
• Update– quit
• Server response– +OK– -ERR
• No support of remote folders for messages
![Page 13: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/13.jpg)
13
IMAP
• Purpose: supporting remote folders
• Features:
– Maintaining user state information across sessions
– Retrieving parts of messages
![Page 14: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/14.jpg)
14
Web-Based Email
• Yahoo, Google, Gmail, …
• HTTP:
– sending message to client mail server
– retrieving message from recipient mail server
• SMTP:
– interaction between mail servers
![Page 15: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/15.jpg)
15
DNS
• Purpose: translating hostname to IP address
• Architecture: distributed system
• Additional functions:
– Host aliasing
– Mail server aliasing
– Load distribution
• Transport protocol:
– UDP
– port 53
![Page 16: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/16.jpg)
16
Structure
• Hierarchy:– Root DNS server
• Top-level domain (TLD) DNS server– Authoritative DNS server
• Local DNS server– Part of DNS– Interaction between end-host and the rest of DNS
• Intermediate DNS server– Interaction between TLD and authoritative server
• Accelerating performance through caching
![Page 17: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet.](https://reader038.fdocuments.net/reader038/viewer/2022110209/56649e2a5503460f94b18c94/html5/thumbnails/17.jpg)
17
DNS Record
• DNS resource record: (Name, Value, Type, TTL)– Type: A, NS, CNAME, MX– Name: hostname, domain, alias hostname, alias name of
a mail server– Value: IP address, hostname of authoritative DNS server,
canonical hostname, canonical name of a mail server – TTL: time of keeping a record in a cache