SlideShare a Scribd company logo
3
Most read
Notes derived from “ Computer Networking: A Top Down Approach Featuring the Internet” , 2005, 3 rd  edition, Jim Kurose, Keith Ross, Addison-Wesley. Application Layer: FTP & Email
File Transfer Protocol (FTP) FTP client contacts FTP server at port 21, specifying TCP as transport protocol Client obtains authorization over control connection Client browses remote directory by sending commands over control connection. When server receives a command for a file transfer, the server opens a new TCP data connection to client After transferring one file, server closes connection. Server opens a seperate TCP data connection to transfer another file. Therefore, control connection is  “out of band”. FTP server maintains “state”: current directory, earlier authentication FTP client FTP server TCP control connection port 21 TCP data connection port 20
FTP commands, responses Sample commands: sent as 7-bit ASCII text over control channel USER  username PASS  password LIST   return list of files in current directory RETR filename   retrieves (gets) file STOR filename   stores (puts) file onto remote host Sample return codes(n) 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
Electronic Mail Three major components:   user agents  e.g., Eudora, Outlook, Pine mail servers  Incoming, outgoing messages Simple Mail Transfer Protocol: SMTP user mailbox outgoing  message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP SMTP SMTP
Electronic Mail: SMTP  [RFC 2821](n) Client’s SMTP mail server establishes a TCP connection to the recipients SMTP server using Port 25 three phases in messg. 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
Sample SMTP interaction S: 220 hamburger.edu  C: HELO crepes.fr  S: 250  Hello crepes.fr, pleased to meet you  C: MAIL FROM: <alice@crepes.fr>  S: 250 alice@crepes.fr... Sender ok  C: RCPT TO: <bob@hamburger.edu>  S: 250 bob@hamburger.edu ... Recipient ok  C: DATA  S: 354 Enter mail, end with &quot;.&quot; on a line by itself  C: First line in the mail  C: Second line in the mail C: .  S: 250 Message accepted for delivery  C: QUIT  S: 221 hamburger.edu closing connection
Try SMTP interaction for yourself(n) telnet servername 25 see 220 reply from server enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands   above lets you send email without using email client (reader)
SMTP: final words SMTP uses persistent connections: multiple messages can be sent to the destination with single TCP connection SMTP requires message (header & body) to be in 7-bit ASCII SMTP server uses  CRLF.CRLF  to determine end of message SMPT is a “chatty” protocol Header lines are part of the text message. It is not the part of the commands Comparison with HTTP: HTTP: pull SMTP: push SMTP command/response 7-bit ASCII. SMTP messages must be ASCII. HTTP does not impose restrictions for message. HTTP: each object encapsulated in its own response msg SMTP: multiple objects sent in multipart msg
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”, ASCII characters only header body blank line
Message format: multimedia extensions MIME: Multipurpose Internet Mail Extensions additional lines in msg header declare MIME content type multimedia data type, subtype,  parameter declaration method used to encode data MIME version encoded data 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
Mail access protocols SMTP is a push protocol. How will a user access emails? Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939] Users can’t create folders on mail server IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: Hotmail , Yahoo! Mail, etc. SMTP access protocol receiver’s mail  server user agent sender’s mail  server user agent SMTP

More Related Content

PPTX
Attack lecture #2 ppt
PPT
E mail image spam filtering techniques
PPTX
System Security-Chapter 1
PPTX
Introduction to Django
PPTX
Object oriented programming in python
PPT
Python Built-in Functions and Use cases
PPTX
Chapter- I introduction
PPTX
Form Handling using PHP
Attack lecture #2 ppt
E mail image spam filtering techniques
System Security-Chapter 1
Introduction to Django
Object oriented programming in python
Python Built-in Functions and Use cases
Chapter- I introduction
Form Handling using PHP

What's hot (20)

PDF
Firewall & types of Firewall
PDF
Python programming : Files
PPTX
Firewall
PPTX
Firewall presentation
PPT
transfer protocols,ftp,smtp,pop,imap
PPTX
Packet sniffing in switched LANs
PPTX
Network security and viruses
PDF
Email security presentation
PDF
9 python data structure-2
PPTX
GO BACK N PROTOCOL
PPTX
ASP.NET Page Life Cycle
PDF
VPN - Virtual Private Network
PPT
Linked lists
PPT
Security Attacks.ppt
PPTX
Simple Mail Transfer Protocol
PPTX
Network security
PPTX
Man in The Middle Attack
PPTX
Network packet analysis -capture and Analysis
PPTX
Firewall and Types of firewall
PDF
Network Access Control (NAC)
Firewall & types of Firewall
Python programming : Files
Firewall
Firewall presentation
transfer protocols,ftp,smtp,pop,imap
Packet sniffing in switched LANs
Network security and viruses
Email security presentation
9 python data structure-2
GO BACK N PROTOCOL
ASP.NET Page Life Cycle
VPN - Virtual Private Network
Linked lists
Security Attacks.ppt
Simple Mail Transfer Protocol
Network security
Man in The Middle Attack
Network packet analysis -capture and Analysis
Firewall and Types of firewall
Network Access Control (NAC)
Ad

Viewers also liked (20)

PPT
Smtp
PPT
Smtp
DOC
Simple Mail Transfer Protocol
PPTX
Telnet
PPTX
PPT
Mime
PPTX
Simple mail transfer protocol
PDF
TELNET Protocol
PPT
Presentation on telnet
PPTX
Simple Mail Transfer Protocol
DOCX
2003 arq.form
PDF
Normas constructivas funciones
PDF
Nei , teniamoli sotto controllo.
PPT
PDF
MM - Travel Manitoba AGM - Aug 31, 2011
PDF
Unix for developers
PPTX
Presentation fc nov
PPT
Curricularesprimerainf
PPTX
Magic 8 Ball pc
PPSX
Lcf cracked pot
Smtp
Smtp
Simple Mail Transfer Protocol
Telnet
Mime
Simple mail transfer protocol
TELNET Protocol
Presentation on telnet
Simple Mail Transfer Protocol
2003 arq.form
Normas constructivas funciones
Nei , teniamoli sotto controllo.
MM - Travel Manitoba AGM - Aug 31, 2011
Unix for developers
Presentation fc nov
Curricularesprimerainf
Magic 8 Ball pc
Lcf cracked pot
Ad

Similar to Ftp smtp (20)

PDF
Lec 9(Emails)
PPT
Smtp
PPT
Smtp
PPT
Mail services
PPT
Distributedapplications
PPT
Dictributed application by Waqas
PPTX
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
PPT
Mail server
PPT
Mail server
PPT
Appl layer
PDF
Lec 6(Application Layer)
PPT
applayerslides.ppt
PDF
009577496.pdf
PPTX
Electronic mail
PDF
E mail protocol - SMTP
PPTX
Dcn ppt 150050705008
PDF
Lecture 9 electronic_mail_representation_and_transfer
PPT
Chapter 2 : Application Layer
PPT
EmailTracing.ppt
Lec 9(Emails)
Smtp
Smtp
Mail services
Distributedapplications
Dictributed application by Waqas
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
Mail server
Mail server
Appl layer
Lec 6(Application Layer)
applayerslides.ppt
009577496.pdf
Electronic mail
E mail protocol - SMTP
Dcn ppt 150050705008
Lecture 9 electronic_mail_representation_and_transfer
Chapter 2 : Application Layer
EmailTracing.ppt

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Mushroom cultivation and it's methods.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Getting Started with Data Integration: FME Form 101
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A Presentation on Artificial Intelligence
Mushroom cultivation and it's methods.pdf
Approach and Philosophy of On baking technology
Chapter 5: Probability Theory and Statistics
Getting Started with Data Integration: FME Form 101
cloud_computing_Infrastucture_as_cloud_p
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
WOOl fibre morphology and structure.pdf for textiles
A comparative study of natural language inference in Swahili using monolingua...
Univ-Connecticut-ChatGPT-Presentaion.pdf
1. Introduction to Computer Programming.pptx
Enhancing emotion recognition model for a student engagement use case through...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Heart disease approach using modified random forest and particle swarm optimi...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
SOPHOS-XG Firewall Administrator PPT.pptx

Ftp smtp

  • 1. Notes derived from “ Computer Networking: A Top Down Approach Featuring the Internet” , 2005, 3 rd edition, Jim Kurose, Keith Ross, Addison-Wesley. Application Layer: FTP & Email
  • 2. File Transfer Protocol (FTP) FTP client contacts FTP server at port 21, specifying TCP as transport protocol Client obtains authorization over control connection Client browses remote directory by sending commands over control connection. When server receives a command for a file transfer, the server opens a new TCP data connection to client After transferring one file, server closes connection. Server opens a seperate TCP data connection to transfer another file. Therefore, control connection is “out of band”. FTP server maintains “state”: current directory, earlier authentication FTP client FTP server TCP control connection port 21 TCP data connection port 20
  • 3. FTP commands, responses Sample commands: sent as 7-bit ASCII text over control channel USER username PASS password LIST return list of files in current directory RETR filename retrieves (gets) file STOR filename stores (puts) file onto remote host Sample return codes(n) 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
  • 4. Electronic Mail Three major components: user agents e.g., Eudora, Outlook, Pine mail servers Incoming, outgoing messages Simple Mail Transfer Protocol: SMTP user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP SMTP SMTP
  • 5. Electronic Mail: SMTP [RFC 2821](n) Client’s SMTP mail server establishes a TCP connection to the recipients SMTP server using Port 25 three phases in messg. 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
  • 6. Sample SMTP interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... Recipient ok C: DATA S: 354 Enter mail, end with &quot;.&quot; on a line by itself C: First line in the mail C: Second line in the mail C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection
  • 7. Try SMTP interaction for yourself(n) telnet servername 25 see 220 reply from server enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send email without using email client (reader)
  • 8. SMTP: final words SMTP uses persistent connections: multiple messages can be sent to the destination with single TCP connection SMTP requires message (header & body) to be in 7-bit ASCII SMTP server uses CRLF.CRLF to determine end of message SMPT is a “chatty” protocol Header lines are part of the text message. It is not the part of the commands Comparison with HTTP: HTTP: pull SMTP: push SMTP command/response 7-bit ASCII. SMTP messages must be ASCII. HTTP does not impose restrictions for message. HTTP: each object encapsulated in its own response msg SMTP: multiple objects sent in multipart msg
  • 9. 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”, ASCII characters only header body blank line
  • 10. Message format: multimedia extensions MIME: Multipurpose Internet Mail Extensions additional lines in msg header declare MIME content type multimedia data type, subtype, parameter declaration method used to encode data MIME version encoded data 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
  • 11. Mail access protocols SMTP is a push protocol. How will a user access emails? Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939] Users can’t create folders on mail server IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: Hotmail , Yahoo! Mail, etc. SMTP access protocol receiver’s mail server user agent sender’s mail server user agent SMTP