lecturer: maxim podlesny sep 29 2008 cse 473 file transfer and electronic email in internet

17
Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet

Upload: thomasina-morton

Post on 26-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecturer: Maxim Podlesny Sep 29 2008 CSE 473 File Transfer and Electronic Email in Internet

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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