Lecture 2 - Weeks 2 3.pptx-Data Commun...
Lecture_2_-_Weeks_2___3.pptx-Data Communication and Computer Networks 2.
Showing 52-57 out of 70
Lecture 2 - Weeks 2 3.pptx-Data Communication an...
Lecture_2_-_Weeks_2___3.pptx-Data Communication and Computer Networks 2.
Lecture 2 - Weeks 2 3.pptx-Data C...
Lecture_2_-_Weeks_2___3.pptx-Data Communication and Computer Networks 2.
Page 52
Application Layer A 2-52
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
sample 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


Page 53
Application Layer A 2-53
Electronic mail
Three major
components:
user agents
mail servers
simple mail transfer
protocol: SMTP
User Agent
a.k.a. “mail reader”
composing, editing,
reading, forwarding,
replying mail
messages
e.g., Outlook,
Thunderbird, iPhone
mail client
outgoing, incoming
user mailbox
outgoing
message queue
mail
server
SMT
P
SMT
P
SMTP
mail
server
user
agent
user
agent
user
agent
user
agent
mail
server
user
agent
user
agent


Page 54
Application Layer A 2-54
Electronic mail: mail servers
mail servers:
mailbox
contains
incoming messages
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
user mailbox
outgoing
message queue
mail
server
SMT
P
SMT
P
SMTP
mail
server
user
agent
user
agent
user
agent
user
agent
mail
server
user
agent
user
agent


Page 55
Application Layer A 2-55
Simple Mail Transfer Protocol: SMTP [RFC
5321]
the principle application-layer protocol
for e-mail
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 (like
HTTP, FTP
)
commands:
ASCII text
response:
status code and phrase
messages must be in
7-bit ASCI


Page 56
Application Layer A 2-56
user
agent
Scenario: Alice sends message
to Bob
1) Alice uses UA to
compose message “to”
bob@someschool.edu
2) Alice’s UA sends
message to her mail
server; message
placed in message
queue
3) client side of SMTP
opens TCP connection
with Bob’s mail server
4) SMTP client sends
Alice’s message over
the TCP connection
5) Bob’s mail server
places the message in
Bob’s mailbox
6) Bob invokes his user
agent to read message
mail
server
mail
server
1
2
3
4
5
6
Alice’s mail server
Bob’s mail server
user
agent


Page 57
Application Layer A 2-57
Sample SMTP interaction
S: 220 sunset.edu
C: HELO jupiter.fr
S: 250
Hello jupiter.fr, pleased to meet you
C: MAIL FROM: <alice@jupiter.fr>
S: 250 alice@jupiter.fr... Sender ok
C: RCPT TO: <bob@sunset.edu>
S: 250 bob@sunset.edu ... Recipient ok
C: DATA
S:
354 Enter mail, end with "." on a line by itself
C: Hi Bob,
C: How is it in beautiful Paris?
C: .
S: 250 Message accepted for delivery
C: QUIT
S: 221 sunset.edu closing connection


Ace your assessments! Get Better Grades
Browse thousands of Study Materials & Solutions from your Favorite Schools
Concordia University
Concordia_University
School:
Data_Comm_and_Computer_Net
Course:
Great resource for chem class. Had all the past labs and assignments
Leland P.
Santa Clara University
Introducing Study Plan
Using AI Tools to Help you understand and remember your course concepts better and faster than any other resource.
Find the best videos to learn every concept in that course from Youtube and Tiktok without searching.
Save All Relavent Videos & Materials and access anytime and anywhere
Prepare Smart and Guarantee better grades

Students also viewed documents