FTP: the file transfer protocol

Similar documents
Chapter 2 Application Layer. Lecture 5 FTP, Mail. Computer Networking: A Top Down Approach

DATA COMMUNICATOIN NETWORKING

FTP and . Computer Networks. FTP: the file transfer protocol

CSCI-1680 SMTP Chen Avin

The Application Layer: DNS

FTP: the file transfer protocol

internet technologies and standards

DNS: Domain Name System

Domain Name System (or Service) (DNS) Computer Networks Term B10

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

CMPE 80N: Introduction to Networking and the Internet

Domain Name System Richard T. B. Ma

Application Layer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

CS43: Computer Networks . Kevin Webb Swarthmore College September 24, 2015

How To Map Between Ip Address And Name On A Domain Name System (Dns)

Chapter 2 Application Layer

CPSC Network Programming. , FTP, and NAT.

DNS and P2P File Sharing

Protocolo FTP. FTP: Active Mode. FTP: Active Mode. FTP: Active Mode. FTP: the file transfer protocol. Separate control, data connections

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Communicating Applications

DNS and electronic mail. DNS purposes

Domain Name System DNS

Names vs. Addresses. Flat vs. Hierarchical Space. Domain Name System (DNS) Computer Networks. Lecture 5: Domain Name System

1 Introduction: Network Applications

CS 43: Computer Networks Naming and DNS. Kevin Webb Swarthmore College September 17, 2015

DNS. Spring 2016 CS 438 Staff 1

DNS: Domain Name System

Domain Name System (DNS) RFC 1034 RFC

Domain Name System (DNS)

Internet Technology 2/13/2013

Network programming, DNS, and NAT. Copyright University of Illinois CS 241 Staff 1

Computer Networks & Security 2014/2015

HW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting

2.5 DNS The Internet s Directory Service

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting, NTP

Naming and the DNS. Focus. How do we name hosts etc.? Application Presentation Topics. Session Domain Name System (DNS) /URLs

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

Domain Name System (DNS) Reading: Section in Chapter 9

DATA COMMUNICATOIN NETWORKING

. Daniel Zappala. CS 460 Computer Networking Brigham Young University

The Application Layer. CS158a Chris Pollett May 9, 2007.

Domain Name System (DNS)

Network(Security(Protocols(

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

The Domain Name System

FTP Protocol Secure Shell (SSH) and Secure FTP (SFTP) Components of an System Simple Mail Transfer Protocol Mail Access Protocols

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

Application-layer protocols

CS 348: Computer Networks. - DNS; 22 nd Oct Instructor: Sridhar Iyer IIT Bombay

File Transfer Protocol (FTP) & SSH

Configuring Outlook to send mail via your Exchange mailbox using an alternative address

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP - Message Format. The Client/Server model is used:

Application Layer, Client/Server Computing and Socket Programming (II)

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

Networking Applications

Electronic Mail

Applications and Services. DNS (Domain Name System)

Introduction to Computer Networks

INF3190 Application Layer DNS, Web, Mail

Chapter 2 Application Layer

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Configuring your client to connect to your Exchange mailbox

NET0183 Networks and Communications

Security Analysis of DNS & Applications/

C 1. Last Time. CSE 486/586 Distributed Systems Domain Name System. Review: Causal Ordering. Review: Causally Ordered Multicast.

1. Open Thunderbird. If the Import Wizard window opens, select Don t import anything and click Next and go to step 3.

Network Technologies

Domain Name System (DNS)

Types of hypertext. Hypertext documents can either be 1.Static 2.Dynamic

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

Android: Configure IMAP/POP/SMTP

, SNMP, Securing the Web: SSL

CS244A Review Session Routing and DNS

Names & Addresses. Names & Addresses. Names vs. Addresses. Identity. Names vs. Addresses. CS 194: Distributed Systems: Naming

on the RaQ 3. General. server. Services

DNS: Domain Names. DNS: Domain Name System. DNS: Root name servers. DNS name servers

Integrated Migration Tool

Mail Programs. Manual

Internet-Praktikum I Lab 3: DNS

StarterPlus Mailbox Software Setup Guide

DNS Domain Name System

DOMAIN AND GLOSSARY The phrases and terms you may encounter, when registering a domain name

e- storage Mail Archive

Application Example: WWW. Communication in the WWW. WWW, HTML, URL and HTTP. Loading of Web Pages. The Client/Server model is used in the WWW

Remote login (Telnet):

Getting Started Guide Unix Platform

Transcription:

File Transfer: FTP

FTP: the file transfer protocol at host FTP interface FTP client local file system file transfer FTP remote file system transfer file to/from remote host client/ model client: side that initiates transfer (either to/from remote) : remote host 40

FTP: separate control and data connections FTP client contacts FTP at port 21, TCP is transport protocol client authorized over control connection client browses remote directory by sending commands over control connection. when receives file transfer command, opens 2 nd TCP connection (for file) to client after transferring one file, closes data connection. FTP client TCP control connection port 21 TCP data connection port 20 FTP opens another TCP data connection to transfer another file. control connection: out of band FTP maintains state : current directory, earlier authentication 41

FTP commands, responses Sample commands: sent as ASCII text over control channel USER name 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 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 42

E-mail SMTP, POP3, IMAP

Electronic Mail outgoing message queue mailbox Three major components: s mail s simple mail transfer protocol: SMTP User Agent mail SMTP SMTP mail a.k.a. mail reader/client composing, editing, reading mail messages e.g., MS Outlook, Mozilla Thunderbird outgoing, incoming messages stored on mail SMTP 44

Electronic Mail: mail s Mail Servers mailbox contains incoming messages for message queue of outgoing (to be sent) mail messages SMTP protocol between mail s to send email messages mail SMTP SMTP mail client: sending mail : receiving mail mail SMTP 45

Electronic Mail: SMTP uses TCP to reliably transfer email message from client to, port 25 direct transfer: sending to receiving three phases of 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 46

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 ; message placed in message queue 3) Client side of SMTP opens TCP connection with Bob s mail 4) SMTP client sends Alice s message over the TCP connection 5) Bob s mail places the message in Bob s mailbox 6) Bob invokes his to read message 1 mail mail 2 3 4 5 6 47

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 "." on a line by itself C: Do you like ketchup? C: How about pickles? C:. S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection 48

Try SMTP interaction for yourself: telnet mail.payap.ac.th 25 see 220 reply from enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send email without using email client (reader) 49

SMTP: final words SMTP uses persistent connections SMTP requires message (header & body) to be in 7-bit ASCII SMTP uses CRLF.CRLF to determine end of message Comparison with HTTP: HTTP: pull SMTP: push both have ASCII command/ response interaction, status codes HTTP: each object encapsulated in its own response msg SMTP: multiple objects sent in multipart msg 50

Mail access protocols SMTP SMTP access protocol sender s mail receiver s mail SMTP: delivery/storage to receiver s Mail access protocol: retrieval from POP: Post Office Protocol [RFC 1939] authorization ( <-->) and download IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on HTTP: gmail, Hotmail, Yahoo! Mail, etc. 51

POP3 protocol authorization phase client commands: 52 : declare name pass: password responses +OK -ERR transaction phase, client: list: list message numbers retr: retrieve message by number dele: delete quit telnet mail.payap.ac.th 110 S: +OK POP3 ready C: bob S: +OK C: pass hungry S: +OK successfully logged on C: list S: 1 498 S: 2 912 S:. C: retr 1 S: <message 1 contents> S:. C: dele 1 C: retr 2 S: <message 1 contents> S:. C: dele 2 C: quit S: +OK POP3 signing off

POP3 (more) and IMAP More about POP3 Previous example uses download and delete mode. Bob cannot re-read e-mail if he changes client Download-and-keep : copies of messages on different clients POP3 is stateless across sessions IMAP Keep all messages in one place: the Allows to organize messages in folders IMAP keeps state across sessions: names of folders and mappings between message IDs and folder name 53

DNS The Internet s Directory Service

DNS: Domain Name System People: many identifiers: SSN, name, passport # Internet hosts, routers: IP address (32 bit) - used for addressing datagrams name, e.g., ww.yahoo.com - used by humans Q: map between IP addresses and name? Domain Name System: distributed database implemented in hierarchy of many name s application-layer protocol that allows hosts, routers, name s to communicate by resolving names (address/name translation) note: core Internet function, implemented as application-layer protocol complexity at network s edge 55

DNS DNS services hostname to IP address translation host aliasing Canonical, alias names mail aliasing load distribution replicated Web s: set of IP addresses for one canonical name Why not centralize DNS? single point of failure traffic volume distant centralized database maintenance 56

Distributed, Hierarchical Database Root DNS Servers com DNS s org DNS s edu DNS s yahoo.com DNS s amazon.com DNS s pbs.org DNS s poly.edu umass.edu DNS s DNS s Client wants IP for www.amazon.com: client queries a root to find com DNS client queries com DNS to get amazon.com DNS client queries amazon.com DNS to get IP address for www.amazon.com 57

DNS: Root name s contacted by local name that can not resolve name root name : contacts authoritative name if name mapping not known gets mapping returns mapping to local name e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 36 other locations) a Verisign, Dulles, VA c Cogent, Herndon, VA (also LA) d U Maryland College Park, MD g US DoD Vienna, VA h ARL Aberdeen, MD j Verisign, ( 21 locations) k RIPE London (also 16 other locations) i Autonomica, Stockholm (plus 28 other locations) m WIDE Tokyo (also Seoul, Paris, SF) b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA 13 root name s worldwide 58

TLD and Authoritative Servers Top-level domain (TLD) s: responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, ca, jp. Network Solutions maintains s for com TLD Educause for edu TLD Authoritative DNS s: organization s DNS s, providing authoritative hostname to IP mappings for organization s s (e.g., Web, mail). can be maintained by organization or service provider 59

Local Name Server does not strictly belong to hierarchy each ISP (residential ISP, company, university) has one. also called default name when host makes DNS query, query is sent to its local DNS acts as proxy, forwards query into hierarchy 60