Ftp: File Transfer Protocol  ftp specification: RFC 959 (http://www.ietf.org/rfc/rfc959.txt) file transfer FTP server FTP user interface FTP client local.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
1 Electronic Mail u Three major components: u user agents u mail servers u simple mail transfer protocol: SMTP u User Agent u a.k.a. “mail reader” u composing,
CPSC 441: Intro, UDP1 Transport Layer Instructor: Carey Williamson Office: ICT Class Location:
Computer Communication Digital Communication in the Modern World Transport Layer Multiplexing, UDP
Chapter 3: Transport Layer
2: Application Layer1 ECE5650 FTP, , DNS, and P2P.
Layer Aplikasi Risanuri Hidayat. Applications and application-layer protocols Application: communicating, distributed processes –e.g., , Web, P2P.
Transport Layer3-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Lecture 8 Chapter 3 Transport Layer
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
CPSC 441: Intro, UDP1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes.
Electronic Mail and SMTP
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
8-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow.
Esimerkki: Sähköposti. Lappeenranta University of Technology / JP, PH, AH Electronic Mail Three major components: user agents mail servers simple mail.
Simple Mail Transfer Protocol
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Mail Server Fitri Setyorini. Content SMTP POP3 How mail server works IMAP.
Electronic Mail Three major components: SMTP user agents mail servers
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Trying out HTTP (client side) for yourself
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Lecture51 Administrative Things r Grader: Yona Raekow Office hours: Wed. 1pm-3pm or Th. 11am-1pm r Homeworks.
CSE401N: Computer Networks Lecture-5 Electronic Mail S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Communications and Networks Lecture 5 Instructor: Rina Zviel-Girshin.
Review: –How do we address “a network end-point”? –What services are provided by the Internet? –What is the network logical topology observed by a network.
Application Layer Protocols Simple Mail Transfer Protocol.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
DNS,SMTP,MIME.
Review: –What is AS? –What is the routing algorithm in BGP? –How does it work? –Where is “policy” reflected in BGP (policy based routing)? –Give examples.
2: Application Layer1 Reminder r Homework 1 for Wednesday: m Problems #3-5,11,16,18-20 m Half of the problems will be graded r Feel free to send me .
Sending and Receiving Mails
FTP (File Transfer Protocol) & Telnet
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_c Application Protocols: HTTP, FTP, SMTP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part.
File Transfer Protocol (FTP)
Transport Layer and UDP Tahir Azim Ref:
Transport Layer1 Ram Dantu (compiled from various text books)
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Slides based on Carey Williamson’s: FTP & SMTP1 File Transfer Protocol (FTP) r FTP client contacts FTP server at port 21, specifying TCP as transport protocol.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
COMP 431 Internet Services & Protocols
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Dr. Adil Yousif University of Alneelian – Master of CS - IT Electronic Mail.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
Chapter 3 outline 3.1 Transport-layer services
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
SMTP, POP3, IMAP.
Chapter 2: Application layer
Internet and Intranet Protocols and Applications
The Application Layer: SMTP, FTP
Chapter 2 Application Layer
Part II Application Layer.
Transport Layer Our goals:
Presentation transcript:

ftp: File Transfer Protocol  ftp specification: RFC 959 ( file transfer FTP server FTP user interface FTP client local file system remote file system user at host

data connection management

ftp commands, responses over 30 are available  sent as ASCII text over control conn.  authentication: user, pass  file access: e.g. put, get  file transfer control: mode  directory: pwd, list, delete  ftp session: help, stat, abort, quit Sample commands:  USER username  PASS password  LIST: return list of file in the 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

Electronic Mail Three major components:  user agents  mail servers  simple mail transfer protocol(smtp) User Agent  composing, editing, reading mail msgs  Eudora, Outlook, elm, Netscape Messenger  outgoing, incoming messages stored on server 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 user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP

application layer SMTP server port 25 socket data how a sender contacts a SMTP server  an SMTP server process running on every SMTP server host, waiting for incoming mail  TCP port# (25) is permanently assigned to SMTP (“well-known port”)  sender opens a TCP connection to the dest. mailman.cs.ucla.edu

SMTP daemon user agent TCP port 25 sender Your application program User mailbox SMTP daemon mail server SMTP delivery SMTP mail server user agent receiver POP

Simple Mail Transfer Protocol [RFC 821]

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 Sender ok C: RCPT TO: S: 250 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 (if more msgs to send, start from "MAIL FROM" again) C: QUIT S: 221 hamburger.edu closing connection

A typical SMTP message exchange (after the TCP connection setup) sender SMTP process receiver SMTP process 220 whitehouse.gov SMTP ready HELO foo.berkeley.edu 250 whitehouse.gov MAILFROM: 250 OK RCPT TO: 250 OK RCPT TO: 550 No such user DATA 354 start mail input blah blah blah OK QUIT 221 whitehouse.gov service closing

Code meaning 220 service ready 221 I’m closing too 250 requested action OK 500 error, command not recognized 550 no such mbox, no action taken Are there some basic rules behind the reply codes? Common practices 1st digit: whether response is good/bad/incomplete e.g. 2= positive completion, 5=negative completion 2nd digit: encodes responses in specific categories e.g. 2=connections, 5=mail system (status of the receiver mail system) 3rd digit: a finer gradation of meaning in each category specified by the 2nd digit.

smtp: final words  smtp uses persistent connections  smtp requires that message (header & body) be in 7-bit ascii  certain character strings are not permitted in message (e.g., CRLF.CRLF ). Thus message body must be encoded if it contains forbidden characters  smtp server uses CRLF.CRLF to determine end of message Comparison with http  http: pull  push  both have ASCII command/response interaction, status codes  http: each object is encapsulated in its own response message  smtp: multiple objects message sent in a multipart message

Mail message format RFC 821: SMTP specification (protocol for exchanging 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: extension for multimedia MIME: Multipurpose Internet Mail Extension  additional lines in msg header declare MIME content type From: To: 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

Mail access protocols Mail access protocol: retrieval from mail server  POP: Post Office Protocol [RFC 1939]  authorization (agent server) and download  IMAP: Internet Mail Access Protocol [RFC 1730]  more features, such as msg folders on the server  more complex implementation  manipulation of stored msgs on server  HTTP: Hotmail, Yahoo! Mail, etc. user agent sender’s mail server user agent SMTP POP3 or IMAP receiver’s mail server

POP3 protocol authorization phase  client commands:  user: declare username  pass: password  server responses  +OK  -ERR transaction phase, client:  list: list message numbers  retr: retrieve message by number  dele: delete  quit C: list S: S: S:. C: retr 1 S: S:. C: dele 1 C: retr 2 S: S:. C: dele 2 C: quit S: +OK POP3 server signing off S: +OK POP3 server ready C: user alice S: +OK C: pass hungry S: +OK user successfully logged on

telnet (RFC854)  A TCP connection used to transmit data with interspersed TELNET control information  Client side of the TCP connection initiates a request, the server accepts or rejects the request.  Telnet server uses port# 23  the client side can use any unreserved port. Internet User's key board & display telnet client operating system operating system application process

client-server paradigm  any program can become a network application client when it needs network services  servers are special purpose applications dedicated to providing specific service  server processes start at system initialization time  applications at both ends take initiative  server application informs local OS that it is ready to take incoming messages  wait for incoming messages  perform requested service  return results  client application contacts the server  send request  wait for reply

identifying servers and services  each service is assigned a unique well-known port number  server application process registers with local protocol software with that port #  a client requests a service by sending request to a specific server host with the well-known port #  server handles multiple requests concurrently

Chapter 3: Transport Layer Chapter goals:  Principles behind transport layer services:  multiplexing/demultiplexing  reliable data transfer  flow control  congestion control  instantiation and implementation in the Internet Chapter Overview:  transport layer services; multiplexing/demultiplexing  connectionless transport: UDP  connection-oriented transport: TCP  How to achieve reliable data delivery  TCP congestion control

Transport services and protocols  data delivery between app’ processes running on different hosts  transport vs network layer services: Internet transport services:  unreliable, unordered delivery: UDP  reliable, in-order delivery(TCP) application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical logical end-end transport

application transport network Multiplexing/demultiplexing data segments from multiple app processes is sent to lower layer for transmission Multiplexing delivering received data segments to corresponding upper layer protocols/apps Demultiplexing application transport network receiver H t H n segment M P1 MMM P3 P4 transport header Application data M P2 sender Some other host

Multiplexing/demultiplexing: examples host A server B source port: x dest. port: 23 source port:23 dest. port: x port use: simple telnet app Web client host A Web server B Web clients host C Source IP: C Dest IP: B sour port: 1180 dest. port: 80 Source IP: C Dest IP: B sour port: 2211 dest. port: 80 port use: Web server Source IP: A Dest IP: B sour port: 1180 dest. port: 80

UDP: User Datagram Protocol [RFC 768]  “best effort” service: UDP segments may be lost, or delivered out of order to applications  connectionless: source port # dest port # 32 bits Application data (message) length checksum Length of UDP segment (in bytes), including header UDP format

UDP checksum Sender:  treat data in the segment as sequence of 16-bit integers  checksum: addition (1’s complement sum) of segment contents  puts checksum value into UDP checksum field Receiver:  compute checksum of received segment  check if computed checksum equals checksum field value:  NO - error detected  YES - no error detected Goal: detect bit errors (e.g., flipped bits) in transmitted segment

Internet checksum algorithm  used in IP, TCP, UDP  sender:  consider the data block as 16xn matrix  add all data together using 16-bit one’s complement arithmetic  take the one’s complement of the result  receiver  add all bytes together, including the checksum field  if sum=0, no bit error

U_short checksum(u_short *buf, int length) { unsigned long sum = 0; if (length % 2) { /* pad the data length to be an even number of bytes */ length += 1; } length >>= 1; while (length--) { sum += *buf++; if (sum & 0xFFFF0000) {/*carry occurred, wrap around */ sum &= 0xFFFF); sum++; } return (~sum & 0xFFFF); } checksum computation: Sample code